Skip to content

Define XSLTProcessor #181

Open
Open

Description

@annevk

See https://wiki.whatwg.org/wiki/DOM_XSLTProcessor. Per whatwg/html#738 this is implemented in all browsers now.

Activity

  1. foolip commented on Feb 29, 2016

    @foolip
    Member

    These are the surface-level differences between Gecko and Blink that I added as TODOs in our IDL file:

    • In Gecko, the transformTo*() methods throw an exception in case of error, while Blink returns null.
    • In Gecko, it's possible to set and get back any parameter value, not just DOMString.

    For the error handling, I think it probably doesn't matter much for compat if we return null or throw an exception. For parameter values, supporting any value type would be slightly more code, and since it's apparently not needed for compat I think just DOMString would be better.

  2. foolip commented on Feb 29, 2016

    @foolip
    Member
  3. added a commit that references this issue on Apr 16, 2021
  4. foolip commented on Apr 16, 2021

    @foolip
    Member

    I've sent #972 to define just the XSLTProcessor interface, pointing back to this issue.

    I went ahead and queried HTTP Archive for "new XSLTProcessor" to see what current usage looks like, and put the results in https://gist.github.com/foolip/d59bd1ab27b2c93a1a37b434074ea410.

    It's "only" 7-8k sites, but my sense is that this is going to be found in more "enterprise-y" sites and that it's stuff nobody is around to maintain any longer. https://affiliates.skrill.com/includes/scripts/xmlxsl.js is a good example, where if that code is actually used (not checked) all modern browsers would go down the TransformXML_Moz path and break at the new XSLTProcessor() call.

  5. foolip commented on Apr 16, 2021

    @foolip
    Member

    I also looked up sites that trigger Chrome's use counter, at looked at https://www.athome.co.jp/ as a sample. I did delete window.XSLTProcessor and the result at the bottom of the page is:
    image

    But it should look like this:
    image

    Since it seems relatively easy to find things that will break, I'm not very optimistic about getting rid of XSLT from the platform. I think at the very least a drop-in JavaScript implementation of XSLTProcessor would be needed to help people transition, and that's a lot of work...

  6. added a commit that references this issue on Apr 21, 2021
  7. foolip commented on Apr 22, 2021

    @foolip
    Member

    Since I formatted it nicely in web-platform-tests/wpt#28639, I'll repeat it here. Additional details on XSLT in HTML:

  8. deleted a comment from on Sep 5, 2022
  9. alethkit commented on Oct 21, 2025

    @alethkit

    What work would need to be done in order for XSLTProcessor to be compatible with XSLT 3.0, as described here: https://www.w3.org/TR/xslt-30/ ?

    [I presume the following issue is relevant: https://github.com/whatwg/html/issues/11578]

  10. annevk commented on Oct 29, 2025

    @annevk
    MemberAuthor

    @alethkit you'd have to convince implementers and all implementers are in support of removing that class so I don't see that happening. See https://whatwg.org/working-mode#changes and https://whatwg.org/faq for some background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions