Schematron
|
|
❶ |
The page's URI based on |
❷ |
Stable
|
❸ |
Unstable
|
- Requirement
-
Important elements (
<chapter>
,<section>
,<table>
...) must provide an xml:id value. - Implementation choices
-
-
Modify underlying RelaxNG schema.
Result: Restricted schema (Inheritance relationship)
-
Add Schematron integrity rule on top of schema.
-
<s:pattern>
<s:title>Mandatory Id definition constraint</s:title>
<s:rule context="db:chapter|db:section|db:table|db:qandaset">
<s:assert test="@xml:id"
>Each chapter,section, table ... must have a unique id.</s:assert>
</s:rule>
</s:pattern>