XSLT transformation that just displays original XML?

Matt Bradbury

Usenet Archive
Joined
Aug 20, 2003
Messages
1
Reaction score
0
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

Usenet Archive
Joined
Nov 7, 2000
Messages
737
Reaction score
0
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:

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.

...
 

Vemund Olstad

Usenet Archive
Joined
Mar 1, 2001
Messages
5
Reaction score
0
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
 

Vemund Olstad

Usenet Archive
Joined
Mar 1, 2001
Messages
5
Reaction score
0
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
 

Dimitre Novatchev

Usenet Archive
Joined
Nov 7, 2000
Messages
737
Reaction score
0
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
 

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
548,208
Messages
3,104,798
Members
249,594
Latest member
henrywalsh

Latest Threads

Top