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

Mixing sources to create a pattern

Subject: Mixing sources to create a pattern
From: "Andrew Ferk" <andrewferk@xxxxxxxxx>
Date: Mon, 22 Dec 2008 20:03:02 -0600
 Mixing sources to create a pattern
I have two standalone xml files, strucure.xml and data.xml.  I also
have the XSLT file layout.xsl.

layout.xsl is being applied to structure.xml, and data.xml is being
used in layout.xsl like below:

<xsl:variable name="data" select="document('data.xml')/data" />

In layout.xsl i'm in a loop below:

<xsl:for-each select="some_tag">
    <div id="{@id}" class="{$data/@id}">...</div>
</xsl:for-each>

So if structure.xml has <some_tag id="test_id" />
and data.xml has <data><test_id>test_class</test_id></data>
I want a transformation of <div id="test_id" class="test_class">...</div>.

Why does this not work and is their a solution to create a pattern
mixing these different xml sources?

Thank you.

--
Andrew Ferk

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-2011 All Rights Reserved.