|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath 1.0 id() function
Hi all,
I am using fop 0.20.5 with xalan 2.4.1. For an XML Element that looks like
this:
<doclink target.id="ID001">Text here</doclink>
I have a stylesheet snippet that looks like this:
<xsl:variable name="target" select="@target.id"/>
<xsl:variable name="xlabel">
<xsl:value-of select="id($target)/@xreflabel"/>
</xsl:variable>
For some reason, this second variable declaration doesn't work (i.e. no
data is assigned to it). I have to resort to this:
<xsl:variable name="xlabel">
<xsl:for-each select="//*[@id = $idd]">
<xsl:value-of select="@xreflabel"/>
</xsl:for-each>
</xsl:variable>
After poking around the archives of the Xalan mailing list, it was
suggested somewhere that the id() function only works when the DTD is
declared in the XML Document. Does anyone know if this is true? Does
anyone else have issues with the id() function using other processors?
TIA
Nadia
|
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








