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

Re: xsl:output and xsl:result-document

Subject: Re: xsl:output and xsl:result-document
From: Mike Sokolov <sokolov@xxxxxxxxxxxx>
Date: Tue, 15 Sep 2009 16:22:14 -0400
Re:  xsl:output and xsl:result-document
Hmm yes - that is definitely food for thought. I had stripped off the XML decl but wasn't thinking about output escaping. I'll have to go back and use the named xsl:output after all.

Thanks, David and Michael

-Mike

now if only I can figure out how to reply to two messages at once...



Michael Kay wrote:
Thanks Martin and Andrew - these are both helpful suggestions. As it turned out in my case, I was able to output text while declaring it to be xml: I didn't think this would work, but apparently at least Saxon will allow you to output an xml document that contains only text: no elements, which is just what I needed.

If you use disable-output-escaping="yes" and omit-xml-declaration="yes" (and don't output any elements) then yes, the XML output method becomes very close to the text output method. But it seems clearer to use method="text", and there is nothing that stops you using different output methods for different result documents. And relying on disable-output-escaping seems very error prone - the first time you encounter data containing "<" or "&", you're going to find that you forgot to put d-o-e on the relevant xsl:value-of instruction.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay

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.