S
Scott
I have an XML Document in a format like:
<Variable name="Bob">ABCDEFG</Variable>
<Variable name="Steve">QWERTYUI</Variable>
<Variable name="John">POIUYTR</Variable>
<Variable name="Tim">ZXCVBNM</Variable>
<Function id="1">
<Parameter type="String">Bob</Parameter>
<Parameter type="String">Steve</Parameter>
</Function>
<Function id="2">
<Parameter type="String">John</Parameter>
<Parameter type="String">Tim</Parameter>
</Function>
I am fairly new to doing transformations with XSLT, but so far I
haven't had luck in solving this problem. All I would like to do is
create a new XML output file where the variable declarations are gone,
and the actual values (like ABCDEFG) substituted for the names ("Bob")
for the "parameters." So basically I want the output to be:
<Function id="1">
<Parameter type="String">ABCDEFG</Parameter>
<Parameter type="String">QWERTYUI</Parameter>
</Function>
<Function id="2">
<Parameter type="String">POIUYTR</Parameter>
<Parameter type="String">ZXCVBNM</Parameter>
</Function>
I tried some of the code samples I found on the net regarding find and
replace routines, but I wasn't able to adapt them to this particular
problem.
Thanks in advance!
<Variable name="Bob">ABCDEFG</Variable>
<Variable name="Steve">QWERTYUI</Variable>
<Variable name="John">POIUYTR</Variable>
<Variable name="Tim">ZXCVBNM</Variable>
<Function id="1">
<Parameter type="String">Bob</Parameter>
<Parameter type="String">Steve</Parameter>
</Function>
<Function id="2">
<Parameter type="String">John</Parameter>
<Parameter type="String">Tim</Parameter>
</Function>
I am fairly new to doing transformations with XSLT, but so far I
haven't had luck in solving this problem. All I would like to do is
create a new XML output file where the variable declarations are gone,
and the actual values (like ABCDEFG) substituted for the names ("Bob")
for the "parameters." So basically I want the output to be:
<Function id="1">
<Parameter type="String">ABCDEFG</Parameter>
<Parameter type="String">QWERTYUI</Parameter>
</Function>
<Function id="2">
<Parameter type="String">POIUYTR</Parameter>
<Parameter type="String">ZXCVBNM</Parameter>
</Function>
I tried some of the code samples I found on the net regarding find and
replace routines, but I wasn't able to adapt them to this particular
problem.
Thanks in advance!