[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
According to the spec, when a sequence number contains more values than there are formatting tokens, the last formatting token is used for the excess values. Unfortunately, it is a little vague on which separator token to use with the excess values.
It says that a '.' is to be used if no separator token exists, but does this also apply to the case where the final formatting token is re-used with excess sequence values?
Here is a quick test I did to try and see how different processors are handling this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="a/b/c/d">
<xsl:number level="multiple" count="*" format="(1)"/>
</xsl:template>
</xsl:stylesheet>
If my input document is...
Both answers seem perfectly reasonable to me, given the lack of clarity in the 1.0 spec.
Can anyone help me figure out which is (more) correct?
[xsl] xsl:number question (XSLT 1.0)
Subject: [xsl] xsl:number question (XSLT 1.0) From: Jack Matheson <jack@xxxxxxxxxxxxxx> Date: Fri, 15 Apr 2005 09:31:03 -0500 |
According to the spec, when a sequence number contains more values than there are formatting tokens, the last formatting token is used for the excess values. Unfortunately, it is a little vague on which separator token to use with the excess values.
It says that a '.' is to be used if no separator token exists, but does this also apply to the case where the final formatting token is re-used with excess sequence values?
Here is a quick test I did to try and see how different processors are handling this:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="a/b/c/d">
<xsl:number level="multiple" count="*" format="(1)"/>
</xsl:template>
</xsl:stylesheet>
If my input document is...
<?xml version="1.0"?> <a><b><c><d/></c></b></a>
...then Saxon produces this: (1(2(1(1)
...while Xalan produces this: (1.2.1.1)
Both answers seem perfectly reasonable to me, given the lack of clarity in the 1.0 spec.
Can anyone help me figure out which is (more) correct?
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: RE: RE: RE: RE: [xsl] GMT to BS, cknell | Thread | RE: [xsl] xsl:number question (XSLT, Michael Kay |
RE: [xsl] GMT to BST converter, Michael Kay | Date | Re: [xsl] Total number of pages wit, Jirka Kosek |
Month |