- From: CVS User jkosek <cvsmail@w3.org>
- Date: Wed, 26 Dec 2012 20:35:37 +0000
- To: public-multilingualweb-lt-commits@w3.org
Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas In directory gil:/tmp/cvs-serv12830 Added Files: its20.sch Log Message: Initial work on Schematron schema started --- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.sch 2012/12/26 20:35:37 NONE +++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.sch 2012/12/26 20:35:37 1.1 <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2"> <ns uri="http://www.w3.org/2005/11/its" prefix="its"/> <ns uri="http://www.w3.org/1999/xlink" prefix="xlink"/> <pattern> <title>Indicating the Version of ITS</title> <rule context="/*[//*[@its:*] | //its:*]"> <assert test="@its:version | //its:rules/@version">The version is indicated by the ITS version attribute. This attribute is mandatory for the rules element, where it MUST be in no namespace. If there is no rules element in an XML document, a prefixed ITS version attribute (e.g. its:version) MUST be provided at the root element of the document.</assert> <assert test="if (@its:version and //its:rules/@version) then //its:rules/@version = @its:version else true()"> If there is both a version attribute at the root element and a rules element in a document, they MUST NOT specify different versions.</assert> </rule> </pattern> <pattern> <title>Global, Rule-based Selection</title> <rule context="its:rules"> <assert test="every $rules in //its:rules satisfies $rules/@version = current()/@version">If there is more than one rules element in an XML document, the rules from each section are to be processed at the same precedence level. The rules sections are to be read in document order, and the ITS rules with them processed sequentially. The versions of these rules elements MUST NOT be different.</assert> </rule> </pattern> <pattern> <title>Link to External Rules</title> <rule context="its:rules[@xlink:href]"> <assert test="count(doc(resolve-uri(@xlink:href, base-uri()))//its:rules) le 1">The referenced document must be a valid XML document containing at most one rules element.</assert> </rule> </pattern> <pattern> <title>ITS Tools Annotation</title> <rule context="*[@its:annotatorsRef]"> <assert test="every $ref in tokenize(@annotatorsRef, '\s+') satisfies matches($ref, '(translate|localization-note|terminology|directionality|ruby|language-information|elements-within-text|domain|disambiguation|locale-filter|provenance|external-resource|target-pointer|id-value|preserve-space|localization-quality-issue|localization-quality-rating|mt-confidence|allowed-characters|storage-size)\|.+')">The value of annotatorsRef is a space-separated list of references where each reference is composed of two parts: a data category identifier and an IRI. These two parts are separated by a character | VERTICAL LINE (U+007C).</assert> </rule> </pattern> </schema>
Received on Wednesday, 26 December 2012 20:35:38 UTC