Hello everyone,
I have a situation here where I would like to send a different message when a particular condition is met.
For example:
if a shipment refnum value = ABC
then use template A
or if a shipment refnum value = DEF
then use template A
or if a shipment refnum value = GHI
then use template A
otherwise use template B
So far I have been able to get it to work with one condition...
if shipment ship unit item tag = ABC
then use template A
otherwise use template B
I have not been able to get it working with multiple conditions, however. In my code for multiple conditions I'm checking on shipment ship unit item tags and shipment refnum values.
Below is an excerpt from my XSL code. Anyone know why this isn't working for me? It seems to be going straight to the "otherwise" statement when I know that it should be using one of the "when" statements.
<xsl:choose>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipUnit/ShipUnitContent/ItemQuantity/ItemTag2='ABC'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipmentHeader/ShipmenRefnumQualifierGid/ShipmentRefnumValue='ABC'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipmentHeader/ShipmenRefnumQualifierGid/ShipmentRefnumValue='DEF'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipmentHeader/ShipmenRefnumQualifierGid/ShipmentRefnumValue='GHI'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl
therwise>
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="$message"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="$includeReplyBy"/>
</xsl:call-template>
</xsl
therwise>
Thanks in advance for the help!!!
I have a situation here where I would like to send a different message when a particular condition is met.
For example:
if a shipment refnum value = ABC
then use template A
or if a shipment refnum value = DEF
then use template A
or if a shipment refnum value = GHI
then use template A
otherwise use template B
So far I have been able to get it to work with one condition...
if shipment ship unit item tag = ABC
then use template A
otherwise use template B
I have not been able to get it working with multiple conditions, however. In my code for multiple conditions I'm checking on shipment ship unit item tags and shipment refnum values.
Below is an excerpt from my XSL code. Anyone know why this isn't working for me? It seems to be going straight to the "otherwise" statement when I know that it should be using one of the "when" statements.
<xsl:choose>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipUnit/ShipUnitContent/ItemQuantity/ItemTag2='ABC'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipmentHeader/ShipmenRefnumQualifierGid/ShipmentRefnumValue='ABC'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipmentHeader/ShipmenRefnumQualifierGid/ShipmentRefnumValue='DEF'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="/notify/Blob/xml/TenderOffer/Shipment/ShipmentHeader/ShipmenRefnumQualifierGid/ShipmentRefnumValue='GHI'">
<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="string('message.TenderResponseNotNeeded')"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="string('N')"/>
</xsl:call-template>
</xsl:when>
<xsl

<xsl:call-template name="tenderHeader">
<xsl:with-param name="mes" select="$message"/>
<xsl:with-param name="incURL" select="$includeURL"/>
<xsl:with-param name="incReplyBy" select="$includeReplyBy"/>
</xsl:call-template>
</xsl

Thanks in advance for the help!!!
Comment