[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How to use Multi-value Variables?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|