[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Question: Change string to nodeset for dynamic xml lookup

Subject: [xsl] Question: Change string to nodeset for dynamic xml lookup
From: "Ouen Worth" <oworth@xxxxxxxxxxx>
Date: Thu, 15 Jan 2004 20:10:01 +0200

I have tried to find a solution to this and it seems to be that I need to
use the xsl:key and key function, but I have had no luck

Here is what I am trying to do so far without the key. 

I am trying to create an output xml that is formed by a xsl that references
a xml that contains definition data for retrieving data from an external xml

The reason for this is so that there is an easy to create xml definition
file that can be created from csv - which can be maintained by xml
illiterate personal - which is then used to validate external xml for
business rule purposes. The value of the external element needs to be
included in the output xml for this reason.

However, the Value element always contains the value of the Xpath element
and not the value of the element that the string in Xpath refers to in the
external xml.

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
	<xsl:variable name="Order" select="document('Order.xml')/Order"/>
	<xsl:template match="/">
			<xsl:for-each select="StandardCheck/Definition">
name="XPath" select="XPath"/>
	<xsl:template match="Order">
		<xsl:param name="XPath"></xsl:param>
		<xsl:value-of select="$XPath"/>

<?xml version="1.0"?>
<StandardCheck DocType="Order">

<?xml version="1.0"?>

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Current Thread