Curious problem when applying XSLT.....

N

nick

Hi all,

I've a curious problem at the moment and was wondering whether anyone
might be able to help. I have a SOAPBodyElement object that was
returned from a SOAP call. I then convert this into a Document object
and then attempt to apply a XSLT file to it. Unfortunately the output
produced by this transformation is incorrect. Effectively the XSLT is
not being applied correctly. Bizarrely if I serialize the document to a
byte array and then create a new document based on it (by using
docBuilder.parse()), it works! I've output both documents as strings
and then compared them and they're identical. All very weird. Any
ideas?

Nick
 
R

Raymond DeCampo

Hi all,

I've a curious problem at the moment and was wondering whether anyone
might be able to help. I have a SOAPBodyElement object that was
returned from a SOAP call. I then convert this into a Document object
and then attempt to apply a XSLT file to it. Unfortunately the output
produced by this transformation is incorrect. Effectively the XSLT is
not being applied correctly. Bizarrely if I serialize the document to a
byte array and then create a new document based on it (by using
docBuilder.parse()), it works! I've output both documents as strings
and then compared them and they're identical. All very weird. Any
ideas?

The first thing that comes to mind is that the implementation of
Document you get from the SOAPBodyElement object is different from the
implementation of Document that you get from parsing the text via a
stream and that one of the implementations has a bug.

HTH,
Ray
 
N

Nick

Hmm, I'm using the javax.xml.soap.SOAPBodyElement and
org.w3c.dom.Document classes so I'd be suprised if there was a bug with
these. I suppose it might be the javax.xml.transform.Transformer class
I'm using. I've tried both the default one that comes with WebLogic 8.1
and Xalan but both exhibit the same problem.

Nick
 
R

Raymond DeCampo

Nick said:
Hmm, I'm using the javax.xml.soap.SOAPBodyElement and
org.w3c.dom.Document classes so I'd be suprised if there was a bug with
these. I suppose it might be the javax.xml.transform.Transformer class
I'm using. I've tried both the default one that comes with WebLogic 8.1
and Xalan but both exhibit the same problem.

I'm not familiar with javax.xml.soap.SOAPBodyElement, but
org.w3c.dom.Document is an interface. The implementation is provided by
the XML parser, which can be specified by JAXP.

It may be helpful if you could provide a SSCCE, although that may be
difficult in this case.

Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top