Mapping Question

Home Page Forums BizTalk 2004 – BizTalk 2010 Mapping Question

Viewing 3 reply threads
  • Author
    Posts
    • #19506

      Hi

      I have a schema that  has  a repeating  structure

      <PAGE number=1>
          <TBox id=”1″>

         <Value>Some Data</Value>
           </TBox>

      </PAGE>

       

      How do I use the Mapper so that When Page=1 get the Value of TBox when Id = 63 as an example?

      It seems doable….

      Thanks Mike

    • #19510

      Everything is doable, but it needs time and effort!

       

      you may use custom XSLT in your map, and write the XSLT manually.

      you may find this article useful

      Hope it helps,

      Mike

    • #19514

      Mike,

      Have a look at a previous response to a similar question on this forum at http://www.biztalkgurus.com/forums/t/9651.aspx

      However, you will need to modify the XSLT so that it reads:

      <xsl:value-of select=”//Page[@number = 1]/TBox[@id = 63]/Value” />

      Note: this just returns the value of the <Value> element only where Page = 1 and TBox = 63

      Regards, Nick.

      • #19515

        Just a small comment on that –

        If you can, you should avoid using ‘//’ in xpaths anywhere.

        In many cases this is just laziness which results in a significant performance hit.

        when you use ‘//’ the xsl engine has to scan the entire document to find ‘Page’ elmenets; if you know where they exist in the document you should specify that explicitly.

        • #19524

          Anon,

          Thanks for the comment re. the double-slash. I’ve never used inline-xslt in anger before, I’ve always gone to straight custom XSLT files where I can do (for example):

          /ns0:Root/ns0:child/ns0:value

          However, when I put together a test project for this post, I discovered that that wasn’t accepted. A blog post I found suggested that the double slashes was the answer. I’ll bear the performance issue in mind in the future.

          Cheers, Nick.

    • #19519

      Thanks for the help! That is what I suspected.

      Mike

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