[xsl] Problem copying xhtml elements from xml source

Subject: [xsl] Problem copying xhtml elements from xml source
From: "cking" <cking@xxxxxxxxxx>
Date: Tue, 13 Jul 2004 00:39:12 +0200

I didn't get many replies, maybe because I didn't include the code,
only the link to my testcase. So here's my question again:
is this a correct way to copy xhtml elements from an xml source file? 

** source xml:

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="test-copy-of.xsl"?>
  <p style="color:red;">a paragraph in <b>red</b></p>
  <p><img src="wood102.jpg" width="149" height="177" alt="wood"/></p>

** test-copy-of.xsl:

    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
  <xsl:template match="/test-copy-of">
    <html xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en">
        <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"/>
          <xsl:copy-of select="*"/>

This works as expected in IE6 and Saxon, but in Mozilla/Firefox,
all formatting is lost (as if only text nodes come through).

The Mozilla folks say that the error is in the stylesheet. The reason
would be, that the elements from the source file are not in the
xhtml namespace. Is that true? And if yes, how can I make this work?

Full testcase at http://users.telenet.be/cking/webstuff/test/copy-of/info.html
Bugreport: http://bugzilla.mozilla.org/show_bug.cgi?id=250921

Thanks for any help!
Anton Triest

Current Thread