xsl-list
[Top] [All Lists]

RE: [xsl] Identify transform with disabled output escaping

2006-11-15 10:56:52
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(_at_)rubyrailways(_dot_)com] 
Sent: 15 November 2006 18:04
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--