|
Subject: RE: variable and match From: Ross Cormier <merex@xxxxxxxx> Date: Fri, 12 May 2000 07:34:34 -0500 |
Thanks, Ross
After Transform:
<ROWSET>
<NEWELEMENT>
<DATA1>data1</DATA1>
<DATA1>data1</DATA1>
</NEWELEMENT>
</ROWSET>Another example:
<ROWSET>
<REPLACE EL="BAZ"/>
<BAZ>
<DATA1>data1</DATA1>
<DATA1>data1</DATA1>
</BAZ>
</ROWSET>After Transform:
<ROWSET>
<NEWELEMENT>
<DATA1>data1</DATA1>
<DATA1>data1</DATA1>
</NEWELEMENT>
</ROWSET>> Can I use a variable in the match part of xsl:template? > > > <xsl:variable name="x" select="/ROWSET/REPLACE/@EL"/> > <xsl:template match="/ROWSET/{$x}">
No, you can't, neither can you use curly braces. In any case, you've got the wrong model of what variables are: you can't use them to do textual substitution of one bit of XPath syntax into another bit of XPath syntax.
Mike Kay
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: variable and match, Kay Michael | Thread | Re: variable and match, Eric van der Vlist |
| conversion of xml document using XS, satish gvs | Date | Re: variable and match, Eric van der Vlist |
| Month |