[
Lists Home |
Date Index |
Thread Index
]
- To: "Francois Liot" <fliot@kyriba.com>
- Subject: RE: [xml-dev] Transforming XML to HTML browser side
- From: "Manos Batsis" <m.batsis@bsnet.gr>
- Date: Mon, 13 May 2002 15:11:57 +0300
- Cc: <xml-dev@lists.xml.org>
- Thread-index: AcH6a1PrNCRRHrODQ5C6v62KPgT74gAChizA
- Thread-topic: [xml-dev] Transforming XML to HTML browser side
Last time I checked Mozilla could load and transform an XML doc using
the stylesheet in the xml-stylesheet PI. An equal to the transformNode()
method (to control transformations using script) was also on the way
according to bugzilla but haven't checked since then (that was two
months ago). If anyone knows more...
Also, you won't be able to load a DOM document in Mozilla using progIds;
M$ decided not to use the recommended factory methods. Try [1], it has
some nice examples of cross browser DOM scripting, including loading
documents.
[1] http://www.oreilly.com/catalog/jscript4/chapter/ch17.html
Hth,
Manos
-----Original Message-----
From: Francois Liot [mailto:fliot@kyriba.com]
Sent: Monday, May 13, 2002 1:46 PM
To: xml-dev@lists.xml.org
Subject: [xml-dev] Transforming XML to HTML browser side
Hello,
With IE it's simple to use XSLT processing though Javascript (+ MSXML)
The IE method is :
<script type="text/javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("cdcatalog.xml")
// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("cdcatalog.xsl")
// Transform
document.write(xml.transformNode(xsl))
</script>
It offers a very flexible way to desing interface with on-the-fly reuse
of XML data....
Does it exist such method for Netscape/Mozilla (on versions were XSLT
processing is not a problem of course...)
Thanks.
|