Skip to Content
0
Former Member
Oct 13, 2006 at 02:49 AM

xsl mapping

26 Views

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"?>

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"?>

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"?>

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