xml/xsl from chrome
"Attila Szabó" <[email protected]> Thu, 31 Aug 2006 16:30:54 +0200
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Message-ID | <[email protected]> |
I would like to display an xml file (dictionaries.xml) transformed into html
by an xsl (dictionaries.xsl) from *chrome context*.
All is OK when i use file:///dictionaries.xml (not from chrome, href
relative), but from chrome (
window.open(chrome://mid/content/dictionaries.xml'
) i get an empty display, and by view source i see my XML file.
Could sombody give me an idea what can be wrong?
Browser: FF1.5.06, Linux
TIA
SzA
Here is the XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl"
href="chrome://mid/content/dictionaries.xsl"?>
<dictionaries>
<dict label="SZTAKI En-Hu"
dictid="52011af6-d56a-4db2-a34f-a24311fd59d0"
home="http://szotar.sztaki.hu"
url="
http://szotar.sztaki.hu/dict_search.php?L=ENG:HUN:EngHunDict&M=2&E=1&T=1&C=1&A=1&P=2&O=HUN&in_bookmarklet=1&W=XXX
"
method="normal"
checked="true"
fav="http://www.sztaki.hu/favicon.ico"
js="disabled"
type="en_hu" />
<dict label="Vonyó-Drótos En-Hu"
dictid="d57a2708-4f64-4190-ac49-cf749d283669"
home="http://www.cab.u-szeged.hu/"
url="
http://www.cab.u-szeged.hu/cgi-bin/szotarE?search_term=XXX&max_hits=100&mode=1&diction=E
"
method="normal"
checked="true"
fav="chrome://mid/content/icons/vonyo.png"
js="disabled"
type="en_hu"/>
</dictionaries>
end the XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="
1.0" >
<xsl:output method="html" doctype-public="--//W3C//DTD HTML
4.0Transitional//EN" />
<xsl:template match="/">
<html>
<body>
<h2>My dicos </h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Name</th>
<th align="left">Url</th>
</tr>
<xsl:for-each select="dictionaries/dict">
<xsl:sort select="@label"/>
<tr>
<td><xsl:value-of select="@label"/></td>
<td><xsl:value-of select="@url"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>