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

RE: Identify transform with disabled output escaping

Subject: RE: Identify transform with disabled output escaping
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 15 Nov 2006 17:56:29 -0000
disabled output escaping
There are two common forms of identity transform. The one with

<xsl:template match="node()|@*">

relies on xsl:copy to copy the text nodes

The one with <xsl:template match="*"> relies on the built-in template rule
for text nodes to copy the text nodes.

But in either case, you can write a template rule for text nodes:

<xsl:template match="text()" priority="10">
  <xsl:value-of select="." disable-output-escaping="yes"/>
</xsl:template>

that will override the default.

Though why on earth you would want to disable output escaping on all the
text in your document defeats me.

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


> -----Original Message-----
> From: Peter Szinek [mailto:peter@xxxxxxxxxxxxxxxx] 
> Sent: 15 November 2006 18:04
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Identify transform with disabled output escaping
> 
> Hello all,
> 
> I have been browsing the archives for at last 2 hours and 
> could not find the answer - though it seems so trivial.
> 
> I have found some older messages claiming that the identify 
> transformation can not be done without xsl:copy. However, 
> disable-output-escaping is valid for xsl:value and xsl:text 
> only (i.e. not for xsl:copy). For me, these two statements 
> imply that the identify transformation can not be done with 
> output escaping disabled.
> 
> Is there a workaround for this?
> 
> Thanks,
> Peter

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.