Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Mapping question
- This topic has 2 replies, 1 voice, and was last updated 9 years ago by
community-content.
-
AuthorPosts
-
-
March 22, 2006 at 10:30 AM #13216
Hi,
I want to map this input:
<field name=\”name\”>Gordon</field>
<field name=\”firstName\”>Slash</field>to this output:
<name>Gordon, Slash</name>
Can anybody tell me if this can be accomplished using functoids?
Thanx in advance
Slash
P.S.: I have posted this already in the Microsoft Biztalk Discussion Group, see
-
March 22, 2006 at 6:27 PM #13217
Hi,
thank you very much, this worked fine, except for this change:
<ns1:docId xmlns:ns1=\”http://xml.alien.de/schema/alienformat/1.0\”
xmlns:ns0=\”http://xml.connect.de/schema/xmlgateway/1.0\”><xsl:value-of select=\”ns0:field[@name =’z_nummer’]\”/>-<xsl:value-of select=\”ns0:field[@name =’z_index’]\”/>
</ns1:docId>
I had to remove the path in the \”value-of-select\”-Statement, because my field elements where part of repeating <object>-Elements one section higher,
when I used the full path, for each object the same \”z_nummer\” field content was used, although it differed in the source file.Cheers and thanx
Slash
-
March 22, 2006 at 11:42 AM #13218
The problem with the value mapping is the loop, so each field element is processed separately as you surmised in your other post.
The simplest answer using functoids is to use a scripting functoid with Inline XSLT. There is no input parameter, but the output is connected to the <name> element in the destination schema.
Here is an example of what the code will look like, however the <name> element and select xpath strings will be different depending on your input and output schemas.
[code:1:f57078d006]<name>
<xsl:value-of select=\"/Root/field[@name =’name’] \"/>, <xsl:value-of select=\"/Root/field[@name = ‘firstName’]\"/>
</name>[/code:1:f57078d006]
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.