[xsl] <xml:variable> alternative for msxml 2 parser

Subject: [xsl] <xml:variable> alternative for msxml 2 parser
From: "Nidhi Wadehra" <nwadehra@xxxxxxxxxxxxxxx>
Date: Thu, 26 Jul 2001 15:11:38 -0700
Hi,

I am using IE5 which comes with msxml ver 2.0.
Since <xml:variable> is not supported in this version what is the
alternative.

My problem is as follows :
I have an xml in the following format:
<todolist>
<activity>Leave Application
<record id="1">
<startdate>12/12/2001</startdate>
<enddate>12/12/2001</enddate>
<priority>low</priority>
<activityinstname>leave from nidhi</activityinstname>
<role>PM</role>
</record>
 <record id="2">
<startdate>12/12/2001</startdate>
<enddate>12/12/2001</enddate>
<priority>low</priority>
<activityinstname>leave from Raghvesh</activityinstname>
<role>PL</role>
</record>
</activity>

<activity>KMS
<record id="1">
<startdate>12/12/2001</startdate>
<enddate>12/12/2001</enddate>
<priority>low</priority>
<activityinstname>Fill form</activityinstname>
<role>PM</role>
</record>
 <record id="2">
<startdate>12/12/2001</startdate>
<enddate>12/12/2001</enddate>
<priority>low</priority>
<activityinstname>Update page</activityinstname>
<role>PL</role>
</record>
</activity>
</todolist>

Now I want to display all the activities it will not be a problem .
I can write my xsl as :

<xsl:for-each select="todolist">
<xsl:value-of select="activity"/>
</xsl:for-each select>

But now if I change the xml and instead of activity I make startdate as the
root tag then I want to display all my startdates. i.e. at run time I would
be changing my root node. Now can I write a generic XSL to display my root
nodes only. Since msxml 2 will not support <xml:variable> what other way can
i use to display my root nodes without hardcoding the node names in my xsl.

Any help would be appreciated

Thanks
Nidhi


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread