XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Question about which XPaths can be evaluated on a DOM as it is beingbuilt by a stream

A question.

My scenario is I have a SAX stream, which comes in and builds a DOM.  I want to get Schematron validation results ASAP but chunked to the element not the start-tag: for this, just running as many assertions for an element as soon as its end-tag arrives is good enough.  I.e. progressive bottom-up validation.

(Yes, I am aware that there are other categories possible, such as what can be known at start-tag.  I guess I should re-read XPath3/XSLT3 to see if they have defined anything here for their streaming.)

So I want to categorize the assertions and rules into two buckets: those that can always be assessed right away at the end-tag, and those that may not.  And hopefully without having to fully parse the XPath, or to minimally parse them.

For minimal Schematron, this would be rule/@context,  assert/@test, let/@value. (Lets leave keys, value-of, etc. off.)  For XSLT, this would be the equivalent of the xsl:template/@match and xsl:template//*/@test and xsl:variable/@select.

So to get those that can be reliably assessed, is this enough:
The first three of the tests are trivial string matching, but the last one is more difficult: it looks like it requires a parse with awareness of resulting type. 

So my questions are: is there some missing case, and is there some cheapo way to determine if a numeric positional predicate is being used?

Cheers
Rick


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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

Copyright 1993-2007 XML.org. This site is hosted by OASIS