[xslt] Attribute namespace bug



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- From CVS this morning, this stylesheet

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

<xsl:output method="xml"/>

<xsl:template match="/">
  <xsl:element name="doc" namespace="ns1">
    <xsl:attribute name="attr" namespace="ns1">
      <xsl:text>foo!</xsl:text>
    </xsl:attribute>
  </xsl:element>
</xsl:template>

</xsl:stylesheet>

produces

  <doc xmlns="ns1" attr="foo!"/>

where (I believe) it should produce

  <x:doc xmlns:x="ns1" x:attr="foo!"/>

or some other variation thereof. In any event, 'attr' needs an
explicit namespace prefix.

Note: if ns1 and ns2 are different, xsltproc does the right thing, so
I think it's simply an overlooked edge case.

                                        Be seeing you,
                                          norm

- -- 
Norman Walsh <ndw@nwalsh.com> | I never wonder to see men wicked, but I
http://nwalsh.com/            | often wonder to see them not
                              | ashamed.--Swift
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE93imbOyltUcwYWjsRAoqiAJ9/QsgqifSMSlq3UEzrDPy5mzmXAACgiP1E
VJHh9XqA0s/upOHK6wXNZzw=
=KeqA
-----END PGP SIGNATURE-----



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