on 10-13-2006 3:49 AM
hi,
how can i make b0101, b0102, b0201, b0202?
b01 in input.xml is static row, only having 2 row;
if you can do in graphical mapping, please guid me.
xslt
-
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.test.net/test01">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns0:mapping01t_mt>
<mapping>
<h01>
<xsl:value-of select="ns0:mapping01s_mt/maproot/h01"/>
</h01>
<h02>
<xsl:value-of select="ns0:mapping01s_mt/maproot/h02"/>
</h02>
<b0101></b0101>
<b0102></b0102>
<b0201></b0201>
<b0202></b0202>
</mapping>
</ns0:mapping01t_mt>
</xsl:template>
</xsl:stylesheet>
input.xml
-
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mapping01s_mt xmlns:ns0="http://www.test.net/test01">
<maproot>
<h01>zh01</h01>
<h02>zh02</h02>
<b01>
<b0101>zb0101</b0101>
<b0102>zb0102</b0102>
</b01>
<b01>
<b0201>zb0201</b0101>
<b0202>zb0202</b0102>
</b01>
</maproot>
</ns0:mapping01s_mt>
output.xml
-
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mapping01t_mt xmlns:ns0="http://www.test.net/test01">
<mapping>
<h01>zh01</h01>
<h02>zh02</h02>
<b0101>zb0101</b0101>
<b0102>zb0102</b0102>
<b0201>zb0201</b0201>
<b0202>zb0202</b0202>
</mapping>
</ns0:mapping01t_mt>
thanks
venjamin
Hi,
Try this XSL
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://www.test.net/test01">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<ns0:mapping01t_mt>
<mapping>
<h01>
<xsl:value-of select="ns0:mapping01s_mt/maproot/h01"/>
</h01>
<h02>
<xsl:value-of select="ns0:mapping01s_mt/maproot/h02"/>
</h02>
<b0101>
<xsl:value-of select="ns0:mapping01s_mt/maproot/b01[1]/b0101"/>
</b0101>
<b0102>
<xsl:value-of select="ns0:mapping01s_mt/maproot/b01[1]/b0102"/>
</b0102>
<b0201>
<xsl:value-of select="ns0:mapping01s_mt/maproot/b01[2]/b0201"/>
</b0201>
<b0202>
<xsl:value-of select="ns0:mapping01s_mt/maproot/b01[2]/b0202"/>
</b0202>
</mapping>
</ns0:mapping01t_mt>
</xsl:template>
</xsl:stylesheet>
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This might help you
/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
/people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
/people/pooja.pandey/blog/2005/06/27/xslt-mapping-with-java-enhancement-for-beginners
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.