Answered Problem with map

  • Friday, September 21, 2012 7:25 PM
     
     

    Hi ,

    thanks for all, urgent heippppppppppppppppppp?

    <cs>

    <c a=1 b=2c=3>

    <c a=1 b=5c=3>

    <c a=2 b=4c=3>

    </cs>

    expeted output:

    <h>

    <b>

    <a>1</a>

    <b>2</b>

    <c>3</c>

    </b>

    <b>

    <a>1</a>

    <b>5</b>

    <c>3</c>

    </b>

    <c>

    <a>2</a>

    <b>4</b>

    <c>3</c>

    </c>

    </h>

    when write xslt got like this

    <h>

    <b>

    <a>1</a>

    <b>2</b>

    <c>3</c>

    </b>

    <b>

    a>1</a>

    <b>2</b>

    <c>3</c>

    </b>

    <c>

    <a>2</a>

    <b>4</b>

    <c>3</c>

    </c>

    </h>

     i wrote this script xsltcalltemplate: 

     


      <xsl:template name="b">

    <xsl:element name="a" namespace="http://d" >
            <xsl:value-of select="//s1:Cs/s1:C[@a =1]/@b"/>
          </xsl:element>

      </xsl:template >

    please help meeeeeeeee?

All Replies

  • Saturday, September 22, 2012 6:01 AM
    Moderator
     
     

    Hi Gurram,

    I've splitted your post because it is a new question. Please, mark the answers in your first post.

    Thank you for asking :) 


    Leonid Ganeline [BizTalk MVP] BizTalkien: Advanced Questions

  • Monday, September 24, 2012 8:29 AM
     
     Answered Has Code

    HI Gurram,

    As per your post, input

    <cs>
    <c a="1" b="2" c="3"/>
    <c a="1" b="5" c="3"/>
    <c a="2" b="4" c="3"/>
    </cs>

    Expected Output

    <h>
    <b>
    <a>1</a>
    <b>2</b>
    <c>3</c>
    </b>
    <b>
    <a>1</a>
    <b>5</b>
    <c>3</c>
    </b>
    <b>
    <a>2</a>
    <b>4</b>
    <c>3</c>
    </b>
    </h>

    This can be achieved by direct mapping as follows:

    Thanks,

    Deepthi

    • Proposed As Answer by Mazin Alassaf Tuesday, September 25, 2012 9:30 AM
    • Marked As Answer by LeoTangModerator Tuesday, October 02, 2012 10:11 AM
    •