IssueID #1102: restricted allowed values for several attributes

This commit is contained in:
Cyprian Laskowski 2020-03-04 21:50:47 +01:00
parent ce2ffa9f71
commit 6a1f5b0457

View File

@ -69,7 +69,13 @@
<xsd:complexType name="lexemeType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string"/> <!-- hmm: should probably restrict possible values? currently seems to be "compound" or empty -->
<xsd:attribute name="type"> <!-- hmm, what types are expected; currently either missing or "argument", but does that really make sense? -->
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="argument"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="lexical_unit_lexeme_id" type="xsd:int"/> <!-- ID within its lexical unit -->
<xsd:attribute name="sloleks" type="xsd:string"/> <!-- Sloleks ID -->
<xsd:attribute name="kol" type="xsd:string"/> <!-- hmm, legacy attribute for a collocate's lemma; why not just use @lemma? -->
@ -88,7 +94,14 @@
</xsd:choice>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int" use="required"/>
<xsd:attribute name="type" type="xsd:string" use="required"/> <!-- should probably restrict possible values in line with superbaza lexical_unit_type -->
<xsd:attribute name="type" use="required"> <!-- types of headwords allowed; hmm, probably should standardise allowed settings -->
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="single"/>
<xsd:enumeration value="MWE"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="structure_id" type="xsd:int"/> <!-- syntactic structure ID -->
<xsd:attribute name="origin" type="xsd:string"/> <!-- legacy attribute to track where the lexical unit came from -->
</xsd:complexType>
@ -123,7 +136,7 @@
<xsd:complexType name="measureType">
<xsd:simpleContent>
<xsd:extension base="xsd:decimal">
<xsd:attribute name="type" type="xsd:string" use="required"/> <!-- type of measure (e.g., frequency, logDice) -->
<xsd:attribute name="type" type="xsd:string" use="required"/> <!-- type of measure (e.g., frequency, logDice); hmm, probably should be enumerated -->
<xsd:attribute name="source" type="xsd:string"/> <!-- context of the measure, probably corpus name and version -->
</xsd:extension>
</xsd:simpleContent>
@ -250,7 +263,7 @@
<xsd:sequence>
<xsd:element name="comp" type="compType" maxOccurs="unbounded"/> <!-- the tree contains one or more components -->
</xsd:sequence>
<xsd:attribute name="role" type="xsd:string"/> <!-- should probably be a valid value from semanticRoleType -->
<xsd:attribute name="role" type="semanticRoleType"/>
</xsd:complexType>
<!-- Example sentence from a corpus (as opposed to a multi-word example) -->
@ -393,7 +406,14 @@
<xsd:sequence>
<xsd:element name="syntacticStructure" type="syntacticStructureType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="system" type="xsd:string"/> <!-- probably JOS or UD -->
<xsd:attribute name="system"> <!-- the system within which the structure is defined -->
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="JOS"/>
<xsd:enumeration value="UD"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
</xsd:complexType>
<!-- Container associating a semantic role with a list of syntactic structures -->