Hello...
I'm trying to transform a complex xml document to a text file and I keep getting a lot of extra data in my output. The following is a sample of the xml:
Code:
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<env:Header/>
<env:Body>
<m:getResponse xmlns:m="temp.temp1.temp2">
<n1:data_result xmlns:n1="temp.temp1.temp2">
<n2:aircraftModels xmlns:n2="java:temp.temp1.temp2.value" xsi:type="n2:ArrayOfAircraftModel">
<n2:AircraftModel xsi:type="n2:AircraftModel">
<n2:aircraftType>A1</n2:aircraftType>
</n2:AircraftModel>
<n2:AircraftModel xsi:type="n2:AircraftModel">
<n2:aircraftType>A10</n2:aircraftType>
</n2:AircraftModel>
</n2:aircraftModels>
<n3:fUnits xmlns:n3="java:temp.temp1.temp2.value" xsi:type="n3:ArrayOfFUnit"/>
<n4:operatingLocations xmlns:n4="java:temp.temp1.temp2.value" xsi:type="n4:ArrayOfOperatingLocation">
<n4:OperatingLocation>
<n4:availabilities xsi:type="n4:ArrayOfAvailability"/>
<n4:geodetic>
<n5:datum xmlns:n5="java:temp.temp1.temp2.conversion">WRS84</n5:datum>
<n6:height xmlns:n6="java:temp.temp1.temp2.conversion">0.0</n6:height>
<n7:latitude xmlns:n7="java:temp.temp1.temp3.conversion">1234567890</n7:latitude>
<n8:longitude xmlns:n8="java:temp.temp1.temp3.conversion">-1234567890</n8:longitude>
</n4:geodetic>
</n4:OperatingLocation>
</n1:data_result>
</m:getResponse>
</env:Body>
</env:Envelope>
I have no control over the formatting of this data or the way namespaces are used within it. Here's my xslt:
And here's the result:
Code:
A1
A10
WRS840.01234567890-1234567890
As you can see the result is not what I was expecting. I'm thinking that the problem may be due to the namespaces or maybe the xsi:type attributes in the source xml. Thanks for any help you can provide!
Oz