Examplotron is moving on

The previous version was from 2003, more then ten years ago but Examplotron is still alive and I have just published a new version.

I do receive mails from people who use and like this lightweight XML schema language and John Cowan is among its supporters.

Transforming schemas, the enlightening talk he gave at Balisage earlier this month is based on an extended version of Examplotron schemas.

The extension consists in supporting default values through the use of square brackets: [this is a default value].

Technically speaking these default values are translated into RELAX NG annotations following the RELAX NG DTD Compatibility specification.

For his purposes John Cowan needs to be able to define default values for elements while the specification defines them for attributes only and that brings an interesting issue:

  • Should we use these standard annotations for attributes only and introduce annotations in another namespace for elements, creating a difference which is kind of artificial?
  • Should we rather use a non standard namespace for both element and attributes values, meaning that no existing tools would be able to recognize them?
  • Should we abuse the namespace defined in the specification and use the same annotations for both elements and attributes?

I personally find none of these alternatives satisfying but I have ended up by implementing the third one. After all you can already use your favorite editor to add these annotations on elements and there is no reason why Examplotron should block you to do the same!

It’s just your choice, take your risk and if you don’t feel comfortable with this feature… just don’t use it!

In addition to the support of default value, this release includes a fix reported by Ben Weaver in the handling of eg:occurs attributes.