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

Merging data on attributes, revisited

Subject: Merging data on attributes, revisited
From: "Bob Portnell" <simply.bobp@xxxxxxxxx>
Date: Thu, 24 Aug 2006 11:32:49 -0700
attributes revisited
Whoo! I think I managed to work it out on my own. The key and template
on the stylesheet change to...

<xsl:key name="data" match="data" use="@id"/>

(We key on the parent element directly...)

<xsl:template match="svg:text[.=('data')]">
(Look for parent elements with our data placeholder)
	<text>
		<xsl:copy-of select="@*"/>
		<xsl:value-of select="key(.,../@id,doc('textsrc.xml'))"/>

(And then this key (matching to the @id in the parent of our svg:text
element) gives us back the contents of the text file parent element
... which is the values of the children elements)

	</text>
</xsl:template>

Yee-ha! :-)

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.