J
Jim Garrison
I'm trying to process output from a Web Service using XSL. The output
XML seems to randomly render some tags as hrefs to other tags, making
the job of parsing the result with XSL really difficult.
In the example below, the "comments" block contains an array of objects,
each of which has various properties defined by contained tags. Instead
of including the text values of those properties, the web service's
serializer created the property tags with href= attributes pointing to
xsd:string tags OUTSIDE the response object (i.e. at the top level
within the SOAP envelope body)
Some questions:
1) Is there a parameter I can specify at the server end that will cause
it to generate all output inline instead of using HREFs? The server
is WebLogic 8.1.6.
2) Alternatively, is there an XSL processor option that automatically
resolves hrefs and expands them inline?
XML seems to randomly render some tags as hrefs to other tags, making
the job of parsing the result with XSL really difficult.
In the example below, the "comments" block contains an array of objects,
each of which has various properties defined by contained tags. Instead
of including the text values of those properties, the web service's
serializer created the property tags with href= attributes pointing to
xsd:string tags OUTSIDE the response object (i.e. at the top level
within the SOAP envelope body)
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<env:Body env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<m:fetchRequestResponse xmlns:m="http://cesd7001:8001/webservices/javaclass">
<result xmlns:n1="java:com.wholefoods.ittoolkit.ws.ccf"
type="n1:FetchRequestResults">
<exception nil="true" />
<request type="n1:Request">
[snip]
<comments arrayType="xsd:anyType[1]">
<anyType type="n1:Comment">
<createTs type="xsd:dateTime">2007-03-23T10:21:51-05:00</createTs>
<reqId type="xsd:long">0</reqId>
<sectionId href="#ID_40" />
<text href="#ID_41" />
<userId href="#ID_42" />
</anyType>
</comments>
[snip]
</request>
<result nil="true" />
</result>
</m:fetchRequestResponse>
<xsd:string id="ID_40" type="xsd:string">A</xsd:string>
<xsd:string id="ID_41" type="xsd:string">This is a test comment</xsd:string>
<xsd:string id="ID_42" type="xsd:string">garrisoj</xsd:string>
</env:Body>
</env:Envelope>
Some questions:
1) Is there a parameter I can specify at the server end that will cause
it to generate all output inline instead of using HREFs? The server
is WebLogic 8.1.6.
2) Alternatively, is there an XSL processor option that automatically
resolves hrefs and expands them inline?