[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Saxon 6.5.5 v Saxon-EE

Subject: Re: [xsl] Saxon 6.5.5 v Saxon-EE
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 18 Jun 2012 14:47:27 +0100

As David Carlisle says, the id() function is sensitive to variations in how the XML is parsed, and in particular how the DTD is handled. In general I would avoid it for this reason: use key() instead. The exceptions are (a) if your ID attributes are named xml:id, and (b) if you are running schema-aware with the ID attributes declared as xs:ID in the schema; but even then, using key() is more interoperable.

Michael Kay

On 18/06/2012 13:59, Flanders, Charles E (US SSA) wrote:
Can someone please explain to me why this code:

    <xsl:text disable-output-escaping="yes">Figure&#38;#x00A0;</xsl:text>
       <xsl:for-each select="id(@assocfig)">
          <xsl:number count="figure" format="1" from="//ginfowp | //maintwp | //thrywp | //ctrlindwp" level="any"/>

Produces the expected result when I use Saxon 6.5.5 but produces no output when I use Saxon-EE with Oxygen 13? Specifically the use of the id() function.

I have other instances in the style sheets using the id() function where the same problem arises.


C Flanders

Current Thread