CVS WWW/International/multilingualweb/lt/drafts/its20/schemas

Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas
In directory gil:/tmp/cvs-serv13773/schemas

Modified Files:
	its20.rnc its20.rng its20.sch 
Log Message:
Small schema updates

--- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.rnc	2013/04/04 09:13:17	1.20
+++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.rnc	2013/04/09 11:44:22	1.21
@@ -209,9 +209,9 @@
   ((its-attribute.locNote | its-attribute.locNoteRef), its-attribute.locNoteType?)? &
   (its-attribute.term, its-attribute.termInfoRef?, its-attribute.termConfidence?)? &
   its-attribute.withinText? &
-  its-attribute.taConfidence? &
-  its-attribute.taClassRef? &
-  ((its-attribute.taSource, its-attribute.taIdent) | its-attribute.taIdentRef)? &
+  (its-attribute.taConfidence? &
+   (its-attribute.taClassRef |
+    ((its-attribute.taSource, its-attribute.taIdent) | its-attribute.taIdentRef))+)? &
   (its-attribute.localeFilterList, its-attribute.localeFilterType?)? &
   ((
    (its-attribute.person | its-attribute.personRef )? &
@@ -225,7 +225,7 @@
    its-attribute.provenanceRecordsRef)? &
   (its-attribute.locQualityIssuesRef
   | 
-  (its-attribute.locQualityIssueType? & its-attribute.locQualityIssueComment? & its-attribute.locQualityIssueSeverity? & its-attribute.locQualityIssueProfileRef? & its-attribute.locQualityIssueEnabled?)
+  ((its-attribute.locQualityIssueType | its-attribute.locQualityIssueComment)+ & its-attribute.locQualityIssueSeverity? & its-attribute.locQualityIssueProfileRef? & its-attribute.locQualityIssueEnabled?)
   )? &
   (((its-attribute.locQualityRatingScore, its-attribute.locQualityRatingScoreThreshold?) | (its-attribute.locQualityRatingVote, its-attribute.locQualityRatingVoteThreshold?)), its-attribute.locQualityRatingProfileRef?)? &
   its-attribute.mtConfidence? &
@@ -239,9 +239,9 @@
   ((its-attribute.locNote.nons | its-attribute.locNoteRef.nons), its-attribute.locNoteType.nons?)? &
   (its-attribute.term.nons, its-attribute.termInfoRef.nons?, its-attribute.termConfidence.nons?)? &
   its-attribute.withinText.nons? &
-  its-attribute.taConfidence.nons? &
-  its-attribute.taClassRef.nons? &
-  ((its-attribute.taSource.nons, its-attribute.taIdent.nons) | its-attribute.taIdentRef.nons)? &
+  (its-attribute.taConfidence.nons? &
+   (its-attribute.taClassRef.nons |
+    ((its-attribute.taSource.nons, its-attribute.taIdent.nons) | its-attribute.taIdentRef.nons))+)? &
   (its-attribute.localeFilterList.nons, its-attribute.localeFilterType.nons?)? &
   ((
    (its-attribute.person.nons | its-attribute.personRef.nons )? &
@@ -254,7 +254,7 @@
    | its-attribute.provenanceRecordsRef)? &
   (its-attribute.locQualityIssuesRef.nons
   | 
-  (its-attribute.locQualityIssueType.nons? & its-attribute.locQualityIssueComment.nons? & its-attribute.locQualityIssueSeverity.nons? & its-attribute.locQualityIssueProfileRef.nons? & its-attribute.locQualityIssueEnabled.nons?)
+  ((its-attribute.locQualityIssueType.nons | its-attribute.locQualityIssueComment.nons)+ & its-attribute.locQualityIssueSeverity.nons? & its-attribute.locQualityIssueProfileRef.nons? & its-attribute.locQualityIssueEnabled.nons?)
   )? &
   (((its-attribute.locQualityRatingScore.nons, its-attribute.locQualityRatingScoreThreshold.nons?) | (its-attribute.locQualityRatingVote.nons, its-attribute.locQualityRatingVoteThreshold.nons?)), its-attribute.locQualityRatingProfileRef.nons?)? &
   its-attribute.mtConfidence.nons? &
@@ -514,7 +514,7 @@
   its-attribute.selector,
   ((its-attribute.locQualityIssuesRef.nons | its-attribute.locQualityIssuesRefPointer.nons)
    |
-   ((its-attribute.locQualityIssueType.nons? & its-attribute.locQualityIssueComment.nons?)
+   ((its-attribute.locQualityIssueType.nons | its-attribute.locQualityIssueComment.nons)+
   ,
   its-attribute.locQualityIssueSeverity.nons?,
   its-attribute.locQualityIssueProfileRef.nons?,
--- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.rng	2013/04/04 09:13:17	1.17
+++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.rng	2013/04/09 11:44:22	1.18
@@ -610,19 +610,23 @@
         <ref name="its-attribute.withinText"/>
       </optional>
       <optional>
-        <ref name="its-attribute.taConfidence"/>
-      </optional>
-      <optional>
-        <ref name="its-attribute.taClassRef"/>
-      </optional>
-      <optional>
-        <choice>
-          <group>
-            <ref name="its-attribute.taSource"/>
-            <ref name="its-attribute.taIdent"/>
-          </group>
-          <ref name="its-attribute.taIdentRef"/>
-        </choice>
+        <interleave>
+          <optional>
+            <ref name="its-attribute.taConfidence"/>
+          </optional>
+          <oneOrMore>
+            <choice>
+              <ref name="its-attribute.taClassRef"/>
+              <choice>
+                <group>
+                  <ref name="its-attribute.taSource"/>
+                  <ref name="its-attribute.taIdent"/>
+                </group>
+                <ref name="its-attribute.taIdentRef"/>
+              </choice>
+            </choice>
+          </oneOrMore>
+        </interleave>
       </optional>
       <optional>
         <ref name="its-attribute.localeFilterList"/>
@@ -680,12 +684,12 @@
         <choice>
           <ref name="its-attribute.locQualityIssuesRef"/>
           <interleave>
-            <optional>
-              <ref name="its-attribute.locQualityIssueType"/>
-            </optional>
-            <optional>
-              <ref name="its-attribute.locQualityIssueComment"/>
-            </optional>
+            <oneOrMore>
+              <choice>
+                <ref name="its-attribute.locQualityIssueType"/>
+                <ref name="its-attribute.locQualityIssueComment"/>
+              </choice>
+            </oneOrMore>
             <optional>
               <ref name="its-attribute.locQualityIssueSeverity"/>
             </optional>
@@ -767,19 +771,23 @@
         <ref name="its-attribute.withinText.nons"/>
       </optional>
       <optional>
-        <ref name="its-attribute.taConfidence.nons"/>
-      </optional>
-      <optional>
-        <ref name="its-attribute.taClassRef.nons"/>
-      </optional>
-      <optional>
-        <choice>
-          <group>
-            <ref name="its-attribute.taSource.nons"/>
-            <ref name="its-attribute.taIdent.nons"/>
-          </group>
-          <ref name="its-attribute.taIdentRef.nons"/>
-        </choice>
+        <interleave>
+          <optional>
+            <ref name="its-attribute.taConfidence.nons"/>
+          </optional>
+          <oneOrMore>
+            <choice>
+              <ref name="its-attribute.taClassRef.nons"/>
+              <choice>
+                <group>
+                  <ref name="its-attribute.taSource.nons"/>
+                  <ref name="its-attribute.taIdent.nons"/>
+                </group>
+                <ref name="its-attribute.taIdentRef.nons"/>
+              </choice>
+            </choice>
+          </oneOrMore>
+        </interleave>
       </optional>
       <optional>
         <ref name="its-attribute.localeFilterList.nons"/>
@@ -837,12 +845,12 @@
         <choice>
           <ref name="its-attribute.locQualityIssuesRef.nons"/>
           <interleave>
-            <optional>
-              <ref name="its-attribute.locQualityIssueType.nons"/>
-            </optional>
-            <optional>
-              <ref name="its-attribute.locQualityIssueComment.nons"/>
-            </optional>
+            <oneOrMore>
+              <choice>
+                <ref name="its-attribute.locQualityIssueType.nons"/>
+                <ref name="its-attribute.locQualityIssueComment.nons"/>
+              </choice>
+            </oneOrMore>
             <optional>
               <ref name="its-attribute.locQualityIssueSeverity.nons"/>
             </optional>
@@ -1362,14 +1370,12 @@
         <ref name="its-attribute.locQualityIssuesRefPointer.nons"/>
       </choice>
       <group>
-        <interleave>
-          <optional>
+        <oneOrMore>
+          <choice>
             <ref name="its-attribute.locQualityIssueType.nons"/>
-          </optional>
-          <optional>
             <ref name="its-attribute.locQualityIssueComment.nons"/>
-          </optional>
-        </interleave>
+          </choice>
+        </oneOrMore>
         <optional>
           <ref name="its-attribute.locQualityIssueSeverity.nons"/>
         </optional>
--- /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.sch	2013/01/15 10:17:50	1.3
+++ /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/schemas/its20.sch	2013/04/09 11:44:22	1.4
@@ -7,10 +7,17 @@
     <rule context="*[@its:*]">
       <assert test="ancestor-or-self::*/@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 on the element where the ITS markup is used, or on one of its ancestors.</assert>
     </rule>
+    <rule context="its:provenanceRecords | its:locQualityIssues">
+      <assert test="self::*/@version | ancestor::*/@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 on the element where the ITS markup is used, or on one of its ancestors. For standoff markup unprefixed version attribute is used.</assert>
+    </rule>
     <rule context="*[@its:version]">
       <assert test="if (@its:version and //its:rules/@version) then //its:rules/@version = @its:version else true()">There MUST NOT be two different versions of ITS in the same document.</assert>
       <assert test="every $v in //*/@its:version satisfies $v = @its:version">There MUST NOT be two different versions of ITS in the same document.</assert>
     </rule>
+    <rule context="its:provenanceRecords | its:locQualityIssues">
+      <assert test="if (@version and //its:rules/@version) then //its:rules/@version = @version else true()">There MUST NOT be two different versions of ITS in the same document.</assert>
+      <assert test="every $v in //*/@its:version satisfies $v = @version">There MUST NOT be two different versions of ITS in the same document.</assert>
+    </rule>
   </pattern>
   <pattern>
     <title>Global, Rule-based Selection</title>
@@ -27,13 +34,25 @@
   <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>
+      <assert test="every $ref in tokenize(@its:annotatorsRef, '\s+') satisfies matches($ref, '(translate|localization-note|terminology|directionality|ruby|language-information|elements-within-text|domain|text-analysis|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>
+  <pattern>
+    <title>Source of confidence</title>
+    <rule context="*[@its:termConfidence]">
+      <assert test="ancestor-or-self::*[@its:annotatorsRef][matches(@its:annotatorsRef, '.*\s*terminology\|.+')]">Any node selected by the terminology data category with the termConfidence attribute specified MUST be contained in an element with the annotatorsRef attribute specified for the Terminology data category.</assert>
+    </rule>
+    <rule context="*[@its:taConfidence]">
+      <assert test="ancestor-or-self::*[@its:annotatorsRef][matches(@its:annotatorsRef, '.*\s*text-analysis\|.+')]">Any node selected by the Text Analysis data category with the taConfidence attribute specified MUST be contained in an element with the annotatorsRef attribute specified for the Text Analysis data category.</assert>
+    </rule>
+    <rule context="*[@its:mtConfidence]">
+      <assert test="ancestor-or-self::*[@its:annotatorsRef][matches(@its:annotatorsRef, '.*\s*mt-confidence\|.+')]">Any node selected by the MT Confidence data category MUST be contained in an element with the annotatorsRef attribute specified for the MT Confidence data category.</assert>
     </rule>
   </pattern>
   <pattern>
-    <title>Disambiguation</title>
-    <rule context="its:disambiguationRule">
-      <assert test="@disambigClassPointer | @disambigClassRefPointer | @disambigSourcePointer | @disambigIdentPointer | @disambigIdentRefPointer">Disambiguation rule must specify at least target type class or target identity.</assert>
+    <title>Text analysis</title>
+    <rule context="its:textAnalysisRule">
+      <assert test="@taClassRefPointer | @taSourcePointer | @taIdentPointer | @taIdentRefPointer">Text analysis rule must specify at least target type class or target identity.</assert>
     </rule>
   </pattern>
   <pattern>

Received on Tuesday, 9 April 2013 11:44:23 UTC