W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2010

Re: Disable output escaping

From: Wendell Piez <wapiez@mulberrytech.com>
Date: Wed, 19 May 2010 10:51:21 -0400
To: xproc-dev@w3.org
Message-ID: <E1OEkjS-0005Eh-Hg@bart.w3.org>
Alex,

disable-output-escaping in XSLT is generally considered to be 
brittle, if not actually ill-advised, since it's not an aspect of 
transformation itself, but of serialization (writing the results of a 
tree transformation to a file). The reason it's working in oXygen but 
not in your XProc is because oXygen is using a serializer that 
supports it, whereas your XProc processor is not (or is not configured to).

Assuming you really do have a requirement to avoid escaping your 
output, how to fix this would depend on your processor. (I have to 
admit just wanting "&" instead of the correct "&amp;" sounds fishy to 
me: why would you want to do that?) You don't actually want to escape 
markup; actually it's more the opposite, you want to avoid the 
escaping that ordinarily prevents reserved characters from being 
written as literals, which is to say as markup.

XSLT 2.0 provides more robust features for mapping characters on 
serialization, which can be used for this purpose. But how well this 
will work in your XProc environment would depend on the latter. (The 
XProc spec mentions only that the standard does not actually specify 
support for the relevant mechanism, use-character-maps. See 
http://www.w3.org/TR/2010/REC-xproc-20100511/#serialization-options.)

Cheers,
Wendell

At 07:26 AM 5/19/2010, you wrote:
>Hi,
>
>I have an xslt file which uses disable-output-escaping="yes" to 
>output html entities the way I would like within the html output 
>such that the & is not output as &amp; and rather is output as &.
>
>The xslt file works within oxygen run by itself replacing the 
>entities however as last xslt step in an xproc pipeline it fails to 
>replace them.
>
>What should I do to get the output from and xslt transformation to 
>have it's output escaping disabled?
>
>I note the following step however not sure what to do.
><http://www.w3.org/TR/2010/REC-xproc-20100511/#c.escape-markup>http://www.w3.org/TR/2010/REC-xproc-20100511/#c.escape-markup
>
>Thanks
>
>
>--
>Alex
>
>An informal recording with one mic under a tree leads to some pretty 
>sweet acoustic sounds.
><https://sites.google.com/site/greigconteh/albums/diabarte-and-sons>https://sites.google.com/site/greigconteh/albums/diabarte-and-sons


======================================================================
Wendell Piez                            mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
Received on Wednesday, 19 May 2010 14:58:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 19 May 2010 14:58:52 GMT