G
Gina_Marano
Hey All,
I am totally dazed and confused. I am new to XML/XSL and was thrown a
toughy.
Don't shoot me for the xml, it is provided to us and cannot change.
Below is an example of the structure:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="people.xsl"?>
<LIST>
<STATE>
<WA>
<PERSON>
<NAME>Mark Wilson</NAME>
</PERSON>
<PERSON>
<NAME>Tracey Wilson</NAME>
</PERSON>
<PERSON>
<NAME>Jodie Foster</NAME>
</PERSON>
</WA>
<ID>
<PERSON>
<NAME>Lorrin Maughan</NAME>
</PERSON>
<PERSON>
<NAME>Steve Rachel</NAME>
</PERSON>
</ID>
</STATE>
<ADDRESSLIST>
<ADDRESSITEM>
<ADDRESSID>1</ADDRESSID>
<ADDRESS>911 Somewhere Circle, Canberra, Australia</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>2</ADDRESSID>
<ADDRESS>121 Zootle Road, Cape Town, South Africa</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>3</ADDRESSID>
<ADDRESS>30 Animal Road, New York, USA</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>4</ADDRESSID>
<ADDRESS>1143 Winners Lane, London, UK</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>5</ADDRESSID>
<ADDRESS>90210 Beverly Hills, California, USA</ADDRESS>
</ADDRESSITEM>
</ADDRESSLIST>
</LIST>
I need to have it look like this:
<LIST>
<STATE>
<WA>
<PERSON>
<NAME>Mark Wilson</NAME>
<ADDRESS>911 Somewhere Circle, Canberra, Australia</ADDRESS>
</PERSON>
<PERSON>
<NAME>Tracey Wilson</NAME>
<ADDRESS>121 Zootle Road, Cape Town, South Africa</ADDRESS>
</PERSON>
<PERSON>
<NAME>Jodie Foster</NAME>
<ADDRESS>30 Animal Road, New York, USA</ADDRESS>
</PERSON>
</WA>
....
basically associate the address with the person. (note that the list
of items in each state can be a different count)
Any help would be much apprecated!!!!!!!
Frazzled Gina_M
I am totally dazed and confused. I am new to XML/XSL and was thrown a
toughy.
Don't shoot me for the xml, it is provided to us and cannot change.
Below is an example of the structure:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="people.xsl"?>
<LIST>
<STATE>
<WA>
<PERSON>
<NAME>Mark Wilson</NAME>
</PERSON>
<PERSON>
<NAME>Tracey Wilson</NAME>
</PERSON>
<PERSON>
<NAME>Jodie Foster</NAME>
</PERSON>
</WA>
<ID>
<PERSON>
<NAME>Lorrin Maughan</NAME>
</PERSON>
<PERSON>
<NAME>Steve Rachel</NAME>
</PERSON>
</ID>
</STATE>
<ADDRESSLIST>
<ADDRESSITEM>
<ADDRESSID>1</ADDRESSID>
<ADDRESS>911 Somewhere Circle, Canberra, Australia</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>2</ADDRESSID>
<ADDRESS>121 Zootle Road, Cape Town, South Africa</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>3</ADDRESSID>
<ADDRESS>30 Animal Road, New York, USA</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>4</ADDRESSID>
<ADDRESS>1143 Winners Lane, London, UK</ADDRESS>
</ADDRESSITEM>
<ADDRESSITEM>
<ADDRESSID>5</ADDRESSID>
<ADDRESS>90210 Beverly Hills, California, USA</ADDRESS>
</ADDRESSITEM>
</ADDRESSLIST>
</LIST>
I need to have it look like this:
<LIST>
<STATE>
<WA>
<PERSON>
<NAME>Mark Wilson</NAME>
<ADDRESS>911 Somewhere Circle, Canberra, Australia</ADDRESS>
</PERSON>
<PERSON>
<NAME>Tracey Wilson</NAME>
<ADDRESS>121 Zootle Road, Cape Town, South Africa</ADDRESS>
</PERSON>
<PERSON>
<NAME>Jodie Foster</NAME>
<ADDRESS>30 Animal Road, New York, USA</ADDRESS>
</PERSON>
</WA>
....
basically associate the address with the person. (note that the list
of items in each state can be a different count)
Any help would be much apprecated!!!!!!!
Frazzled Gina_M