Attached is the schema to do checking. Here is what it
would look like in use.
<pattern xmlns="http://www.ascc.net/xml/schematron" >
<title>Some constraints in Japanese</title>
<p>This pattern sets that the general text in
a document is first-year kanji, except
for the teachersComment element and its
subelements, which can be kanji 6. Attributes
are not constrained to any repertoire.
</p>
<include src="http://www.eg.com/reporertoire/kanji1.xml"/>
<include src="http://www.eg.com/reporertoire/kanji6.xml"/>
<rule context="descendent-or-self::teachersComment">
<extends rule="kanji6"/>
</rule>
<rule context="*">
<extends rule="kanji1">
</rule>
</pattern>
In this case, I have used abstract rules. The Schematron
<include> element gets them from an external file.
Each rule just uses vanilla entities to reduce redeclaration,
but the text could be included.
There might be several other ways to do the same thing, but I
think this gives the most straight-forward instance.
(The attached file has all the files needed, but concated for
ease of transport.)
Cheers
Rick Jelliffe
-- DSDL members discussion list To unsubscribe, please send a message with the command "unsubscribe" to dsdl-discuss-request@dsdl.org (mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:28 UTC