OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XPattern Specification

[ Lists Home | Date Index | Thread Index ]

* Petr Cimprich <petr@gingerall.cz> [2005-01-18 04:57]:
> Alan Gutierrez wrote:
> 
> >   Refuse? I don't mean to come across as obstinate. I've been up
> >   all night. Perhaps my tone is not what I would want it to be.

> Don't take me wrong, this hasn't been intended as reproach :)       

    No. Dindn't take it that way. I don't want to sound opinionated,
    myself, or set on any one direction.
    
    I'm awake now, too.     

> >   As far as handling content, I'm not thinking in terms of
> >   fetching a nodes out of a tree, but in terms of capturing, and
> >   responding to event with event handlers.
> >
> >   That's why I think there are two phases, defining the pattern
> >   matching langauge, and then, as a second step, trying to come up
> >   with a generic expression of capturing and replacing, or
> >   inserting. The former is useful as on its own, for XML event
> >   handling frameworks.


> Perhaps, XPattern could be limited to the first step, as of now. We want 
> a common syntax for patterns to match against streams of events 
> representing XML documents. Once you have a match, you can replace, 
> insert, run templates, callbacks, whatever.

    Of couse, but I'd like to keep in mind how it would be used.

    Thinking ahead to applications, so that the XPattern language
    itself is not over engineered. That's all.

    I feel, at this point, that all axis can be used in predicates
    that compare against literals, that is, no joins, since joins
    imply capturing.

    <foo>
      <bar>
        <a>1</a>
        <b>1</b>
        <c>2</b>
      </bar>
    </bar>

    /foo/bar[a = 1 and b = 1]/c

    We can match this pattern with a state machine.

    /foo/bar[a = 1 and c = 3]/b

    We can't match this pattern.
    
    Do we stick with an XPath based laguange then? Or do we try for
    something that is more stream oriented?

    /foo/bar[a = 1, b = 2]/c

    The above is less abiguous meaining a = 1 followed by b= 2.

    /foo/bar[(a), b = $1]/c

    Then you can get into capturing.

--
Alan Gutierrez - alan@engrm.com




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS