SilverStray
Programmer
Hi,
I'd like to know how, if even possible, to access XML data in the upper node when I am working on a XSL template for the XML's lower node. For the XML code below, I have the excerpt of the XSL template match for the node 'assyData'.
--XML Code---
-<step>
<name>SAW</name>
<desc>Sawing Process</desc>
-<assyStepData>
-<assyData>
<compType>DIE</compType>
<soRemarks>Die in Saw Remarks</soRemarks>
<operInstruction>Die in Saw Instruction</operInstruction>
<ppData />
</assyData>
-<assyData>
<compType>ANGEL</compType>
<soRemarks>Dummy Saw SO Remarks</soRemarks>
<operInstruction>Dummy Saw Instruction</operInstruction>
<ppData />
</assyData>
</assyStepData>
</step>
->>>>And here's my XSL Code:
<xsl:template match="assyData">
<xsl:template match="assyData">
<xsl:choose>
** <xsl:when test="../name='SAW'">
<xsl:text>SAW:</xsl:text>
<xsl:value-of select="soRemarks"/>
</xsl:when>
<xsl
therwise>
<xsl:value-of select="soRemarks"/>
</xsl
therwise>
</xsl:choose>
</xsl:template>
** In the problem area I pointed above, what I wanted
to do is to put a condition if the value of name in
the upper node under step is 'SAW'. But the portion
<xsl:when test="../name='SAW'">
obviously is not the right way for me in doing the
test condition.
Can anybody help me how i may do this?
thanks in advance.
*joni
I'd like to know how, if even possible, to access XML data in the upper node when I am working on a XSL template for the XML's lower node. For the XML code below, I have the excerpt of the XSL template match for the node 'assyData'.
--XML Code---
-<step>
<name>SAW</name>
<desc>Sawing Process</desc>
-<assyStepData>
-<assyData>
<compType>DIE</compType>
<soRemarks>Die in Saw Remarks</soRemarks>
<operInstruction>Die in Saw Instruction</operInstruction>
<ppData />
</assyData>
-<assyData>
<compType>ANGEL</compType>
<soRemarks>Dummy Saw SO Remarks</soRemarks>
<operInstruction>Dummy Saw Instruction</operInstruction>
<ppData />
</assyData>
</assyStepData>
</step>
->>>>And here's my XSL Code:
<xsl:template match="assyData">
<xsl:template match="assyData">
<xsl:choose>
** <xsl:when test="../name='SAW'">
<xsl:text>SAW:</xsl:text>
<xsl:value-of select="soRemarks"/>
</xsl:when>
<xsl

<xsl:value-of select="soRemarks"/>
</xsl

</xsl:choose>
</xsl:template>
** In the problem area I pointed above, what I wanted
to do is to put a condition if the value of name in
the upper node under step is 'SAW'. But the portion
<xsl:when test="../name='SAW'">
obviously is not the right way for me in doing the
test condition.
Can anybody help me how i may do this?
thanks in advance.
*joni