sedj
Programmer
- Aug 6, 2002
- 5,610
Hi,
For the life of me, I cannot work out how to transform the below xml to the xml below that. I realize it would be easier if the POLYGGON_LIST were split into their respective two POLYGON elements, but unfortunately I cannot change the source schema. Any hint as to how I can do this in XSLT would be appreciated !
Below is the input source, and below that is the desired output. Thanks for any help with this !!!
--------------------------------------------------
Free Database Connection Pooling Software
For the life of me, I cannot work out how to transform the below xml to the xml below that. I realize it would be easier if the POLYGGON_LIST were split into their respective two POLYGON elements, but unfortunately I cannot change the source schema. Any hint as to how I can do this in XSLT would be appreciated !
Below is the input source, and below that is the desired output. Thanks for any help with this !!!
Code:
<NUMBER_OF_POLYGONS>2</NUMBER_OF_POLYGONS>
<POLYGON_LIST>
<POLYGON_TYPE>H</POLYGON_TYPE>
<NUMBER_OF_COORDINATES>4</NUMBER_OF_COORDINATES>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POLYGON_TYPE>H2</POLYGON_TYPE>
<NUMBER_OF_COORDINATES>4</NUMBER_OF_COORDINATES>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
<POINT>
<EASTING>some coordX</EASTING>
<NORTHING>some coordY</NORTHING>
</POINT>
</POLYGON_LIST>
Code:
<gml:Polygon srsName="BNG">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
<gml:Polygon srsName="BNG">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
<gml:coord>
<gml:X>some coordX</gml:X>
<gml:Y>some coordY</gml:Y>
</gml:coord>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
--------------------------------------------------
Free Database Connection Pooling Software