Skip to content

Instantly share code, notes, and snippets.

@CoditCompany
Created December 17, 2018 15:02
Show Gist options
  • Save CoditCompany/690abcb37daa7968811073628822a86f to your computer and use it in GitHub Desktop.
Save CoditCompany/690abcb37daa7968811073628822a86f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0" xmlns:s0="http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/s0:EFACT_D96A_ORDERS_EAN008" />
</xsl:template>
<xsl:template match="/s0:EFACT_D96A_ORDERS_EAN008">
<order>
<reference>
<xsl:value-of select="s0:BGM/BGM02" />
</reference>
<customer>
<xsl:value-of select="s0:NADLoop1[s0:NAD/NAD01='BY']/s0:NAD/s0:C080/C08001"/>
</customer>
<xsl:for-each select="s0:LINLoop1">
<orderLines>
<productCode>
<xsl:value-of select="s0:LIN/s0:C212/C21201"/>
</productCode>
<quantity>
<xsl:value-of select="s0:QTY_3/s0:C186_3/C18602"/>
</quantity>
<price>
<xsl:value-of select="s0:PRILoop1/s0:PRI/s0:C509/C50902"/>
</price>
</orderLines>
</xsl:for-each>
</order>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment