musicsnoopy67
September 5th, 2003, 08:26 PM
I have an xml file below which I want to use xsl to put certain information in a
table. I only want to extract particular ID's and put them in the table. The problem I am having is how to know when to put in a <tr> table return to get the table into 2 columns using xslt.
I would like the output to look like below in a table with 2 columns for only the ID's or data I want to pick out:
<tr><td>A</td><td>D</td></tr>
<tr><td>I</td><td>J</td></tr>
Any help would be greatly appreciated.
Below is the xml file.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="parts.xsl"?>
<Data>
<PartList nID="200" name="Belts">
<Perf_Category nID="1" name="A">
</Perf_Category>
<Perf_Category nID="2" name="B">
</Perf_Category>
<Perf_Category nID="5" name="C">
</Perf_Category>
<Perf_Category nID="4" name="D">
</Perf_Category>
<Perf_Category nID="55" name="E">
</Perf_Category>
<Perf_Category nID="20" name="F" >
</Perf_Category>
<Perf_Category nID="22" name="G">
</Perf_Category>
<Perf_Category nID="29" name="H">
</Perf_Category>
<Perf_Category nID="18" name="I">
</Perf_Category>
<Perf_Category nID="8" name="J">
</Perf_Category>
<Perf_Category nID="98" name="K">
</Perf_Category>
<Perf_Category nID="31" name="L">
</Perf_Category>
</PartList>
</Data>
table. I only want to extract particular ID's and put them in the table. The problem I am having is how to know when to put in a <tr> table return to get the table into 2 columns using xslt.
I would like the output to look like below in a table with 2 columns for only the ID's or data I want to pick out:
<tr><td>A</td><td>D</td></tr>
<tr><td>I</td><td>J</td></tr>
Any help would be greatly appreciated.
Below is the xml file.
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="parts.xsl"?>
<Data>
<PartList nID="200" name="Belts">
<Perf_Category nID="1" name="A">
</Perf_Category>
<Perf_Category nID="2" name="B">
</Perf_Category>
<Perf_Category nID="5" name="C">
</Perf_Category>
<Perf_Category nID="4" name="D">
</Perf_Category>
<Perf_Category nID="55" name="E">
</Perf_Category>
<Perf_Category nID="20" name="F" >
</Perf_Category>
<Perf_Category nID="22" name="G">
</Perf_Category>
<Perf_Category nID="29" name="H">
</Perf_Category>
<Perf_Category nID="18" name="I">
</Perf_Category>
<Perf_Category nID="8" name="J">
</Perf_Category>
<Perf_Category nID="98" name="K">
</Perf_Category>
<Perf_Category nID="31" name="L">
</Perf_Category>
</PartList>
</Data>