|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl:number with level=any
> But the 1.0 spec does say explicitly that the "from" node is the last node > *before* the current node that matches the "from" pattern, which means that > it is irrelevant whether or not the current node matches the "from" pattern. That seems reasonable. > In the case where no node before the current node matches the "from" > pattern, my interpretation (and that of the 2.0 spec) is that you count all > the nodes back to the root. My interpretation of the (amended) 1.0 description, was that there is no node before the current node that matches "from", so there are no nodes after that node, so an empty list is constructed. Can a node be after a non-existent node? > <quote> > Let $F be the node sequence selected by the expression > > $S/(preceding::node()|ancestor-or-self::node())[matches-from(.)][last()] > > (the last node in document order that matches the from pattern and that > precedes the selected node, using the same definition) > </quote> It was that inconsistency that led me to suspect that "before" and "after" were meant to be interpreted as "before-or-self" and "after-or-self", and thus have no confidence in my interpretation of the 1.0 wording! The definition of $A has a similar problem: Let $A be the node sequence selected by the expression $S/(preceding::node()|ancestor-or-self::node())[matches-count(.)] (the set of nodes that match the count pattern and that precede the selected node in document order, but excluding attribute and namespace nodes) The expression includes the selected node if it matches "count", but the text refers to nodes that *precede* the selected note. In this case, the text seems to be wrong and the expression right. -- Richard
|
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
|

Cart








