Don’t call me DOM

21 July 2004

Extracting examples from a specification

Filed under:

While doing a review of the VoiceXML 2.1 first working draft as part of the attempts the W3C QA Team is making at reviewing early drafts, I’ve written up a very small XSLT style sheet which extracts the example of the specification, relying on their mark-up convention where examples are embedded in <div class='exampleInner'>; it uses the saxon:output extension, so that I get one XML file per example, which allows me then to check their well-formedness – and when they become available, their validity with regard to the DTD and the XML Schema.

This very much relates to the discussion in the Wiki about formal languages, especially the section on Testing Formal Languages specifications; while this XSLT is really ad-hoc, if I can come up with a wider sets of mark up conventions matching examples, it can probably be useful to many other specifications that includes complete examples.

2 Responses to “Extracting examples from a specification”

  1. Karl Dubost Says:

    That would be cool to give the results of XSLT as a static file if you think it will overload the XSLT servlet. ;)

  2. Dominique Hazaël-Massieux Says:

    Well, it won’t overload the XSLT servlet, since the said XSLT cannot be run on it: the saxon:output extension can only work with a command line xslt processor. I guess I could post a zip file containing the extracted examples, but since they are exactly as what you can see in the specification, I’m not sure it would be that useful.

Picture of Dominique Hazael-MassieuxDominique Hazaël-Massieux ( is part of the World Wide Web Consortium (W3C) Staff; his interests cover a number of Web technologies, as well as the usage of open source software in a distributed work environment.