[xslt] Bug(?) in xmlns handling



This may well be an error in our usage, so I hesitate to post a bug
report without confirming. There has been a change in behavior beginning
with the fedora libxslt-1.1.18-1 package, but it is likely that our
input has always been wrong and it is simply getting "caught" now (which
is good).

Problem: We have an XSLT transformer that used to work (but may have
been incorrect). It is emitting an SVG tree using the XML output method,
and it is trying to wrap part of the output in a namespace tag by doing:

     <xsl:element name="svg">
       ...
==>     <xsl:attribute name="xmlns:svg">
         <xsl:text>http://www.w3.org/2000/svg</xsl:text>
       </xsl:attribute>

Beginning with 1.1.18-1, we get an error at the line indicated by the
"==>".

  compilation error: file ../../../../doc/doctools/XSLT/sbox-svg.xsl
    line 47 element attribute
  xsl:attribute: The prefixed QName 'xmlns:svg' has no namespace binding
    in scope in the stylesheet; this is an error, since the namespace
    was not specified by the instruction itself.

[lines broken for readability]

I'm not clear if this is a bug in libxslt or if it is a but in our
transform script. While there is no top-level namespace declaration for
xmlns:xmlns in the xsl:stylesheet tag, the XMLNS specification seems
pretty clear that this namespace declaration should be automatic.

I'm also not clear what is meant by the statement that the namespace is
not specified by the instruction itself, since that is precisely what
the instruction is doing.

I'ld appreciate guidance on whether to file a bug report, and also if
there is a quick fix or workaround that will let us get building again,
since it is breaking our build tree.

Thanks...


Jonathan S. Shapiro



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