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

Re: XPattern Specification


Re:  XPattern Specification
Petr Cimprich wrote:
>  From my point of view, the first step should be to define a context 
> available for XPattern evaluation. The context then determines which 
> XPath grammar constructs make sense as well as their real meaning. Thus, 
> the context should be agreed before the reduction of XPath grammar starts.
> 
> The context can include e.g. these items:
> 
> 1. The current node
> 
> 2. All the ancestors of the current node
> 
> While the 1. and 2. can be maintained at nearly no costs (and I can 
> hardly imagine a pattern matching without them) the other points are 
> trade-offs between the language power and implementation costs.
> 
> 3. N events look ahead.
> There is a quite difference between 0 and 1; the one node buffering 
> allows e.g. to join consequent text events into a single node (which is 
> required by the XPath data model).

In a streaming context, the concept of nodes is less useful, I think.
We should rather think in events. The joined character data would then be
available in the end-tag event.

  > 4. Position counters (to enable position predicates and position()
> function)

Especially for a streaming processor, should the goal of a pattern
matching language not be, to allow for flexible cooperation between what
the language does and what the handlers do?

Predicate evaluation could also be performed in the handler call-backs.
So, maybe the XPattern language could provide for simple attribute value
matching, but leave more difficult tasks to the call-back handlers,
which can take advantage of a Turing complete language, and which
can also easliy interact with application context (e.g  if our database
has a record for this id, return true, otherwise return false).
And there should be a specified way for how the handlers return results
for predicate evaluation.

Karl

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.