Valid-pattern-only validation in Relax NG?
Posted: Tue Dec 02, 2008 5:50 pm
Hi George,
Quick question. I'm making a big set of RelaxNG schemas that are composed together out of a lot of modular files.
Many of the modular files are intended purely for inclusion in other schemas by means of <externalRef> (i.e. they are in effect RelaxNG "code macros").
Some of these files consist of code fragments that are valid patterns, but are not valid as standalone schemas, usually because they lack a <start> element.
It would be nice to have a way of telling oNVDL that I want these files validated as patterns only, but not as standalones. That would prevent oNVDL from complaining about the lack of a <start> element in these files (and sometimes about other issues that are related to the lack of a <start> element).
Seems like one way to do this would be to have a processing instruction that would tell oNVDL to "cool it" when all I want is pattern validation, not validation as a standalone.
What do you think?
John
P.S. Oh -- and I just thought of a really trivial answer to this, which doesn't involve oNVDL at all, but just involves the oXygen front end: can you have an option under Document Checking to make "missing <start> element" show up as a warning (yellow light) instead of an error (red light)? In fact, could you have a user option under Document Checking to specify that certain user-specified errors get visually flagged in the validation status bars as warnings only? Or perhaps with custom colors?
Quick question. I'm making a big set of RelaxNG schemas that are composed together out of a lot of modular files.
Many of the modular files are intended purely for inclusion in other schemas by means of <externalRef> (i.e. they are in effect RelaxNG "code macros").
Some of these files consist of code fragments that are valid patterns, but are not valid as standalone schemas, usually because they lack a <start> element.
It would be nice to have a way of telling oNVDL that I want these files validated as patterns only, but not as standalones. That would prevent oNVDL from complaining about the lack of a <start> element in these files (and sometimes about other issues that are related to the lack of a <start> element).
Seems like one way to do this would be to have a processing instruction that would tell oNVDL to "cool it" when all I want is pattern validation, not validation as a standalone.
What do you think?

John
P.S. Oh -- and I just thought of a really trivial answer to this, which doesn't involve oNVDL at all, but just involves the oXygen front end: can you have an option under Document Checking to make "missing <start> element" show up as a warning (yellow light) instead of an error (red light)? In fact, could you have a user option under Document Checking to specify that certain user-specified errors get visually flagged in the validation status bars as warnings only? Or perhaps with custom colors?