Adding a second Relax NG schema in the way you'd add a Schematron schema is an (in my view) nice approach to constraining a base schema.
It is orthogonal like Schematron: You don't need to know or modify the building blocks that the base schema provides.
Unlike Schematron rules, the additional Relax NG schema may be used by XML editors for content completion.
Those of you who listened to this year's XML Prague presentation [1,2] about adding a Docbook-like grammar to TEI divs already know the concept. In a recent article on XML.com [3], I've applied this approach to HTML, using the HTML-first publishing workflow that Dave Cramer described [4] as an example.
I've called this approach, that to my surprise (and admittedly modest knowledge) was hitherto unheard of, "epischema" (epi = on top of).
Please note that I'm not advocating against the use of Schematron; on the contrary. It's just that there's an alternative way to express a certain class of constraints (grammatical ones), and this alternative provides specific, context-dependent content completion suggestions as a side effect.
Looking forward to receiving your comments.
-Gerrit
[1] http://archive.xmlprague.cz/2017/files/presentations/epische ma/index.html
[2] https://youtu.be/BOHtdnQEokQ?list=PLQpqh98e9RgUcEmbXmI6Rolis QaIRw9dm
[3] https://www.xml.com/articles/2017/04/29/epischemas/
[4] https://www.xml.com/articles/2017/02/20/beyond-xml-making-bo oks-html/
____________________________________________________________ ___________
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php