Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6613699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:14:59+00:00 2026-05-25T20:14:59+00:00

I’m trying to map two documents witht the BizTalk Mapper and my target document

  • 0

I’m trying to map two documents witht the BizTalk Mapper and my target document should look like this:

<root>
  <complexType>
     <property>example</property>
  </complexType>
  <filler>
     <padding>9999999</padding>
  </filler>
  <filler>
     <padding>9999999</padding>
  </filler>
  <filler>
     <padding>9999999</padding>
  </filler>
</root>

The number of <filler> nodes that I should create is variable (from 0 to 9). It is basically the result of a calculation (based on some data provided in the source document).

Is there a way to create those <filler> nodes with some combination of functoids?

I tried to use the Table Looping functoid (created a table with only one column, the padding char ‘9’) but doesn’t really work because it creates as many <filler> nodes as rows are defined in the table, which is not what I want since the number of rows would have to be variable (again, based on a calculation).
What I currently do is pass the message (XmlDocument) to a C# method and then I programmatically append the <filler> nodes.
I’m hoping that there is a more “BizTalk-y” way of doing this with the Mapper.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:14:59+00:00Added an answer on May 25, 2026 at 8:14 pm

    As pointed out, XSLT can create nodes on the target document at will (I didn’t know this and this was the key part).
    Turns out that what I needed is a simple for-loop in XSLT. Once I realized this, a quick Google search yielded the following results:

    http://quomon.com/question-How-to-make-a-for-loop-in-xslt-not-for-each-809.aspx

    http://snippets.dzone.com/posts/show/930

    Another thing worth noting is that (as pointed out by the first link), XSLT is a functional language, not procedural, so sometimes you do have to resort to using recursion or an extension.
    This case is definitely one of those times since I couldn’t use a careful selection of nodes using the select attribute on an xsl:for-each (since this filler data wasn’t part of the source document).

    Specifically, for this case, what I did was:

    Add a Scripting functoid.
    Add two inputs:

    • A constant with value “1” (this is the initial value of the i variable)
    • The length of the loop (number of times to repeat the body of the loop)

    Paste the following XSLT template as an “Inline XSLT Call Template” script:

    <xsl:template name="ForLoop"> 
    <xsl:param name="i" />      <!-- index counter, 1-based, will be incremented with every recursive call -->
    <xsl:param name="length" /> <!-- exit loop when i >= length -->
    
    <!-- Output the desired node(s) if we're still looping -->
    <!-- The base case is when i > length (in that case, do nothing) -->
    <xsl:if test="$i &lt;= $length"> 
    <Filler>
        <Padding>999999</Padding>
    </Filler>
    </xsl:if> 
    
    <!-- Call the ForLoop template recursively, incrementing i -->
    <xsl:if test="$i &lt;= $length"> 
    <xsl:call-template name="ForLoop"> 
    <xsl:with-param name="i"> 
    <xsl:value-of select="$i + 1"/> 
    </xsl:with-param> 
    <xsl:with-param name="length"> 
    <xsl:value-of select="$length"/> 
    </xsl:with-param> 
    </xsl:call-template> 
    </xsl:if> 
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.