OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xslt-conformance message

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


Subject: [xslt-conformance] xsl:number issue: no nodes to count yet






What do you do if the from attribute is set to a node name that has not
yet been encountered? Several Xalan numbering tests exemplify this
issue, with numbering61 being the simplest example. We have a nested
structure of b inside a, c inside b, etc. and each has a <title>
sub-element that we want to number. Matching on title, we do
<xsl:number level="any" from="c" count="a|b|c|d|e" format="1"/>
We even do this on nodes that are above the c nodes. Notice that
level="any" in this issue; the spec is a little different for the
other styles of numbering.

Erratum E23 addresses this situation (only for level="any") thusly:
When level="any", it constructs a list of length one containing the
number of nodes that match the count pattern and belong to the set
containing the current node and all nodes at any level of the
document that are before the current node in document order,
excluding any namespace and attribute nodes (in other words the union
of the members of the preceding and ancestor-or-self axes). If there
are no matching nodes, it constructs an empty list. If the from
attribute is specified, then only nodes after the first node before
the current node that match the from pattern are considered.
[The "no matching nodes" sentence is the erratum.]

The WG must believe that the above resolves the issue. I think the
last sentence is still murky. Without a from but with a count, we
have numbering29, which is just a sequential numbering of all the
nodes identified in the count attribute. With a from but no count,
we have numbering18, which is laced with subtleties. With neither
from nor count, we have numbering51, which is non-controversial
as far as I know.

When that last sentence says "nodes...are considered", I gather that
it defines the range of nodes over which scanning for countable
nodes will take place, but I get that more from a sense of what
from is trying to do (reset the count) than directly from the
verbiage. But if you just say that from resets the count, you can
successfully count nodes before the first occurrence of a from
node. Also, the last sentence can be criticized for the way
modifiers are placed:
...only nodes
after the first node
before the current node
that match the from pattern...
Is each constraint applied to "node" on the line immediately
before it, or do all apply independently to "nodes" on the first
line? Would it be reasonable to ask the WG to take another pass
at this paragraph?

What do you think, and why?
A) It should be an empty list; early nodes can't be "considered"
B) It should be 1-n; from does a reset but you can count before it
C) Some other meaning?
D) Must refer this to the XSL WG for resolution

If "empty list" is the answer, there is a separate question about
rendering the number.
.................David Marston



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


Powered by eList eXpress LLC