I am working an HTML5 conformance checker. Part of the checker uses a  
RELAX NG schema. I have discovered that both in terms of ease of  
schema development and in terms of the quality of error messages, I  
shouldn't try to handle exclusions in the RELAX NG schema but I  
should first allow the usual nesting in RELAX NG and then restrict  
the exceptions to the rules (exclusions in particular) in Schematron.

However, the schema is also supposed to be useful for driving  
autocompletion in RELAX NG-aware editors like nxml-mode, oXygen and  
Etna. It seems to me that this use case is in constant conflict with  
my conformance checking use case. For autocompletion I should try to  
do everything in RELAX NG to the extent possible. For conformance  
checking I should move to Schematron or custom code right away when  
something isn't super-easy in RELAX NG.

Moreover, trying to implementing exclusions in the main RELAX NG  
schema causes the number of grammar production to roughly double per  
each exclusion pair. This kind of growth is not manageable in a human- 
written schema.

How are others dealing with exclusions in schemas meant for RELAX NG- 
driven editors? Has anyone written a generator that would take a  
simple RELAX NG schema and a list of exclusions and would generate a  
RELAX NG schema equivalent to the simple schema AND the exclusions  
holding at the same time?

-- 
Henri Sivonen
[EMAIL PROTECTED]
http://hsivonen.iki.fi/


Reply via email to