[Home] [By Thread] [By Date] [Recent Entries]

  • To: "Francois Liot" <fliot@k...>
  • Subject: RE: Transforming XML to HTML browser side
  • From: "Manos Batsis" <m.batsis@b...>
  • Date: Mon, 13 May 2002 15:11:57 +0300
  • Cc: <xml-dev@l...>
  • Thread-index: AcH6a1PrNCRRHrODQ5C6v62KPgT74gAChizA
  • Thread-topic: 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@k...] 
Sent: Monday, May 13, 2002 1:46 PM
To: xml-dev@l...
Subject:  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.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member