This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
node-set
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] node-set
- From: "Clark, Jason" <jason dot clark at tfn dot com>
- Date: Sun, 1 Jul 2001 08:32:18 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hello everyone,
Im having problems selecting a nodeset with the node-set() in msxml3. Im
not getting an "Reference to variable or parameter must evaluate to a node
list" error but It doesnt seem to select the node. Working xml/xsl below.
XML
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test.xsl"?>
<data>
<comparePe>
<qtr1>
<peer1>MSFT</peer1>
<peer2>IBM</peer2>
</qtr1>
<qtr2>
<peer1>SUNW</peer1>
</qtr2>
</comparePe>
<compareESP>
<yr1>
<peer1>MSFT</peer1>
</yr1>
</compareESP>
</data>
-----------------------------------
XSL
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt">
<xsl:param name="peerPath" select="'comparePe'" />
<xsl:param name="quarterYear" select="'qtr1'" />
<xsl:template match="data">
<html>
<head>
<title></title>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<xsl:call-template name="createPeerTable">
<xsl:with-param name="peerPath" select="$peerPath" />
<xsl:with-param name="quarterYear" select="$quarterYear" />
</xsl:call-template>
</tr>
</table>
</body>
</html>
</xsl:template>
<xsl:template name="createPeerTable">
<xsl:param name="peerPath" />
<xsl:param name="quarterYear" />
<xsl:variable name="peerFullPath"
select="concat($peerPath,'/',$quarterYear)" />
<td><xsl:value-of select="msxsl:node-set($peerFullPath)/peer1" /></td>
</xsl:template>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list