Subject: [xsl] Problem copying xhtml elements from xml source From: "cking" <cking@xxxxxxxxxx> Date: Tue, 13 Jul 2004 00:39:12 +0200 |
Hello, 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"?> <test-copy-of> <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> ** test-copy-of.xsl: <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" encoding="iso-8859-1" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /> <xsl:template match="/test-copy-of"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>test-copy-of</title> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"/> </head> <body> <div> <xsl:copy-of select="*"/> </div> </body> </html> </xsl:template> </xsl:stylesheet> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] determining the existence, Michael Kay | Thread | Re: [xsl] Problem copying xhtml ele, Josh Canfield |
[xsl] determining the existence of , Esther_Strom | Date | Re: [xsl] Speeding up processing (w, Wendell Piez |
Month |