cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping Issue

Former Member
0 Kudos

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 &lt;= 1799 and //ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID &gt;= 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

Accepted Solutions (1)

Accepted Solutions (1)

anupam_ghosh2
Active Contributor
0 Kudos

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 &lt;= 1799 and //ReplenishmentOrder/Item/ShipToLocation/InternalID/@schemeAgencyID &gt;= 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

Answers (0)