Re: Wanted: Example of using javascript to dynamically perform XSLT using data islands

Martin Honnen <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Liberty Development
Message-ID <[email protected]>

Siegfried Heintze wrote:

> I'm trying to write a page that dynamically preforms XSLT. Here is my
> attempt, it is not working. I cannot figure out why it won't load my data
> islands to do the transform.

HTML 4 doesn't know XML data islands, only IE/Win has extended its very 
own version of HTML with something called XML data islands. Mozilla 
certainly doesn't know anything about XML data islands, all it sees is 
an unknown (to the HTML parser) element with tag name XML inside of an 
HTML document (and further unknown (to the HTML parser) elements inside 
of the <XML> element). I know there are some articles on the web 
suggesting you can use XML data islands with Mozilla but I see no sense 
in that, it is only asking for trouble (in particular if you want to use 
XML with namespaces inside the XML data island) as all you are dealing 
with a unknown elements in a HTML document and not something understood 
as XML elements with proper tag names, namespace etc.
Both IE/Win and Mozilla allow you to perform XML loading and XML 
transformation with script without any need of XML data islands so I 
would stronly suggest to use script to load and transform your XML and 
simpy forget about XML data islands (unless you know for sure you are 
writing for IE/Win only and have special needs like data binding).
There is even a library easing the task of loading, manipulating and 
transforming XML in cross browser (well IE/Win and Mozilla when it comes 
to XSLT) development:
   <http://sarissa.sourceforge.net/doc/>



-- 

	Martin Honnen
	http://JavaScript.FAQTs.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.