I have a question about changing the format of an XML file. I know I have to do this with an XSLT, but i can't get it right. How would my XSLT file look like to get te transform as shown below? Regards
Bart
The XML I start with is:
-----------------
<?xml version="1.0" encoding="utf-8" ?>
<dataset xmlns=" xmlns:xs="- <!--
<dataset
xmlns=" xmlns:xs=" xs:schemaLocation=" xmldata.xsd"
>
-->
<metadata>
<item name="Record type" type="xs:string" length="4" />
<item name="Recordcounter" type="xs:int" />
</metadata>
<data>
<row>
<value>U</value>
<value>1</value>
</row>
<row>
<value>U</value>
<value>2</value>
</row>
<row>
<value>U</value>
<value>3</value>
</row>
</data>
</dataset>
-------------------------
The XML I need is:
-------------------------
<?xml version="1.0" encoding="utf-8"?>
<dataset xmlns=" xmlns:xs="<!--
<dataset
xmlns=" xmlns:xs=" xs:schemaLocation=" xmldata.xsd"
>
-->
<data>
<row>
<Recordtype>U</Recordtype>
<Recordcounter>1</Recordcounter>
</row>
<row>
<Recordtype>U</Recordtype>
<Recordcounter>2</Recordcounter>
</row>
<row>
<Recordtype>U</Recordtype>
<Recordcounter>3</Recordcounter>
</row>
</data>
</dataset>
----------------------------
Bart
The XML I start with is:
-----------------
<?xml version="1.0" encoding="utf-8" ?>
<dataset xmlns=" xmlns:xs="- <!--
<dataset
xmlns=" xmlns:xs=" xs:schemaLocation=" xmldata.xsd"
>
-->
<metadata>
<item name="Record type" type="xs:string" length="4" />
<item name="Recordcounter" type="xs:int" />
</metadata>
<data>
<row>
<value>U</value>
<value>1</value>
</row>
<row>
<value>U</value>
<value>2</value>
</row>
<row>
<value>U</value>
<value>3</value>
</row>
</data>
</dataset>
-------------------------
The XML I need is:
-------------------------
<?xml version="1.0" encoding="utf-8"?>
<dataset xmlns=" xmlns:xs="<!--
<dataset
xmlns=" xmlns:xs=" xs:schemaLocation=" xmldata.xsd"
>
-->
<data>
<row>
<Recordtype>U</Recordtype>
<Recordcounter>1</Recordcounter>
</row>
<row>
<Recordtype>U</Recordtype>
<Recordcounter>2</Recordcounter>
</row>
<row>
<Recordtype>U</Recordtype>
<Recordcounter>3</Recordcounter>
</row>
</data>
</dataset>
----------------------------