marcus(_at_)bristav(_dot_)se wrote:
Sorry for posting this off-list but I think it's a bit off-topic for the list...
I think the topic is okay (it's about XSLT related support on a
browser!) so i am replying to the list and take responsibility ;-)
In general, [1] and [2] should provide most of the info you need, but
here's some answers.
All these questions regards Moz XSLT:
- Can one pass DOM nodes into XSLT from the scripting environment?
Not DOM nodes AFAIK. Parameters in general however are supported.
- What happens if the XSLT renders javascript, does it get executed at once
(when rendered into the result tree) or when the result is inserted into the
final document? (I've seen bug reports regarding this)
I have implemented an XML lang that represents ECMAscript (javascript)
for a client that wanted to have his scripts in XML. I also made an XML
to Script stylesheet (even indents properly) that is usually executed on
the client. There have been no bugs regarding script parsing/execution
and I believe my usecase is rather extreme.
- Is it possible to compile and cache stylesheets? (I think it is but I'm not
sure)
Mozilla's implementation is build around an object called XSLTProcessor.
that may remind you of the MSXML implementation.
- You can pass js objects into the stylesheets in IE to do some supporting
stuff. Can you do this in Moz? (I know it breaks XSLT compatibility between but
it's extremely useful in some cases...)
- Can you declare script functions in Moz XSLT (see previous question regarding
comptatibility)?
- Do you have support for node-set()?
No to all three AFAIK. I only care about the last one ;-)
- How is the XPath scripting support in Moz with regards to DOM documents?
Excellent. In IE, you only have selectNodes and selectSingleNode to
apply XPath queries on DOM docs. The result can only be a node of
course. Mozilla on the other hand implements DOM Level 3 XPath [3] (the
ECMAScript bindings of course).
You can also use XPath on HTML docs as well in Moz.
I'm interested since I have built a fairly complex client that uses this (in
IE, which I have learned to truly hate because of bad error messages and some
big memory leaks) and I will probably be interested in porting this in the near
future.
Mozilla's javascript console, javascript debugger and DOM inspector have
prooven themselves as excellent tools in my every day work.
[1] http://www.mozilla.org/projects/xslt/
[2] http://www.mozilla.org/xmlextras/
[3] http://www.w3.org/TR/DOM-Level-3-XPath/
Hope this helps.
--
Manos Batsis
_ __ __ __
/ |/ /__ / /____ __ _ ___ _____/ /_
/ / -_) __(_-</ ' Y _ `/ __/ __/
/_/|_/\__/\__/___/_/_/_|_,_/_/ \__/
http://www.netsmart.gr
mailto:mbatsisSPAM_TRAP(_at_)netsmart(_dot_)gr
tel:+302103240940
http://forte.netsmart.gr/foaf/manos_foaf.rdf