[Home] [By Thread] [By Date] [Recent Entries]


Hi Ravi,

Questions about XSLT should really go to XSL-List
(http://www.mulberrytech.com/xsl/xsl-list).

> Note: the "value" attribute of "TaxOutOfCountryFlag" is changing.

You can test whether the current element has a TaxOutOfCountryFlag
child element with the simple expression:

  TaxOutOfCountryFlag

There are several ways that you could use this test to get what you
want. Probably the simplest is something like:

<xsl:template match="SendTaxRequest">
  <SendTaxRequest>
    <element name="TransactionIdentifier" type="ebsidicString"
             totalDigits="4" value="TX03"/>
    <element name="BusinessDayDate" type="date" totalDigits="8"
             value="{BusinessDayDate}"/>
    <element name="TaxOutOfCountryFlag" type="ebsidicString"
             totalDigits="1" value="N">
      <xsl:if test="TaxOutOfCountryFlag">
        <xsl:attribute name="value">Y</xsl:attribute>
      </xsl:if>
    </element>
  </SendTaxRequest>
</xsl:template>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member