emacsxslt-2.0nxml

XSLT 2.0 support in emacs nXML mode


I'm editing an XSLT 2.0 document in emacs and get an "attribute value invalid" error on the version number, i.e.,

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

If I replace the "2.0" with "1.0" I don't get an error in emacs (but then there are errors processing the stylesheet).

Does emacs not support XSLT 2.0? Is there some external schema I can get that will work? Worst case, will nXML still help me correctly with the rest of the document, even if I just live with this error?


Solution

  • Norman Walsh's xslt20.rnc schema should do the trick. See https://github.com/ndw/xslt-relax-ng.

    You can register xslt.rnc as the schema document for both XSLT 1.0 and 2.0 (it references xslt10.rnc and xslt20.rnc).