Mapping question

Home Page Forums BizTalk 2004 – BizTalk 2010 Mapping question

Viewing 1 reply thread
  • Author
    Posts
    • #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

      http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.biztalk.general&tid=5d817bb7-0625-48e4-ae8e-0a203052df8e&cat=en_US_422645f0-7d49-4b02-8fbc-55867e389462&lang=en&cr=US&sloc=en-us&m=1&p=1

    • #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

      • #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]

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.