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: from and count have the samepattern






The Xalan test case numbering63 has been questioned by Pranav and by
Jonas Sicking of the Mozilla project. It has:
<xsl:number level="single" from="a" count="a|b|c|d|e" format="1"/>
but the key issue is really:
<xsl:number level="single" from="a" count="a"/>
The above occurs on the <title> that is a child of any a|b|c|d|e.

This is definitely a non-mainstream case, since the syntax seems to ask
the counter to reset itself anytime it finds a node to count. However,
it does expose some possible gaps in the specs. Jonas writes:

>When the from- and the count-attributes matches the same node then an
>empty list should be constructed. This only applies if the node in
>question is an ancestor of the contextnode rather then the contextnode
>itself. The spec says:
# If the from-attribute is specified, then the only ancestors that are
# searched are those that are descendants of the nearest ancestor that
# matches the from pattern
>So if the first node up the tree to match the count-attribute also
>matches the from-attribute it should be ignored since it is not a
>"decendant of the nearest ancestor that matches the from pattern".

I conclude that the trouble occurs because it says "descendants"
rather than "elements on the descendant-or-self axis" and so the <a>
that is the self rather than a descendant is not counted. Without a
from, the verbiage has a convoluted way of saying "count all the <a>
nodes found so far" and you get what you expect, as in numbering28.
What you expect with a from is probably "reset the count each time
you encounter a from node" but if it's the same as what you're
counting, is that a 0 or a 1? (Notice that neither is practical.)

What do you think, and why?
A) It should be 0; take "descendant" in the strict sense
B) It should be 1; counting begins at 1
C) Some other output?
D) Must refer this to the XSL WG for resolution

At least one more issue will address this strange verbiage about the
from attribute.
.................David Marston



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


Powered by eList eXpress LLC