|
Subject: Can't use 'id' function in XT 19990725 From: "Harbarth, Juliane" <jhb@xxxxxxxxxxxxxx> Date: Tue, 27 Jul 1999 15:06:26 +0200 |
I have an XML instance that makes use of the ID/IDREF
attributes to establish links within the document, e.g.
the document contains '<section1 id="Test1">' as well as
'<ref idref="Test1"/>'.
In addition, I have an XSL stylesheet that converts the
link-ends to '<A name=...' and the link-starts to
'<A href=...'. The content of the latter is set to "( -> "
plus the content of the 'header' element of the link-end,
i.e. the link-starts are converted as follows :
<xsl:template match="ref">
<xsl:variable name="targetid"><xsl:value-of
select="@idref"/></xsl:variable>
<xsl:element name="A">
<xsl:attribute name="href">#<xsl:value-of
select="$targetid"/></xsl:attribute>
( -> <xsl:value-of select="//node()[@id=$targetid]/header"/>)
</xsl:element>
</xsl:template>
This works nicely, but if I replace "//node()[@id=$targetid]"
with "id($targetid)" which (to my understanding) amounts to the
same thing, it does not work. The node with id equal to $targetid
is not found. What am I getting wrong ?
I would gladly send the files (XML, XSL, and DTD) to anybody
interested.
Regards,
Juliane Harbarth
Technical Consultant
Software AG Germany
mailto:jhb@xxxxxxxxxxxxxx
Tel +49 (0)6151 92 1147
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: effective use of parameters and, Kara Lee | Thread | Re: Can't use 'id' function in XT 1, Chris Maden |
| effective use of parameters and/or , Linda van den Brink | Date | Re: A Query, Imran Rashid |
| Month |