XSLT with javascript

Discussion in 'XML' started by Claudio Jolowicz, Feb 23, 2005.

  1. 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

    --
    http://www.jolowicz.com
    Claudio Jolowicz, Feb 23, 2005
    #1
    1. Advertising

  2. Claudio Jolowicz wrote:

    > 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.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
    Martin Honnen, Feb 23, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stylus Studio
    Replies:
    0
    Views:
    652
    Stylus Studio
    Aug 3, 2004
  2. Benjamin Hillsley
    Replies:
    3
    Views:
    1,676
    Dimitre Novatchev
    Sep 25, 2003
  3. ted
    Replies:
    1
    Views:
    621
    Laurens
    Jan 26, 2004
  4. Replies:
    2
    Views:
    715
    Henry S. Thompson
    Oct 19, 2005
  5. Replies:
    4
    Views:
    667
Loading...

Share This Page