On Tue, Sep 22, 2009 at 05:11:19PM +0200, Mike Hommey wrote:
> Hi,
> 
> I got a report on the debian BTS about a bug from svn2cl when used
> against the latest libxml2. I minimized the testcase to the following:
> --------- 8<-------------- test.xsl 
> <!DOCTYPE xsl:stylesheet [
>  <!ENTITY newl "&#xA;">
> ]>
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
> 
>   <xsl:template match="text()[contains(.,'&newl;')]"/>
> 
>   <xsl:template match="*">
>     <xsl:copy><xsl:apply-templates/></xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> --------- 8<-------------- /test.xsl

  Actually I believe it's NOTABUG, basically it's the result of fixing
    https://bugzilla.gnome.org/show_bug.cgi?id=587663

see http://www.w3.org/TR/2008/REC-xml-20081126/#AVNormalize
and libxml2 test case test/att10

 when you ask for entity susbtitution and that's the normal mode when
parsing a stylesheet to be compiled, the "&#xA;" coming from an entity
substitution will be replaced by as space, that's mandated by the spec,
and I missed that case previously.
 It's now fixed but also mean the stylesheet won't work as it used to.
The simplest is really to use &#xA; directly in the attribute value
c.f. the example.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to