on 06-18-2008 2:25 PM
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
<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="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>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You have to use <xsl:foreach> for looping purpose in XSLT.
Check for that for duplicating the node.
Thanks,
RamuV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.