[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Question about which XPaths can be evaluated on a DOM as it is beingbuil
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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|