[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Can't use 'id' function in XT 19990725

Subject: Can't use 'id' function in XT 19990725
From: "Harbarth, Juliane" <jhb@xxxxxxxxxxxxxx>
Date: Tue, 27 Jul 1999 15:06:26 +0200
can t use id xml
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.