on 06-22-2011 1:05 PM
Hi All
I am facing a strange issue I need to change the existing XSL .I have tested the xsl with xslt tool it is working fine but
when i copy the same code and test in the PI 7.1 it is not working as expected
The below code is working fine with the xslt tool but not in PI 7.1
<xsl:choose>
<xsl:when test= "//ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID <= 1799 and //ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID >= 1700">
<xsl:value-of select="'test'"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID"/>
</xsl:otherwise>
</xsl:choose>
Thanks
Jayaraman
Hi Jayaraman,
whenever you are printing the value of test after testing it using "xsl:value-of" then that should be within a xml tag in the target structure. This will work fine with XML editor without errors but PI will show you error, thus I expect code something like this below. Here only tag I have included is "price" as example.
<xsl:choose>
<xsl:when test= "//ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID <= 1799 and //ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID >= 1700">
<price>
<xsl:value-of select="'test'"/>
</price>
</xsl:when>
<xsl:otherwise>
<price>
<xsl:value-of select="//ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID"/>
</price>
</xsl:otherwise>
</xsl:choose>
You need to replace the "price" tag with proper xml field in target structure. Secondly please re-check the Xpath expression properly to ensure you are reaching the correct tag in source. That could be another reason of error.
regards
Anupam
Edited by: anupamsap on Jun 22, 2011 2:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.