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

RE: Group Techniques by xslt

Subject: RE: Group Techniques by xslt
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 4 Dec 2009 09:00:15 -0000
RE:  Group Techniques by xslt
>  We have modified the line where you are generating element 
> (<sc[0-9]>) and it is working fine. I want your expert 
> comments on this, whether this can cause any problem.

There are several things badly wrong with using disable-output-escaping:

(a) it doesn't work in all environments and on all processors. In
particular, it only works if the output of the stylesheet is being
serialized. This means for example that it doesn't work in Firefox, which
renders the result tree directly without first generating serialized HTML.

(b) in consequence of this, your stylesheet code is less reusable, it can't
be combined with other code to produce a more complex transformation
pipeline, because it will only operate as the last step in the pipeline

(c) it runs against the architecture of the language; it means you can
generate invalid or non-well-formed output; it reduces the scope of the
processor for optimization; it makes your code less readable.

(d) it's deprecated.

(e) if you take the trouble to learn how to use the language properly, it is
almost always unnecessary (and that's certainly true here.)

Regards,

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

> 
>   <xsl:if test="self::p[matches(@class,'^Head[0-9]+$')]">
>    <xsl:text
> disable-output-escaping="yes"><![CDATA[<sc]]></xsl:text><xsl:value-of
> select="$level"/>
>    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
>   </xsl:if>
>   <!--<xsl:element name="sc{$level}">-->
>    
>     ......
> 
>   <!--</xsl:element>-->
>   <xsl:if test="self::p[matches(@class,'^Head[0-9]+$')]">
>    <xsl:text
> disable-output-escaping="yes"><![CDATA[</sc]]></xsl:text><xsl:value-of
> select="$level"/>
>    <xsl:text disable-output-escaping="yes"><![CDATA[>]]></xsl:text>
>   </xsl:if>
> 
> Thanks a lot!!!
> 
> Thanks
> ...JSR

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.