xml/xsl from chrome

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

xml/xsl from chrome

Attila Szabó
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&amp;M=2&amp;E=1&amp;T=1&amp;C=1&amp;A=1&amp;P=2&amp;O=HUN&amp;in_bookmarklet=1&amp;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&amp;max_hits=100&amp;mode=1&amp;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>
_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml