XSLT transformation that just displays original XML?

Discussion in 'XML' started by Matt Bradbury, Aug 20, 2003.

  1. Hi everyone. I'm in a situation where I need to work with XML data
    that I don't have the format for. It's a web service situation where
    I hand them a query and an XSLT file. They produce XML fromt the
    query, then run the XSLT on it and return the transformed data. But I
    need to find out the original structure since the interface is poorly
    documented.

    Anyone have any suggestions as to how to do this? Or even better a
    XSLT file laying around that can generically return the original XML?

    Thanks for your time.

    -Matt Bradbury
     
    Matt Bradbury, Aug 20, 2003
    #1
    1. Advertising

  2. Hi

    I have a transformation routine that is supposed transform the xml
    file more or less "as it is", and I've tried the template you suggest.

    There is , however, one problem I have yet to resolve: is it possible
    to copy the DOCTYPE declaration as well? As far as I know this is not
    one of the nodes xPath is able to target, so how can I copy it?

    I would be very happy if could supply an answer, or point me in the
    right direction here...

    Best wishes

    Vemund

    On Wed, 20 Aug 2003 21:16:34 +0200, "Dimitre Novatchev"
    <> wrote:

    >This is the wellknown identity template:
    >
    > <xsl:template match="@* | node()">
    > <xsl:copy>
    > <xsl:apply-templates select="@* | node()"/>
    > </xsl:copy>
    > </xsl:template>
    >
    >
    >
    >=====
    >Cheers,
    >
    >Dimitre Novatchev.
    >http://fxsl.sourceforge.net/ -- the home of FXSL
    >
    >
    >"Matt Bradbury" <> wrote in message
    >news:...
    >> Hi everyone. I'm in a situation where I need to work with XML data
    >> that I don't have the format for. It's a web service situation where
    >> I hand them a query and an XSLT file. They produce XML fromt the
    >> query, then run the XSLT on it and return the transformed data. But I
    >> need to find out the original structure since the interface is poorly
    >> documented.
    >>
    >> Anyone have any suggestions as to how to do this? Or even better a
    >> XSLT file laying around that can generically return the original XML?
    >>
    >> Thanks for your time.
    >>
    >> -Matt Bradbury

    >
    >
     
    Vemund Olstad, Aug 21, 2003
    #2
    1. Advertising

  3. On Thu, 21 Aug 2003 14:53:11 +0200, "Dimitre Novatchev"
    <> wrote:

    >Sorry -- you can't. There are only "traces" of a DTD in the XML Infoset.


    Blegh - I was afraid of that. Thank you for the very quick response -
    I guess I'll have to resort to scripting....

    Best wishes

    Vemund

    >"Vemund Olstad" <> wrote in message
    >news:...
    >> Hi
    >>
    >> I have a transformation routine that is supposed transform the xml
    >> file more or less "as it is", and I've tried the template you suggest.
    >>
    >> There is , however, one problem I have yet to resolve: is it possible
    >> to copy the DOCTYPE declaration as well? As far as I know this is not
    >> one of the nodes xPath is able to target, so how can I copy it?
    >>
    >> I would be very happy if could supply an answer, or point me in the
    >> right direction here...
    >>
    >> Best wishes
    >>
    >> Vemund
    >>
    >> On Wed, 20 Aug 2003 21:16:34 +0200, "Dimitre Novatchev"
    >> <> wrote:
    >>
    >> >This is the wellknown identity template:
    >> >
    >> > <xsl:template match="@* | node()">
    >> > <xsl:copy>
    >> > <xsl:apply-templates select="@* | node()"/>
    >> > </xsl:copy>
    >> > </xsl:template>
    >> >
    >> >
    >> >
    >> >=====
    >> >Cheers,
    >> >
    >> >Dimitre Novatchev.
    >> >http://fxsl.sourceforge.net/ -- the home of FXSL
    >> >
    >> >
    >> >"Matt Bradbury" <> wrote in message
    >> >news:...
    >> >> Hi everyone. I'm in a situation where I need to work with XML data
    >> >> that I don't have the format for. It's a web service situation where
    >> >> I hand them a query and an XSLT file. They produce XML fromt the
    >> >> query, then run the XSLT on it and return the transformed data. But I
    >> >> need to find out the original structure since the interface is poorly
    >> >> documented.
    >> >>
    >> >> Anyone have any suggestions as to how to do this? Or even better a
    >> >> XSLT file laying around that can generically return the original XML?
    >> >>
    >> >> Thanks for your time.
    >> >>
    >> >> -Matt Bradbury
    >> >
    >> >

    >>

    >
    >
     
    Vemund Olstad, Aug 21, 2003
    #3
  4. > There is , however, one problem I have yet to resolve: is it possible
    > to copy the DOCTYPE declaration as well? As far as I know this is not
    > one of the nodes xPath is able to target, so how can I copy it?
    >


    Sorry -- you can't. There are only "traces" of a DTD in the XML Infoset.


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL


    "Vemund Olstad" <> wrote in message
    news:...
    > Hi
    >
    > I have a transformation routine that is supposed transform the xml
    > file more or less "as it is", and I've tried the template you suggest.
    >
    > There is , however, one problem I have yet to resolve: is it possible
    > to copy the DOCTYPE declaration as well? As far as I know this is not
    > one of the nodes xPath is able to target, so how can I copy it?
    >
    > I would be very happy if could supply an answer, or point me in the
    > right direction here...
    >
    > Best wishes
    >
    > Vemund
    >
    > On Wed, 20 Aug 2003 21:16:34 +0200, "Dimitre Novatchev"
    > <> wrote:
    >
    > >This is the wellknown identity template:
    > >
    > > <xsl:template match="@* | node()">
    > > <xsl:copy>
    > > <xsl:apply-templates select="@* | node()"/>
    > > </xsl:copy>
    > > </xsl:template>
    > >
    > >
    > >
    > >=====
    > >Cheers,
    > >
    > >Dimitre Novatchev.
    > >http://fxsl.sourceforge.net/ -- the home of FXSL
    > >
    > >
    > >"Matt Bradbury" <> wrote in message
    > >news:...
    > >> Hi everyone. I'm in a situation where I need to work with XML data
    > >> that I don't have the format for. It's a web service situation where
    > >> I hand them a query and an XSLT file. They produce XML fromt the
    > >> query, then run the XSLT on it and return the transformed data. But I
    > >> need to find out the original structure since the interface is poorly
    > >> documented.
    > >>
    > >> Anyone have any suggestions as to how to do this? Or even better a
    > >> XSLT file laying around that can generically return the original XML?
    > >>
    > >> Thanks for your time.
    > >>
    > >> -Matt Bradbury

    > >
    > >

    >
     
    Dimitre Novatchev, Aug 21, 2003
    #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. Chumley Walrus
    Replies:
    1
    Views:
    12,202
    =?Utf-8?B?QnJpYW4gQnJvd24=?=
    Dec 16, 2004
  2. clogwog
    Replies:
    0
    Views:
    433
    clogwog
    Oct 20, 2004
  3. Blue Gecko
    Replies:
    1
    Views:
    454
    Blue Gecko
    Oct 3, 2005
  4. Joe
    Replies:
    2
    Views:
    504
  5. Binaryx
    Replies:
    3
    Views:
    5,176
    Peter Flynn
    Apr 14, 2012
Loading...

Share This Page