Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Curious problem when applying XSLT.....

Reply
Thread Tools

Curious problem when applying XSLT.....

 
 
nick@codefresh.com
Guest
Posts: n/a
 
      08-26-2005
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

 
Reply With Quote
 
 
 
 
Raymond DeCampo
Guest
Posts: n/a
 
      08-26-2005
wrote:
> 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

--
XML is the programmer's duct tape.
 
Reply With Quote
 
 
 
 
Nick
Guest
Posts: n/a
 
      08-26-2005
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

 
Reply With Quote
 
Raymond DeCampo
Guest
Posts: n/a
 
      08-27-2005
Nick wrote:
> 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

--
XML is the programmer's duct tape.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem applying profile Kindergarten Teacher Wireless Networking 4 02-29-2008 09:29 PM
Problem applying theme to page! Jeff ASP .Net 0 04-10-2007 04:57 PM
Problem applying generics to my code. Is there a better solution? Lucas Java 9 04-06-2007 03:50 PM
Problem applying skin to custom GridView control ack95 ASP .Net 0 05-15-2006 03:30 PM
Curious problem applying XSTL in Java nick@codefresh.com XML 1 08-26-2005 10:20 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57