Skip to Content
author's profile photo Former Member
Former Member

XSL with repeating item-lines processes only the first item

Hi all,

I am a novice to XSLT. I have created an XSL which looks roughly as follows:

<xsl:template match="/">

<ns0:MT_messagetype....>

---<Header>

-


<tag1>

-


<tag2>

---</Header>

--<Item>

-


<tag a>

-


<tag b>

-


<etc>

---</Item>

</ns0:...>

</xsl:template>

Now when I import this as an imported archive in XI and test it, only the first item is mapped via this XSL. I have multiple item-lines off course. How must I tell this XSL that the Item-tag is repeating?

Thanks in advance!

William

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Jun 18, 2008 at 02:20 PM

    <?xml version='1.0' ?>

    http://www.w3.org/1999/XSL/Transform">

    <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />

    <xsl:template match="/">

    <xsl:MT_messagetype>

    <xsl:for-each select = "item">

    <item>

    <xsl:value-of select="item"/>

    </item>

    </xsl:for-each>

    </xsl:MT_messagetype>

    </xsl:template>

    </xsl:stylesheet>

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2008 at 01:40 PM

    Hi,

    Have a look into these 2 weblogs.

    /people/aashish.sinha/blog/2008/01/17/step-150-by-150-step-simple-approach-for-xslt-mapping

    /people/aashish.sinha/blog/2008/01/21/xslt-mapping-for-multiple-segments-of-xml

    Regards

    Aashish Sinha

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 01:47 PM

    Hi,

    try out with this keyword in XSLT..

    <xsl:for-each select = "">

    </xsl:for-each>

    check this..

    http://www.w3schools.com/xsl/xsl_for_each.asp

    Thanks,

    Vijaya.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2008 at 02:10 PM

    Hi,

    You have to use <xsl:foreach> for looping purpose in XSLT.

    Check for that for duplicating the node.

    Thanks,

    RamuV

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.