Hi there,
I'm hoping someone can help me.
I have a transform XSLT that takes the standard AX picklist and transforms it into a format that the external warehouse can use.
Everything is in the transformed document and it looks great if viewed in a browser but if you look at it with Notepad you can see that there is an extra line feed after the Item long code that the receiving warehouse cannot cope with.
If I look at the document log in the System Administration -> Periodic -> Services and AIf -> history and view the XML, the standard AX document does not appear to have this extra line feed.
If I save the document from here and open it with Notepad it doesn't have the extra line feed. If I take the transform off the outbound port it doesn't have the extra line feed so I can only conclude the XSLT is incorrect in some way.
The item longcode is an extra field that is loaded in a parm method (parmPT_longcode) on the AXwmsOrderTrans and effectively returns
ItemId_ConfigId_InventColorID_inventsizeId_inventLocationId
It's pretty hard to cut and paste in this tiny response box but the transform document was originally created with altova software and looks like below.
Any suggestions would be greatfully appreciated as I'm not sure what to try next.
Thanks
Paulina
<xsl:stylesheet version="1.0" xmlns:xsl="www.w3.org/.../Transform" xmlns:ns0="schemas.microsoft.com/.../PickingList" xmlns:ns1="schemas.microsoft.com/.../Message" xmlns:xs="www.w3.org/.../XMLSchema" exclude-result-prefixes="ns0 ns1 xs">
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ORDERS>
<xsl:attribute name="xsi:noNamespaceSchemaLocation" namespace="www.w3.org/.../xsl:attribute>
<xsl:for-each select="ns1:Envelope">
<xsl:variable name="WMSPickingRoute" select="ns1:Body/ns1:MessageParts/ns0:PickingList/ns0:WMSPickingRoute"/>
<xsl:variable name="WMSOrderTrans" select="$WMSPickingRoute/ns0:WMSOrderTrans"/>
<ORDER>
<ORDER_NUMBER><xsl:value-of select="string($WMSPickingRoute/ns0:PickingRouteID)"/></ORDER_NUMBER>
<ACCOUNTID><xsl:value-of select="string($WMSPickingRoute/ns0:Customer)"/></ACCOUNTID>
<REQUESTED_SHIPPING_DATE> <xsl:value-of select="string($WMSPickingRoute/ns0:DlvDate)"/></REQUESTED_SHIPPING_DATE>
<EXTERNAL_ORDER_ID><xsl:value-of select="string($WMSPickingRoute/ns0:TransRefId)"/></EXTERNAL_ORDER_ID>
<CURRENCY><xsl:value-of select="string($WMSPickingRoute/ns0:PT_Cur)"/></CURRENCY>
<PO_NUMBER><xsl:value-of select="string($WMSPickingRoute/ns0:PT_CustomerRef)"/></PO_NUMBER>
<ORDER_DATE><xsl:value-of select="string($WMSPickingRoute/ns0:ActivationDateTime)"/></ORDER_DATE>
<FREIGHT_TERMS>X</FREIGHT_TERMS>
<CARRIER_ACCOUNT_NUMBER>X</CARRIER_ACCOUNT_NUMBER>
<DESTINATION>
<NAME><xsl:value-of select="string($WMSPickingRoute/ns0:DeliveryName)"/></NAME>
<ADDRESS1><xsl:value-of select="string($WMSPickingRoute/ns0:PT_DlvAddress1)"/></ADDRESS1>
<ADDRESS2><xsl:value-of select="string($WMSPickingRoute/ns0:PT_DlvAddress2)"/></ADDRESS2>
<CITY><xsl:value-of select="string($WMSPickingRoute/ns0:PT_DlvCity)"/></CITY>
<COUNTRY><xsl:value-of select="string($WMSPickingRoute/ns0:PT_DlvCountry)"/></COUNTRY>
<STATE_PROVINCE><xsl:value-of select="string($WMSPickingRoute/ns0:PT_DlvState)"/></STATE_PROVINCE>
<POSTAL_CODE><xsl:value-of select="string($WMSPickingRoute/ns0:PT_DlvZipCode)"/></POSTAL_CODE>
<PHONE1><xsl:value-of select="string($WMSPickingRoute/ns0:PT_Phone1)"/></PHONE1>
</DESTINATION>
<xsl:for-each select="$WMSOrderTrans">
<ITEMS>
<ITEM>
<INVENT_TRANS_ID><xsl:value-of select="string(ns0:InventTransId)"/> </INVENT_TRANS_ID>
<ITEM_NUMBER> < xsl:value-of select="string(ns0:PT_Longcode)"/></ITEM_NUMBER>
<QUANTITY><xsl:value-of select="string(floor(number(string(ns0:Qty))))"/></QUANTITY>
<UNIT_PRICE>0.00</UNIT_PRICE>
<TAXES>
<TAX>
<TYPE></TYPE>
<AMOUNT>0.00</AMOUNT>
</TAX>
</TAXES>
<DUTIES>
<DUTY>
<TYPE></TYPE>
<AMOUNT>0.00</AMOUNT>
</DUTY>
</DUTIES>
<ITEM_TOTALS>
<SUB_TOTAL>0.00</SUB_TOTAL>
<TAX_TOTAL>0.00</TAX_TOTAL>
<DUTIES_TOTAL>0.00</DUTIES_TOTAL>
<GRAND_TOTAL>0.00</GRAND_TOTAL>
</ITEM_TOTALS>
</ITEM>
</ITEMS>
</xsl:for-each>
<ORDER_TOTALS>
<SUB_TOTAL>0.00</SUB_TOTAL>
<TAX_TOTAL>0.00</TAX_TOTAL>
<DUTIES_TOTAL>0.00</DUTIES_TOTAL>
<GRAND_TOTAL>0.00</GRAND_TOTAL>
</ORDER_TOTALS>
</ORDER>
</xsl:for-each>
</ORDERS>
</xsl:template>
</xsl:stylesheet>
*This post is locked for comments
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator