Hi, The behaviour was changed according to your proposal.
When serializing XHTML, the following now applies to the content of the elements "style" and "script": - no implicit CDATA section is generated - text nodes marked with "disable-output-escape" are serialized as any other text nodes with that XSLT-specific semantic Committed to CVS HEAD, xmlsave.c, revision 1.34. Regards, Kasimier > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Vincent Lefevre > On 2006-06-22 14:42:25 +0200, Buchcik, Kasimier wrote: > > I see the following reasons to disable this mechanism: > > > > 1) The addition is not performed by the Saxon, Xalan, > Sablotron and .NET > > XSLT processors (maybe others as well). > > > > 2) It constitutes a problem for some people, since comes > unexpectedly. > > > > 3) The XHTML spec does not give a hint that CDATA sections > > should be generated automatically by the serialization > > mechanism; it only makes XHTML authors aware that one can > use CDATA > > sections to make the text more readable in the XML document. > > (http://www.w3.org/TR/xhtml1/#h-4.8) > > Or it was written for authors who want to switch from HTML4 to > XHTML (possibly converting old HTML4 files into XHTML ones): > instead of replacing some characters by entities, they can use > a CDATA section. > > Also, more importantly... > > [...] > > Due to a bug in the serialization of non-output-escaped text in > > conjunction with CDATA sections, the current state can > > lead to incorrect results. > > The following example demonstrates that the generated content > > of the "style" element differs; the current behaviour generates > > the text "<hr/>", while the correct result would be the element > > "hr". > [...] > > And with an example I've written: > > $ xsltproc xhtml-serial.xsl xhtml-serial.xsl | xsltproc getstyle.xsl - > /*<![CDATA[*/ > body { } > /*]]>*/ > > $ sabcmd xhtml-serial.xsl xhtml-serial.xsl | xsltproc getstyle.xsl - > /**/ > body { } > /**/ > > $ xalan -xsl xhtml-serial.xsl -in xhtml-serial.xsl | xsltproc > getstyle.xsl - > /**/ > body { } > /**/ > > where xhtml-serial.xsl is the testcase given in my bug report[*] and > getstyle.xsl just does <xsl:value-of > select="concat(//h:style,' ')"/> > with text output. > > [*] http://bugzilla.gnome.org/show_bug.cgi?id=345147 > > > So actually there are 2 issues here: > > 1) Removing the unexpected generation of CDATA sections > > 2) Fixing the serialization bug > > Yes. [...] _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
