RE: Transforming XML Blockquotes - Mixed Content - XSL
> Perhaps there is a reason I should not solve it this way that > I am missing: > > <xsl:template match="blockquote"> > <xsl:text disable-output-escaping="yes"></p></xsl:text> > <span class="block"><xsl:apply-templates/></span> > <xsl:text disable-output-escaping="yes"><p > class="cont"></xsl:text> > </xsl:template> Yes, there are very good reasons why you shouldn't try to solve this problem using disable-output-escaping. It's like using a stapler when you can't find your cuff-links - handy in an emergency, but basically the wrong tool for the job. There's a deep architectural reason why d-o-e is bad, and there are practical problems (rooted in the architectural causes) if you prefer a less theoretical rationale. The architectural reason is that XSLT as a language is designed to transform trees into trees. The closure of the language - it's ability to process the output of one transformation as the input to another, and hence the composability and reusability of stylesheet code - depends on this property. The d-o-e feature breaks this model, because it sends out-of-band messages from the transformation code direct to the serializer, that destroy the principle that the result tree forms the interface between the transformer and the serializer. The practical consequences are that d-o-e is not supported by all XSLT processors, and those processors that do support it don't support it in all situations; and that stylesheets that use it can't be combined with other stylesheets to form a processing pipeline. Hence you might achieve your immediate goal, but only by sacrificing portability and reusability. Michael Kay http://www.saxonica.com/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format