XHTML Schema generated from UML

I have created an XML Schema that covers all of XHTML Basic.  There are a
3-4 situations where it is a bit lenient in accepting markup that it
shouldn't, but overall it seems to work quite well.  It's available for
download at:

     http://xmlmodeling.com/examples/xhtml/

What's interesting about this is that the schema was automatically
generated from a UML model.  A white paper is available at the same
location that includes all UML class diagrams for the XHTML Basic modules.
I've written a schema generator that produces schemas from any UML tool
that can export an XMI 1.0 document representing the model.  This model of
XHTML was created using Rational Rose.

This model makes very heavy use of inheritance to capture the XHTML concept
of content groups, such as Flow, Block, Inline, etc.  I have generated two
different schemas: one uses extension of complexType definitions, the other
employs a copy-down strategy to avoid extension.  Both schemas work with
the XSV validator, but XML Spy only works with the non-extension version.
XML Spy produces an error from the other version that appears to be a bug
in that tool (it claims that <h1> does not allow text content, even though
it's defined as 'mixed').  My test document is also available for download.

All comments welcome!

Regards,
  Dave Carlson
  Ontogenics Corp.
  Boulder, Colorado

Received on Sunday, 4 March 2001 22:41:07 UTC