]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
its: Refine the XML schema.
authorBruno Haible <bruno@clisp.org>
Mon, 30 Sep 2024 17:18:51 +0000 (19:18 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 30 Sep 2024 17:18:51 +0000 (19:18 +0200)
* gettext-tools/src/its.xsd: Add string constraints.
* gettext-tools/src/its-extensions.xsd: Likewise.

gettext-tools/src/its-extensions.xsd
gettext-tools/src/its.xsd

index b85c3cbe2b132949662b9b67922b100d50fd881d..7f6c762ff2bbad3263d0abacfe8b816e863a54c6 100644 (file)
@@ -49,6 +49,13 @@ Written by Bruno Haible &lt;bruno@clisp.org&gt;, 2024.
 
   <complexType name="EscapeRuleType">
     <attribute name="selector" type="string" use="required"></attribute>
-    <attribute name="escape" type="string" use="required"></attribute>
+    <attribute name="escape" use="required">
+      <simpleType>
+        <restriction base="string">
+          <enumeration value="yes"></enumeration>
+          <enumeration value="no"></enumeration>
+        </restriction>
+      </simpleType>
+    </attribute>
   </complexType>
 </schema>
index a0bfe58eff896ba35580708463c9403030eb4f46..63d71e194719c7c94db777bf99b9265f1a534cf5 100644 (file)
@@ -52,7 +52,14 @@ Written by Bruno Haible &lt;bruno@clisp.org&gt;, 2024.
 
   <complexType name="TranslateRuleType">
     <attribute name="selector" type="string" use="required"></attribute>
-    <attribute name="translate" type="string" use="required"></attribute>
+    <attribute name="translate" use="required">
+      <simpleType>
+        <restriction base="string">
+          <enumeration value="yes"></enumeration>
+          <enumeration value="no"></enumeration>
+        </restriction>
+      </simpleType>
+    </attribute>
   </complexType>
 
   <complexType name="LocNoteRuleType">
@@ -63,7 +70,14 @@ Written by Bruno Haible &lt;bruno@clisp.org&gt;, 2024.
       <element name="locNote" type="string"></element>
     </sequence>
     <attribute name="selector" type="string" use="required"></attribute>
-    <attribute name="locNoteType" type="string" use="required"></attribute>
+    <attribute name="locNoteType" use="required">
+      <simpleType>
+        <restriction base="string">
+          <enumeration value="description"></enumeration>
+          <enumeration value="alert"></enumeration>
+        </restriction>
+      </simpleType>
+    </attribute>
     <attribute name="locNotePointer" type="string" use="optional"></attribute>
     <!-- Valid in XML Schema 1.1 only:
     <xsd:assert test="not(@locNotePointer and locNote)"/>
@@ -72,7 +86,15 @@ Written by Bruno Haible &lt;bruno@clisp.org&gt;, 2024.
 
   <complexType name="WithinTextRuleType">
     <attribute name="selector" type="string" use="required"></attribute>
-    <attribute name="withinText" type="string" use="required"></attribute>
+    <attribute name="withinText" use="required">
+      <simpleType>
+        <restriction base="string">
+          <enumeration value="yes"></enumeration>
+          <enumeration value="nested"></enumeration>
+          <enumeration value="no"></enumeration>
+        </restriction>
+      </simpleType>
+    </attribute>
   </complexType>
 
   <complexType name="PreserveSpaceRuleType">