Attention: this essay is no longer current. It has been replaced by RELAX NG Grammars for XSLT 1.0, 2.0, 3.0… from 20 Feb 2012.

Yet more bug fixes for my XSLT 2.0 RELAX NG Grammar. This version validates stylesheets conforming to the 8 June 2006 draft of XSLT 2.0.

In the year or so since I last published this schema, I've made a few fixes (and most recently David[L] offered a few more). Specifically:

The new xslt20.rnc is available. It still works with the (unmodified) xslt10.rnc and xslt.rnc grammars.

Please continue to report any bugs that you find. Share and enjoy!


maybe it's the XDM-spec syndrome biting again but The rnc linked from this page seems to be

# $Id: xslt20.rnc,v 1.3 2005/04/19 11:51:35 ndw Exp $

ie a version from last year, without the changes described.

Posted by David Carlisle on 12 Jul 2006 @ 02:17pm UTC #

In fact, I think the RNC was correct but, (a) I forgot to tell Subversion to update the $Id$ keyword and, (b) I forgot to update the Change Log. Both fixed now.

Posted by Norman Walsh on 12 Jul 2006 @ 02:28pm UTC #

> both fixed now.

and it validates my current stylesheet, thanks. (and for making comments visible)

Posted by David Carlisle on 12 Jul 2006 @ 02:37pm UTC #

Hi Norman... Thanks for these schemas! Excuse me for pimping my software, but I've just released a free Cocoa app called XML Nanny that will graphically validate your instance docs against RNC, RNG, DTD, WXS and Schematron. I thought you mightl like to try it with your RNCs, I just did. It was fun :)

Posted by Todd Ditchendorf on 13 Jul 2006 @ 05:53am UTC #

Woopsie... XML Nanny

Posted by Todd Ditchendorf on 13 Jul 2006 @ 04:59pm UTC #

Thank you for these schema, Norman! I've been using NXML mode for a while with my XSLT 1.0 docs, but I was annoyed with the inability to validate XSLT 2.0 on the fly.

Posted by Ben Norman on 04 Jun 2007 @ 03:35pm UTC #

I found an error in your XSLT 2.0 schema. In xsl:number it says that the select attribute is mandatory but the XSLT spec says it is optional. Actually when you use the value attribute, select isn't even allowed. I added a ? after "attribute select { expression.datatype }" in element number.

Posted by Piet van Oostrum on 28 Oct 2010 @ 11:21pm UTC #

I'm confused, Piet. The "?" is clearly in the xslt20.rnc file linked from this page, so I'm not sure what you changed.

There were earlier versions of xslt20.rnc that might have had that bug, do you possibly have one of them?

Posted by Norman Walsh on 08 Nov 2010 @ 12:05pm UTC #
Comments on this essay are closed. Thank you, spammers.