[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Need to render input document as string form of XML in

Subject: Need to render input document as string form of XML in output
From: Chris Wolf <cwolf.algo@xxxxxxxxx>
Date: Mon, 10 Sep 2012 17:33:47 -0400
 Need to render input document as string form of XML in
Hello,

Before I start my question - I searched all over the Internet,
including the XLS-FAQ and the archives of this list and could find
nothing.

I have a transform with output method="text".   In addition to
rendering the results of the transform, I'd like to append a readable
string version of the input document XML to the end of the
transformation result.

I tried declaring a top-level variable like so

<xsl:variable name="inputDoc" select="/*"/>

Then at the end of my default template:

<xsl:value-of select="$inputDoc"/>

But this only renders the text of text nodes, not element and attribute names.

I then tried:

<xsl:value-of select="string($inputDoc)"/>

...but I guess that just make explicit what already occurs implicitly,
since I got the same results.

One of my web search hits, some guy was taking about a serializer
extension, or something like that - surely I don't
need to resort to that, do I?

Do I need to implement some kind of recursive template that explicity
calls name() on elements and attributes?

Since my output is type text, I'm guessing the solution would involve
@disable-output-escaping="true", unless I decide
I want output method="html".

Thanks,

Chris Wolf

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.