Subject: [xsl] xsl not formatting xml correctly in mozilla or firefox From: Andy Ford <andy.ford@xxxxxxxxxxxxxx> Date: Thu, 02 Dec 2004 17:34:45 +0000 |
Hi everyone This is my first post to the list and as you will guess I am a newbie when it comes to xsl I have a very specific problem to overcome. I have been developing an app based aroung Perl, C++, cgi and we are now extending it to xml. In a simple example (pasted below) I am trying to format an xml table with xsl in mozilla and/or firefox (everything to date I have developed works in these two browsers apart from xsl). The example is formatting correctly in IE so I think this may be a mozilla bug, but not sure. In mozilla and firefox (both the latest versions from Gentoo sources) I get ... ForenameSurnameage metal mickey 21 hey bukko 99 experts exchange 10 In IE I get a correctly formatted table with a border around it (what I would expect) Any Ideas would be warmly welcomed. I have wasted many hours on this already. Thanks Andy simple_table.xml ---- <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="simple_table.xsl"?> <root> <person> <forename>metal</forename> <surname>mickey</surname> <age>21</age> </person> <person> <forename>hey</forename> <surname>bukko</surname> <age>99</age> </person> <person> <forename>experts</forename> <surname>exchange</surname> <age>10</age> </person> </root> simple_table.xsl ---- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="root"> <table border="1"> <tr> <td>Forename</td> <td>Surname</td> <td>age</td> </tr> <xsl:apply-templates/> </table> </xsl:template> <xsl:template match="person"> <tr> <xsl:apply-templates/> </tr> </xsl:template> <xsl:template match="forename"> <td> <xsl:apply-templates/> </td> </xsl:template> <xsl:template match="surname"> <td> <xsl:apply-templates/> </td> </xsl:template> <xsl:template match="age"> <td> <xsl:apply-templates/> </td> </xsl:template> </xsl:stylesheet> This e-mail is private and may be confidential and is for the intended recipient only. If misdirected, please notify us by telephone and confirm that it has been deleted from your system and any copies destroyed. If you are not the intended recipient you are strictly prohibited from using, printing, copying, distributing or disseminating this e-mail or any information contained in it. We use reasonable endeavours to virus scan all e-mails leaving the Company but no warranty is given that this e-mail and any attachments are virus free. You should undertake your own virus checking. The right to monitor e-mail communications through our network is reserved by us.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
AW: [xsl] XSLT documentation extrac, Huditsch Roman | Thread | Re: [xsl] xsl not formatting xml co, Jon Gorman |
Re: [xsl] XSLT documentation extrac, Ondrej Rohlik | Date | [xsl] xsl:sort with document(), Jan Limpens |
Month |