W3C home > Mailing lists > Public > public-qt-comments@w3.org > May 2003

wording in 20.2 (DOE)

From: Tobias Reif <tobiasreif@pinkjuice.com>
Date: Mon, 05 May 2003 13:02:39 +0200
Message-ID: <3EB644CF.8010903@pinkjuice.com>
To: public-qt-comments@w3.org



"20.2 Disabling Output Escaping

Normally, when using the XML, HTML, or XHTML output method, the 
serializer will escape special characters such as & and < when 
outputting text and attribute nodes. This ensures that the output is 
well-formed. However, it is sometimes convenient to be able to produce 
output that is almost, but not quite well-formed XML; for example, the 
output may include ill-formed sections which are intended to be 
transformed into well-formed XML by a subsequent non-XML-aware process. 
For this reason, XSLT defines a mechanism for disabling output escaping."

But generating mal-formed XML is not the only reason for having to rely 
on shaky d-o-e.

Until I can use s.th. like

  <xsl:serialize format="xml_snippet">
   <xsl:copy-of select="$snippet"/>


I use

   <xsl:copy-of select="$forrest"/>
   <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>


This satisfies a requirement of an IMHO not-too-esoteric usage scenario, 
and the results are well-formed. 
(http://www.w3.org/TR/REC-xml.html#NT-CDEnd must be escaped)

As long as d-o-e is one workaround for features that are not available 
in XSLT, I'm not sure if the wording is appropriate.

Perhaps adding xsl:serialize is all that's needed. Personally, I don't 
think I have a use case for d-o-e except that one: I could work around 
the missing xsl:serialize functionality without d-o-e, but it's one 
example where d-o-e is used without generating mal-formed XML.
I'd be happy about not having to rely on d-o-e.


[1] full (actual and working, but inclomplete) listing:

<xsl:template name="serialize">
   <xsl:param name="forrest"/>
     <xsl:when test="function-available('saxon:serialize')">
       <xsl:variable name="forrest_stripped">
         <xsl:apply-templates select="$forrest"
<!-- no indenting etc -->
   <xsl:copy-of select="$forrest"/>
   <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>

Received on Monday, 5 May 2003 07:03:42 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:12 UTC