|
-
Aug 3rd, 2004, 07:12 AM
#1
XML display problem in FireFox?
Is this a problem with firefox?
The following XML file (formatted with XSL) shows up properly in IE, but not in FF:
http://www.w3schools.com/xml/simplexsl.xml
-
Aug 3rd, 2004, 07:15 AM
#2
This is the page I got it from:
http://www.w3schools.com/xml/xml_xsl.asp
Or perhaps this is something proprietary in IE?
-
Aug 3rd, 2004, 09:54 AM
#3
Frenzied Member
It doesn't work properly in Opera either.
-
Aug 3rd, 2004, 10:16 AM
#4
Frenzied Member
Try this as the simple.xsl:
Code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" version="4.01" encoding="utf-8" />
<xsl:template match="/">
<html>
<head>
<title>Transformation!</title>
</head>
<body style="font-family:Arial,helvetica,sans-serif;font-size:12pt; background-color:#EEEEEE">
<xsl:for-each select="breakfast_menu/food">
<div style="background-color:teal;color:white;padding:4px">
<span style="font-weight:bold;color:white">
<xsl:value-of select="name"/>
</span>
<xsl:value-of select="price"/>
</div>
<div style="margin-left:20px;margin-bottom:1em;font-size:10pt">
<xsl:value-of select="description"/>
<span style="font-style:italic">
(
<xsl:value-of select="calories"/>
calories per serving)
</span>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Works in firefox.
It's probably those lines that do the trick:
Code:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" version="4.01" encoding="utf-8" />
Check this out for more examples: http://www.sitepoint.com/forums/showthread.php?t=180363
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|