[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPattern Specification


petr g.
* Petr Cimprich <petr@g...> [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@e...

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.