S5, written and developed by Eric Meyer, is an impressive application of web technologies that allows XHTML to be used to create slideshows that can be displayed as dynamic presentations in modern web browsers.
From the S5 homepage:
While it is true in a strict sense that it is "standards-driven" - S5 XHTML files must be valid XHTML files, the actual markup necessary to create a slideshow is only describe in prose.
The S5 1.1 Reference, while thorough and easy to follow, provides no authoritative way to validate a file as being an S5 1.1 compatible XHTML file. In fact, the specification requires that the document type declaration specify it to be an XHTML strict file. While all S5 1.1 files should be valid XHTML files, the S5 format is stricter than XHTML.
Although S5 files can be authored with XML-award editors, or existing editors with XHTML support, there is no authoring support that is specific to S5. A well designed authoring schema can help with that.
Because the S5 specification uses XHTML, it primarily depends on using class attributes on div elements to add semantics. This essentially allows the creation of new pseudo-elements without redefining the DTD. While this makes it extremely easy to use, it causes problems for schema construction.
While it would be possible to create and XML DTD that would constrain the content model of the body element to, for example, only contain div elements, it would not be possible to specify that certain div elements must have certain class attributes.
The Relax NG schema does allow this sort of contextualized definition and constraints of elements of the same name with its grammar-based tools.
Using the existing XHTML modularization in Relax NG by James Clark as a starting point, many of the constraints specified by S5 could be modeled. (Using Trang, these were converted to the Relax NG compact syntax for ease of use.)
The s5.rnc file is identical to the standard xhtml.rnc except that it includes s5-struct.rnc. See that file for details on the defintions. See the rng directory for the complete schema. (All files not prefaced by s5 are from the original XHTML modularization and are unmodified.)
A serious limitation in the current Relax NG schema for S5 is that it imposes restrictions on order that the S5 specification itself does not.
Although the Relax NG interleave construct allows for the general kind of constraint necessary to specify the presence of elements but not their order, it does not allow multiple elements with the same name. This means, for example, it is impossible to specify that some meta elements with different class attributes are necessary, but their order is not important using interleave.
One solution might entail simply having a content model with arbitrary elements before and after each of the required elements, but I do not think it is possible to do this while still maintaining the constraint, for example, that there must be only one meta element with name attribute of "version" and content attribute of "1.1".
Some brief time was spent working on tools to convert S5 to an XML format that used explicit element names rather than inflected div elements, and back again.
Although Emacs can support schema-aware editing using Relax NG with the nxml-mode, my editor of choice XEmacs with PSGML-mode, does not. These style sheets allow a more flexible workflow.
Another option is work can be done in a DTD-aware editor validating against the XHTML schema, and then later could be validated further against the Relax NG schema for S5.