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

Re: mapping attributes.

Subject: Re: mapping attributes.
From: Jamie <jamie@xxxxxxxxxx>
Date: Mon, 6 Nov 2000 17:08:08 -0800
Re: mapping attributes.
On Mon, Nov 06, 2000 at 07:06:25PM -0500, sara.mitchell@xxxxxxxxx wrote:
> I think I understand what you want, but the code you're showing
> doesn't seem to match. 

You're right, it doesn't match. (I was trying to save the list of a larger
XML document, most being irrelevant)

> What I think you want is to generate 
> the cross-reference where the <RELATED> element occurs and have the
> generated link contain the text of the title for the targeted 
> SECTION (based on matching the value of the ID attributes). 
> 
> If that is what you want, something like this ought to work:
> 
> <xsl:template match="RELATED">
> <xsl:variable name="target" select="@ID"/>
> <A HREF="#{@ID}>
>  <xsl:value-of select="//SECTION[@ID=$target]/TITLE"/>
> </A>
> </xsl:template>

A variant of this worked! Thanks to both who responded, I guess the trick was
in the variable. (I had thought variables needed to be evaluated in {}'s
which didn't seem work in Sablotron.)

Anyhow, the <xsl:variable name="target" select="@ID"/> was the "ah-hah!" in
this case. Thank you very much!

Jamie


 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.