XSLT with javascript

C

Claudio Jolowicz

I need to produce an HTML page with javascript using XSLT.
Unfortunately, Mozilla has a bug that lets it crash when it encounters
document.write in an XSLT stylesheet (bugzilla# 202765). Are there
XSLT-related workarounds to this bug?

I am aware that mozilla bug discussions are off-topic on this list. This
question concerns only possible alternatives making use of XSLT's
facilities.

Neither linking to an external javascript file, nor embedding the
javascript in the HTML works.

Thanks for any helpful suggestions,

Claudio
 
M

Martin Honnen

Claudio said:
I need to produce an HTML page with javascript using XSLT.
Unfortunately, Mozilla has a bug that lets it crash when it encounters
document.write in an XSLT stylesheet (bugzilla# 202765). Are there
XSLT-related workarounds to this bug?

Instead of using script to insert content while the HTML result document
is loaded you can of course often simply create the content with XSLT
directly as part of the HTML result document, then the content is there
without the need of the browser supporting script and having it enabled.
If you want to selectively create content you can within XSLT check the
XSLT processor for instance
system-property('xsl:vendor')
and only output stuff for Microsoft/MSXML or Mozilla/Transformix.
Or create content unconditionally with XSLT and then include script in
the HTML that manipulates/removes/hides content using W3C DOM methods
like removeChild.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,999
Messages
2,570,246
Members
46,839
Latest member
MartinaBur

Latest Threads

Top