Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSLT transformation that just displays original XML?

Reply
Thread Tools

XSLT transformation that just displays original XML?

 
 
Matt Bradbury
Guest
Posts: n/a
 
      08-20-2003
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
 
Reply With Quote
 
 
 
 
Vemund Olstad
Guest
Posts: n/a
 
      08-21-2003
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"
<(E-Mail Removed)> 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" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed) om...
>> 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

>
>


 
Reply With Quote
 
 
 
 
Vemund Olstad
Guest
Posts: n/a
 
      08-21-2003
On Thu, 21 Aug 2003 14:53:11 +0200, "Dimitre Novatchev"
<(E-Mail Removed)> 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" <(E-Mail Removed)> wrote in message
>news:(E-Mail Removed)...
>> 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"
>> <(E-Mail Removed)> 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" <(E-Mail Removed)> wrote in message
>> >news:(E-Mail Removed) om...
>> >> 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
>> >
>> >

>>

>
>


 
Reply With Quote
 
Dimitre Novatchev
Guest
Posts: n/a
 
      08-21-2003
> 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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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"
> <(E-Mail Removed)> 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" <(E-Mail Removed)> wrote in message
> >news:(E-Mail Removed) om...
> >> 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

> >
> >

>



 
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
JAXP - Fusing XSLT transformation results into a single XML file Blue Gecko Java 1 10-03-2005 09:39 AM
Classic asp date displays- changing over to aspnet date object displays Chumley Walrus ASP .Net 1 12-16-2004 09:57 PM
streaming "for xml" to sax xslt-transformation clogwog Java 0 10-20-2004 05:14 AM
Xslt Transformation getting &lt; and &gt; =?Utf-8?B?UGF0Qw==?= ASP .Net 2 05-19-2004 12:15 AM
XSLT TRANSFORMATION FROM XML TO plain Text pradeep gummi XML 3 08-13-2003 03:59 AM



Advertisments