|
Subject: How to use Multi-value Variables? From: David_Benua@xxxxxxxxxxxxxx Date: Sun, 16 Jul 2000 20:57:06 -0400 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: How to create active hyperlinks, Charles Cantrell | Thread | RE: How to use Multi-value Variable, Kay Michael |
| Re: "Simple" matrix transformation, Paul Tchistopolskii | Date | external parameters like DOS Comman, Jean-Claude Tarby |
| Month |