Re: [xslt] disable-output-escaping disfunctional



 >  Only a reproductible testcase allows me to put a breakpoint at the
 > right location on xsltproc and find quickly where the problem might
 > be.
 > If you don't provide the input, then I have to *GUESS* and this
 > takes time I don't have.
 >  You still didn't provided that stylesheet. There is a *HUGE*
 > amount of things which may influence the serializer, for example
 > HTML and XML code path are *totally* different.
 >  There is no excuse to not providing the input, I need the XSLT and
 > even if the XML is <doc/> then I don't have to spend time figuring
 > out if it is needed or not.
 >
 >  You may spend 4 hours trying on your side, or spend 2mn providing
 > me the input and letting me figure it out in 5mn if you like, the
 > only thing if that I won't spend the 4 hours guessing if you do
 > not spend the time to put an attachment to your mail...

Well, what I have done for the last hour is to put up a test case about 
this, but I was unable to. Using a simple <doc/> XML document and an XSL 
file with one template with the xsl:text thing in question everything 
seems to be working well...

The real document is a 13MB 'XML document', and it is the documentation 
of the PHP language. It is actually a very small XML file with a huge 
list of external parsed entities, and the sum of all is 13MB. The XSL 
sheets are the DocBook XSL sheets as a base, and there are some 
customizations we have. The xsl:text in question is in one of the 
customizations I am going to get ready for primetime.

What I was able to come up with so far is to reduce the source document 
from 13MB to <book/> which is the perfect root element for DocBook. 
Running our customized DocBook sheets on this still resulted in the 
bogus behaviour.

Having that simple <book/> and this simple template:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version="1.0">

<xsl:template match="book">
   <xsl:text disable-output-escaping="yes">&lt;</xsl:text>
</xsl:template>

</xsl:stylesheet>

The problem does not seem to come up. So the bug is probably only 
appears in a particular stylesheet context...

The processor clearly uses the HTML output method (it outputs DOCTYPE 
information at the top of the output files). I have tried to switch to 
the XML output method with success, but without 'fixing the bug'. So the 
output was in XML (eg. <a name="something"/> and <br/>), but 
disable-output-escaping still didn't work. So the bug does not seem to 
be connected to the HTML output method.

As disable-output-escaping is a local statement for the xslt processor, 
it cannot be overriden by it's context. Therefore I still strongly 
beleive that I have found a bug in xsltproc/libxml and not a bug in the 
DocBook sheets.

I have prepared a 2MB testcase. It includes the DocBook XSL sheets HTML 
part, and our customizations in question, and a PHP Manual Light 
(<book/> :) ). In a tgz it is just 220Kb, so I can put it up somewhere 
in case you are willing to test it, and find out why it is not working. 
It is fully testable, with an XML file and an XSL sheet (at least it 
works for me standing alone)...

Thanks for being helpful,
Goba





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]