SilverStray
Programmer
Hi,
Since XSL is supposed to be for formatting XML data, is it possible for me to create 2 entirely different templates for the same XML node, or for the 'assyData' node as in the example below? And if so, how do I call which template?
Here is a compressed version of my XSL code:
<xsl:template match="/">
<xsl:if test="//step/name=='WIRE_BOND'">
<xsl:apply-templates select='assyData'/>
</xsl:if>
</xsl:template>
I'd like to add another if-test in the code above, which will check if the step name is DIE_BOND, and if so, it will call a different template for assyData, but how?
If it could be more helpful, i put below the sample XML code.
-<step>
<name>WIRE_BOND</name>
<desc>Wirebonding Process</desc>
-<assyStepData>
-<assyData>
<compType>WIRE</compType>
..more elements here...
</assyData>
-<assyData>
<compType>EPOXY</compType>
</assyData>
</assyStepData>
</step>
-<step>
<name>DIE_BOND</name>
<desc>Wirebonding Process</desc>
..more elements here...
</step>
Hope you could help!
Thanks!
J. Echavez
Since XSL is supposed to be for formatting XML data, is it possible for me to create 2 entirely different templates for the same XML node, or for the 'assyData' node as in the example below? And if so, how do I call which template?
Here is a compressed version of my XSL code:
<xsl:template match="/">
<xsl:if test="//step/name=='WIRE_BOND'">
<xsl:apply-templates select='assyData'/>
</xsl:if>
</xsl:template>
I'd like to add another if-test in the code above, which will check if the step name is DIE_BOND, and if so, it will call a different template for assyData, but how?
If it could be more helpful, i put below the sample XML code.
-<step>
<name>WIRE_BOND</name>
<desc>Wirebonding Process</desc>
-<assyStepData>
-<assyData>
<compType>WIRE</compType>
..more elements here...
</assyData>
-<assyData>
<compType>EPOXY</compType>
</assyData>
</assyStepData>
</step>
-<step>
<name>DIE_BOND</name>
<desc>Wirebonding Process</desc>
..more elements here...
</step>
Hope you could help!
Thanks!
J. Echavez