Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

XSLT functions when using XSLT Translations in AX 2009

$
0
0

Hello,

I use in Job's X++ code XSLT transformation. XSLT file contains also XSLT's functions.

How these functions should be declared in AX 2009 XSLT file because e.g when using replace function a running job gives a error message:

'replace()' is an unknown XSLT function.

X++ code is following:

xmlDoc = new XmlDocument();
xmlDoc.loadXml(aifXMl);
xslDocument = new XmlDocument();
xslDocument.load(@"C:\Data\Transform.xsl");
xmlTransfornedDoc = XSLFileTransform.transformXmlDocument(xmlDoc, xslDocument);

and in XSL file

<OrganisationUnitNumber>
<xsl:variable name="OVT" select="doc:MyDocs/doc:Invoice/doc:Code"/>
<xsl:choose>
<xsl:when test="contains($OVT, '-')">
<xsl:value-of select="concat('0088', replace($OVT,'-',''))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('0088', $OVT)"/>
</xsl:otherwise>
</xsl:choose>
</OrganisationUnitNumber>

In XSLT editor environment this works well.

Best Regards,

Michael


Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>