IssueID #937: split xsd into inventory and concrete schema and updated schema and example

simon
Cyprian Laskowski 5 years ago
parent 67c86dbcb8
commit 108ff8383f

@ -1,78 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<dictionary>
<entry>
<head>
<status>AE</status>
<headword>
<lemma>bolnišnica</lemma> <!-- required -->
<homonymy> <!-- optional (used when lemma disambiguation is needed) -->
<feature name="pronunciation">bolníšnica</feature>
<feature name="blahblah">xyz</feature>
<feature name="bluhbluh">abc</feature>
</homonymy>
</headword>
<lexical_unit id="34242" type="single">
<lexeme lexical_unit_lexeme_id="535342">bolnišnica</lexeme>
</lexical_unit>
<grammar>
<category>samostalnik</category>
<!-- tu damo se druge podrobne lastnosti (spol, itd), ko dolocimo -->
</grammar>
<measureList>
<measure type="frequency" source="Gigafida 1.0">151686</measure>
</measureList>
<variantList>
<variant lexical_unit_id="12345"></variant>
</variantList>
<labelList>
<label type=""></label>
</labelList>
<comment></comment>
</head>
<body>
<senseList>
<sense id="834324">
<labelList>
<label type="domain">Construction</label>
</labelList>
<definitionList>
<definition type="indicator">object</definition>
<definition type="general">an object for living</definition>
</definitionList>
<translationContainerList>
<translationContainer cluster="1">
<labelList>
<label type=""></label>
</labelList>
<translation targetLang="hun">hiša</translation>
<explanation/>
</translationContainer>
<translationContainer cluster="1">
<labelList/>
<translation targetLang="hun">dom</translation>
</translationContainer>
</translationContainerList>
<exampleContainerList>
<exampleContainer>
<example corpus_id="7" modified="YES">Kupili smo veliko <h>hišo</h>.</example>
<translationContainer>
<labelList/>
<translation targetLang="hun"></translation>
</translationContainer>
</exampleContainer>
</exampleContainerList>
</sense>
</senseList>
</body>
</entry>
</dictionary>

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<dictionary>
<entry>
<head>
<status>AE</status>
<headword>
<lemma>bolnišnica</lemma> <!-- required -->
<homonymy> <!-- optional (used when lemma disambiguation is needed) -->
<homonymyFeature name="pronunciation">bolníšnica</homonymyFeature>
<homonymyFeature name="blahblah">xyz</homonymyFeature>
<homonymyFeature name="bluhbluh">abc</homonymyFeature>
</homonymy>
</headword>
<lexicalUnit id="34242" type="single">
<lexeme lexical_unit_lexeme_id="535342">bolnišnica</lexeme>
</lexicalUnit>
<grammar>
<category>samostalnik</category>
<grammarFeature name="gender">feminine</grammarFeature>
</grammar>
<measureList>
<measure type="frequency" source="Gigafida 1.0">151686</measure>
</measureList>
<variantList>
<variant lexical_unit_id="12345"></variant>
</variantList>
<relatedEntryList>
<relatedEntry lexical_unit_id="56788"></relatedEntry>
<relatedEntry lexical_unit_id="56789"></relatedEntry>
</relatedEntryList>
<labelList>
<label type="sometype">value3</label>
</labelList>
<comment></comment>
</head>
<body>
<senseList>
<sense id="834324">
<labelList>
<label type="number">plural</label>
<label type="domain">Construction</label>
</labelList>
<definitionList>
<definition type="indicator">object</definition>
<definition type="general">an object for living</definition>
</definitionList>
<translationContainerList>
<translationContainer cluster="1">
<labelList>
<label type="type3">value7</label>
</labelList>
<translation targetLang="hun" source="source1">hiša</translation>
<explanation/>
</translationContainer>
<translationContainer cluster="1">
<translation targetLang="hun">dom</translation>
</translationContainer>
</translationContainerList>
<exampleContainerList>
<exampleContainer>
<corpusExample example_id="4343" modified="true">Kupili smo <comp role="headword">hišo</comp>.</corpusExample>
<translationContainer>
<labelList>
<label type="type5">value8</label>
</labelList>
<translation targetLang="hun">Blah blah blah 1.</translation>
</translationContainer>
</exampleContainer>
<exampleContainer>
<multiwordExample lexical_unit_id="19" type="collocation">
<comp role="collocate">velika</comp>
<comp role="headword">hiša</comp>
</multiwordExample>
<translationContainer>
<translation targetLang="hun" source="source2">blah blah2</translation>
</translationContainer>
</exampleContainer>
<exampleContainer>
<corpusExample example_id="552439" modified="false" lexical_unit_id="19">Kupili smo <comp role="collocate">veliko</comp> <comp role="headword">hišo</comp>.</corpusExample>
<translationContainer>
<translation targetLang="hun" source="source2">Blah blah blah 3.</translation>
</translationContainer>
</exampleContainer>
</exampleContainerList>
</sense>
</senseList>
</body>
</entry>
</dictionary>

@ -0,0 +1,204 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<xsd:simpleType name="statusType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="lemmaType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="commentType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:complexType name="homonymyType">
<xsd:sequence>
<xsd:element name="homonymyFeature" type="homonymyFeatureType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="grammarFeatureType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="homonymyFeatureType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="headwordType">
<xsd:sequence>
<xsd:element name="lemma" type="lemmaType"/>
<xsd:element name="homonymy" type="homonymyType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="lexemeType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lexical_unit_lexeme_id" type="xsd:int"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="lexicalUnitType">
<xsd:sequence>
<xsd:element name="lexeme" type="lexemeType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int" use="required"/>
<xsd:attribute name="type" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:simpleType name="categoryType">
<!-- The closed set of expected categories. -->
<xsd:restriction base="xsd:string">
<xsd:enumeration value="samostalnik"/>
<xsd:enumeration value="glagol"/>
<xsd:enumeration value="pridevnik"/>
<xsd:enumeration value="prislov"/>
<xsd:enumeration value="zaimek"/>
<xsd:enumeration value="števnik"/>
<xsd:enumeration value="predlog"/>
<xsd:enumeration value="veznik"/>
<xsd:enumeration value="členek"/>
<xsd:enumeration value="medmet"/>
<xsd:enumeration value="okrajšava"/>
<xsd:enumeration value="neuvrščeno"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="grammarType">
<xsd:sequence>
<xsd:element name="category" type="categoryType" minOccurs="0"/>
<xsd:element name="grammarFeature" type="grammarFeatureType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="measureType">
<xsd:simpleContent>
<xsd:extension base="xsd:decimal">
<xsd:attribute name="type" type="xsd:string" use="required"/>
<xsd:attribute name="source" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="measureListType">
<xsd:sequence>
<xsd:element name="measure" type="measureType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="variantType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lexical_unit_id" type="xsd:int"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="variantListType">
<xsd:sequence>
<xsd:element name="variant" type="variantType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="relatedEntryType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lexical_unit_id" type="xsd:int"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="relatedEntryListType">
<xsd:sequence>
<xsd:element name="relatedEntry" type="relatedEntryType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="labelType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="feature_id" type="xsd:int"/>
<xsd:attribute name="type" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="labelListType">
<xsd:sequence>
<xsd:element name="label" type="labelType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="definitionType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="definition_id" type="xsd:int"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="definitionListType">
<xsd:sequence>
<xsd:element name="definition" type="definitionType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="translationType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="targetLang" type="xsd:string" use="required"/>
<xsd:attribute name="source" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="componentLexemeType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lexical_unit_lexeme_id" type="xsd:int"/>
<xsd:attribute name="role" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="corpusExampleType" mixed="true">
<xsd:sequence>
<xsd:element name="comp" type="componentLexemeType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="example_id" type="xsd:int"/>
<xsd:attribute name="modified" type="xsd:boolean"/>
<xsd:attribute name="lexical_unit_id" type="xsd:int"/>
</xsd:complexType>
<xsd:complexType name="multipleLexemeExampleType">
<xsd:sequence>
<xsd:element name="comp" type="componentLexemeType" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="type">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="collocation"/>
<xsd:enumeration value="grammaticalCombination"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:attribute>
<xsd:attribute name="lexical_unit_id" type="xsd:int"/>
<xsd:attribute name="structure_id" type="xsd:int"/>
</xsd:complexType>
</xsd:schema>

@ -1,223 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<xsd:complexType name="headwordType">
<xsd:sequence>
<xsd:element name="lemma"/>
<xsd:element name="homonymy" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="feature" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="lexical_unitType">
<xsd:sequence>
<xsd:element name="lexeme" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lexical_unit_lexeme_id" type="xsd:int"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int" use="required"/>
<xsd:attribute name="type" type="xsd:string" use="required"/>
</xsd:complexType>
<xsd:simpleType name="categoryType">
<!-- The closed set of expected categories. -->
<xsd:restriction base="xsd:string">
<xsd:enumeration value="samostalnik"/>
<xsd:enumeration value="glagol"/>
<xsd:enumeration value="pridevnik"/>
<xsd:enumeration value="prislov"/>
<xsd:enumeration value="zaimek"/>
<xsd:enumeration value="števnik"/>
<xsd:enumeration value="predlog"/>
<xsd:enumeration value="veznik"/>
<xsd:enumeration value="členek"/>
<xsd:enumeration value="medmet"/>
<xsd:enumeration value="okrajšava"/>
<xsd:enumeration value="neuvrščeno"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="grammarType">
<xsd:sequence>
<xsd:element name="category" type="categoryType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="measureListType">
<xsd:sequence>
<xsd:element name="measure" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:decimal">
<xsd:attribute name="type" type="xsd:string" use="required"/>
<xsd:attribute name="source" type="xsd:string" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="variantListType">
<xsd:sequence>
<xsd:element name="variant" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="lexical_unit_id" type="xsd:int"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="labelListType">
<xsd:sequence>
<xsd:element name="label" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="definitionListType">
<xsd:sequence>
<xsd:element name="definition" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="type" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="translationType">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="targetLang" type="xsd:string" use="required"/>
<xsd:attribute name="source" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="translationContainerType">
<xsd:sequence>
<xsd:element name="labelList" type="labelListType" minOccurs="0"/>
<xsd:element name="translation" type="translationType"/>
<xsd:element name="explanation" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="cluster" type="xsd:int" use="optional"/>
</xsd:complexType>
<xsd:complexType name="translationContainerListType">
<xsd:sequence>
<xsd:element name="translationContainer" type="translationContainerType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="exampleType" mixed="true">
<xsd:sequence>
<xsd:element name="h" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="corpus_id" type="xsd:int"/>
<xsd:attribute name="modified" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="exampleContainerType">
<xsd:sequence>
<xsd:element name="example" type="exampleType"/>
<xsd:element name="translationContainer" type="translationContainerType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="exampleContainerListType">
<xsd:sequence>
<xsd:element name="exampleContainer" type="exampleContainerType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="dictionary">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="head">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="status" type="xsd:string"/>
<xsd:element name="headword" type="headwordType"/>
<xsd:element name="lexical_unit" type="lexical_unitType" minOccurs="0"/>
<xsd:element name="grammar" type="grammarType" minOccurs="0"/>
<xsd:element name="measureList" type="measureListType" minOccurs="0"/>
<xsd:element name="variantList" type="variantListType" minOccurs="0"/>
<xsd:element name="labelList" type="labelListType" minOccurs="0"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="body">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="senseList">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="sense" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="labelList" type="labelListType" minOccurs="0"/>
<xsd:element name="definitionList" type="definitionListType" minOccurs="0"/>
<xsd:element name="translationContainerList" type="translationContainerListType" minOccurs="0"/>
<xsd:element name="exampleContainerList" type="exampleContainerListType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd" />
<xsd:include schemaLocation="inventory.xsd"/>
<xsd:complexType name="translationContainerType">
<xsd:sequence>
<xsd:element name="labelList" type="labelListType" minOccurs="0"/>
<xsd:element name="translation" type="translationType"/>
<xsd:element name="explanation" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="cluster" type="xsd:int" use="optional"/>
<xsd:attribute name="position" type="xsd:int" use="optional"/>
</xsd:complexType>
<xsd:complexType name="translationContainerListType">
<xsd:sequence>
<xsd:element name="translationContainer" type="translationContainerType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="exampleContainerType">
<xsd:sequence>
<xsd:choice>
<xsd:element name="corpusExample" type="corpusExampleType"/>
<xsd:element name="multiwordExample" type="multipleLexemeExampleType"/>
</xsd:choice>
<xsd:element name="translationContainer" type="translationContainerType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="exampleContainerListType">
<xsd:sequence>
<xsd:element name="exampleContainer" type="exampleContainerType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="dictionary">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="head">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="status" type="statusType"/>
<xsd:element name="headword" type="headwordType"/>
<xsd:element name="lexicalUnit" type="lexicalUnitType" minOccurs="0"/>
<xsd:element name="grammar" type="grammarType" minOccurs="0"/>
<xsd:element name="measureList" type="measureListType" minOccurs="0"/>
<xsd:element name="variantList" type="variantListType" minOccurs="0"/>
<xsd:element name="relatedEntryList" type="relatedEntryListType" minOccurs="0"/>
<xsd:element name="labelList" type="labelListType" minOccurs="0"/>
<xsd:element name="comment" type="commentType" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="body">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="senseList">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="sense" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="labelList" type="labelListType" minOccurs="0"/>
<xsd:element name="definitionList" type="definitionListType" minOccurs="0"/>
<xsd:element name="translationContainerList" type="translationContainerListType" minOccurs="0"/>
<xsd:element name="exampleContainerList" type="exampleContainerListType" minOccurs="0"/>
</xsd:sequence>
<xsd:attribute name="id" type="xsd:int"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Loading…
Cancel
Save