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

Serializing <script> elements to HTML

Subject: Serializing <script> elements to HTML
From: MrDemeanour <mrdemeanour@xxxxxxxxxxxxxx>
Date: Fri, 07 Jul 2006 17:17:00 +0100
remove script from html
I have a multi-stage XSLT transformation that must take as one or more
of its inputs some external content that contains <script> elements, and
may not be well-formed.

External content of this kind is therefore wrapped by the transformer in
a <cdata> element, and successive stages in the pipleline copy that
element to their output unchanged, because they have a
  cdata-section-elements = "cdata"
attribute in their output declaration. That all works fine.

The output of the pipeline is to be serialized as HTML, and the embedded
script must eventually be output as unencoded character data. So the
final stage of the XSL contains this template:

  <xsl:template match="cdata">
    <xsl:value-of select="." disable-output-escaping="yes"/>

That works, and the output is as expected. However the XSL 2.0 spec
states that the disable-output-escaping attribute is deprecated.

Is this deprecation an indication that the attribute should not be used,
or is it only there because output escaping can only ever work if the
output of the processor is serialized? Is there some other way of
achieving the same effect? If there is no other way of doing this, isn't
deprecation too extreme?


Current Thread


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.
First Name
Last Name
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.