Changing XSLT generation in MapForce

665 Views Asked by At

I have a strange problem. I am generating an XSD to XSD mapping in MapForce and it is valid and producing output. However when the XSLT is utilized by our DataPower folks, they are saying the namespace prefixes in the XSLT are causing the code to not find the nodes in the incoming message.

For example in the XSLT, the select is:

<xsl:for-each select="ns0:costOrderHeaderLookupResponse/return/ns1:Order">

In the incoming message, the namespace prefix is as below:

*snip*
<return>
<ns2:Order BillToID="300850001000" DocumentType="0001"....*snip*>

However MapForce is generating the output just fine with no errors even with the namespace prefix difference.

The DataPower folks are requesting that instead of the namespace prefix I customize MapForce to output the nodes like this:

/*[local-name()='Order']

I read the MapForce documentation and googled for awhile but I am not finding a way to customize XSLT output like this. It is possible for C/Java/etc but I am not finding any help on changing how the XSLT is generated.

1

There are 1 best solutions below

1
On

Create a filter in MapForce and use a boolean function (like core:logical functions:equal) to check to see if the local-name of the node in the select (costOrderHeaderLookupResponse/return/Order) has a local-name equal to a constant string with value Order. The function to check for the local-name should be in the xslt:xpath functions library as local-name.

The filter should replace your connection from the Orders node to whatever node it is mapped to in the second XSD.

To see how filters work (assuming you aren't already using one to get your select) view http://manual.altova.com/Mapforce/mapforcebasic/index.html?mfffilteringdata.htm