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

Re: XPattern Specification


state machine in xml
Alan Gutierrez wrote:

>
>
>    To match that partuclar end element, with that partucular
>    pattern, you only need to update a state machine as the events
>    stream by. There's no need to traverse at end element. The
>    pattern matches and an event handler takes over the stream.
>
>    <foo>
>      <bar>one</bar>
>      <baz>
>        <a><b><c>two</c></b></a>
>      </baz>
>      <bar>three</bar>
>    </foo>
>
>    /foo[baz/a/b/c = 'two']/bar[. = 'three']
>
>    I can know that the above pattern matches at the end of the last
>    bar, without keeping any nodes at all.
>  
>

I see. This way could be inconvenient if you have a lot of patterns and 
you don't know which of them will be tested in the beginning. Keeping 
some info for later evaluation or updating the state machine are 
different implementation approaches, XPattern should work for both. 
Anyway, I see why you refuse starting with context definition. Let's 
work with EBNF then.

BTW, I think XPattern should be a subset of XSLT pattern 
(http://www.w3.org/TR/xslt20/#NT-Pattern) rather than XPath expression.


-- 
Petr Cimprich
Ginger Alliance
www.gingerall.com


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.