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

RE: Value-of varible question

Subject: RE: Value-of varible question
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sat, 17 Apr 2004 09:32:37 +0100
xsl varible
> It seams that its is using the value of one for both. I just 
> want to return
> the one that lang matches. Any idea on what im doing wrong?

> > <xsl:template match="Title">
> > 		<Title>
> > 			<xsl:copy-of
> > select="/iThink.ePulp/Page/Content/Meta/Title[@lang=$local]"/>
> > 		</Title>
> > 	</xsl:template>

I don't think you have really understood template rules and path
expressions. Every time this encounters a Title element, it is selecting all
the Title elements with the appropriate language and copying them. So if you
have 5 relevant titles in your document, you are going to output 25 titles.

It might be a good idea to put down your coding pencil for a few hours and
do some reading.

Michael Kay

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.