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

How to use Multi-value Variables?

Subject: How to use Multi-value Variables?
From: David_Benua@xxxxxxxxxxxxxx
Date: Sun, 16 Jul 2000 20:57:06 -0400
multi value xml
I've been working on an XSLT Stylesheet that transforms one XML into another
(and I've been using Michael Kay's excellent book).

Here's what I'm trying to do:

In one section of the XML, I have a Node which specifies the connection
Parameters of a database
<Database>
     <Driver>....</Driver>
     <Server>....</Server>
     <Owner>....</Owner>
     <TableName>..... </TableName>
     etc.
</Database>

I want to replace some (but not all) of these Nodes.
I've defined a variable:
<xsl:variable name="NewDBMS">
     <Driver>....</Driver>
     <Server>....</Server>
     <Owner>.....</Owner>
</xsl:variable>

This variable works fine, in that I can take the <xsl:value-of
select="$NewDBMS/Server" /> and get the value of the new server (as defined in
my variable).
The next problem is to build a template that matches all children of Database
that where there is also a child if $NewDBMS with the same name.  It does not
seem that an <xsl:template  match=... /> statement does not allow for variables.

I can, of course, make this work by creating specific templates for each child
of $NewDBMS, but I'm searching for a more generic approach.

Any suggestions?

Dave Benua
Percussion Software



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


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.