Curious problem when applying XSLT.....

Discussion in 'Java' started by nick@codefresh.com, Aug 26, 2005.

  1. Guest

    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
     
    , Aug 26, 2005
    #1
    1. Advertising

  2. 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.
     
    Raymond DeCampo, Aug 26, 2005
    #2
    1. Advertising

  3. Nick Guest

    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
     
    Nick, Aug 26, 2005
    #3
  4. 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.
     
    Raymond DeCampo, Aug 27, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    415
  2. Replies:
    8
    Views:
    2,469
    Joseph Kesselman
    Sep 21, 2006
  3. tuka
    Replies:
    3
    Views:
    714
    Joe Kesselman
    Jun 22, 2007
  4. Stephen

    ajax, xml and applying xslt

    Stephen, Oct 13, 2005, in forum: Javascript
    Replies:
    4
    Views:
    139
    Stephen
    Oct 13, 2005
  5. jackpod
    Replies:
    1
    Views:
    174
    Martin Honnen
    Nov 5, 2009
Loading...

Share This Page