Wadoku

Wadoku Wörterbuchsuche
Forum

Inhaltsverzeichnis

Zuletzt aktualisiert

Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Kommentar: Migrated to Confluence 5.3

Hier die Arbeitsversion der XSD inklusive XML-Beispiel:

<?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com"
Codeblock
Hinweis

Die aktuelle Version der Wadoku XSD befindet sich auf dem neuen Wadoku-Server unter: http://85.10.207.185/wadoku/xml/entry.xsd
Alle anderen Infos dazu haben eher historischen Charakter.

Detailierte Unterpunkte:

Anzeige untergeordneter Seiten
Hinweis

Für Entwickler:
Wenn man Änderungen an der XSD macht, dann muss man die de.wadoku.entry-Classen neu generieren, z.B. mit folgendem Eclipse-Plugin: https://jaxb-workshop.dev.java.net/plugins/eclipse/xjc-plugin.html
Und dann schauen wo es kracht und die Stellen anpassen, damit es wieder kompiliert.

Hier zur Veranschaulichung ein XML Beispiel.

Codeblock
XML
XML

<entry id="433401" xmlns="http://www.w3schools.com" elementFormDefault="qualified">

	<xs:element name="entry" type="entryType" />

	<xs:complexType name="entryType">
		<xs:sequence>
			<xs:element name="form" type="formType" />
			<xs:element name="gramGrp" type="gramGrpType" minOccurs="0" />
			<xs:element name="sense" type="senseType" minOccurs="1" />
		</xs:sequence>
		<xs:attribute name="diclevel" type="xs:int"></xs:attribute>
	</xs:complexType>

	<xs:complexType name="formType">
		<xs:sequence>
			<xs:element name="orth" type="orthType" minOccurs="1"></xs:element>
			<xs:element name="pron" type="pronType" minOccurs="1"></xs:element>
		</xs:sequence>
	</xs:complexType>

	<xs:complexType name="orthType">
		<xs:sequence>
			<xs:element name="kanji" type="kanjiType"></xs:element>
		</xs:sequence>
		<xs:attribute name="midashigo" type="xs:boolean"></xs:attribute>
	</xs:complexType>

	<xs:complexType name="kanjiType" mixed="true">
		<xs:attribute name="type" type="kanjiEnumType"></xs:attribute>
	</xs:complexType>

	<xs:simpleType name="kanjiEnumType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="nonToyo"></xs:enumeration>
			<xs:enumeration value="irregReading"></xs:enumeration>
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="pronType" mixed="true">
		<xs:attribute name="type" type="pronEnumType"></xs:attribute>
		<xs:attribute name="orth" type="xs:integer"></xs:attribute>
	</xs:complexType>

	<xs:simpleType name="pronEnumType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="hatsuon"></xs:enumeration>
			<xs:enumeration value="furigana"></xs:enumeration>
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="gramGrpType">
		<xs:sequence>
			<xs:element name="pos" type="posType" minOccurs="1"></xs:element>
		</xs:sequence>
	</xs:complexType>

	<xs:simpleType name="posType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="meishi" />
			<xs:enumeration value="doushi" />
			<xs:enumeration value="keiyoshi" />
		</xs:restriction>
	</xs:simpleType>

	<xs:complexType name="senseType">
		<xs:sequence>
			<xs:element name="usg" type="usgType" minOccurs="0"></xs:element>
			<xs:element name="trans" type="transType" minOccurs="1"></xs:element>
		</xs:sequence>
		<xs:attribute name="diclevel" type="xs:int"></xs:attribute>
	</xs:complexType>

	<xs:complexType name="usgType" mixed="true">
		<xs:attribute name="type">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="geo"></xs:enumeration>
					<xs:enumeration value="time"></xs:enumeration>
					<xs:enumeration value="dom"></xs:enumeration>
					<xs:enumeration value="reg"></xs:enumeration>
					<xs:enumeration value="style"></xs:enumeration>
					<xs:enumeration value="plev"></xs:enumeration>
					<xs:enumeration value="acc"></xs:enumeration>
					<xs:enumeration value="lang"></xs:enumeration>
					<xs:enumeration value="gram"></xs:enumeration>
					<xs:enumeration value="syn"></xs:enumeration>
					<xs:enumeration value="hyper"></xs:enumeration>
					<xs:enumeration value="colloc"></xs:enumeration>
					<xs:enumeration value="comp"></xs:enumeration>
					<xs:enumeration value="obj"></xs:enumeration>
					<xs:enumeration value="subj"></xs:enumeration>
					<xs:enumeration value="verb"></xs:enumeration>
					<xs:enumeration value="hint"></xs:enumeration>
					<xs:enumeration value="scientific"></xs:enumeration>
					<xs:enumeration value="seasonword"></xs:enumeration>
					<xs:enumeration value="familyname"></xs:enumeration>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:complexType>

	<xs:complexType name="transType">
		<xs:sequence>
			<xs:element name="tr" type="xs:string" minOccurs="1"></xs:element>
			<xs:element name="def" type="xs:string" minOccurs="0"></xs:element>
		</xs:sequence>
		<xs:attribute name="diclevel" type="xs:int"></xs:attribute>
	</xs:complexType>

</xs:schema>
Codeblock

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3schools.com"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.w3schools.com entries.xsd ">

	<form>
		<orth midashigo="true">
			<kanji type="irregReading">dai</kanji>
		</orth>
		<pron type="hatsuon" orth="1">kyi</pron>
	</form>
	<gramGrp>
		<pos>doushi</pos>
	</gramGrp>
	<sense>
		<usg type="scientific">luna</usg>
		<trans>
			<tr>alles super</tr>
			<def></def>
		</trans>
	</sense>
wadoku.de/xml/entry">
    <form>
        <orth>
            <text>女性</text>
        </orth>
        <pron>
            <text>じょせい</text>
        </pron>
        <pron accent="0" type="hatsuon">
            <text>じょ'せい</text>
        </pron>
    </form>
    <gramGrp>
        <pos type="N"/>
    </gramGrp>
    <sense>
        <trans>
            <tr>
                <token type="N" genus="f">Frau</token>
            </tr>
        </trans>
        <trans>
            <tr>
                <text>weibliche</text>
                <token type="N" genus="f">Person</token>
            </tr>
        </trans>
        <trans>
            <tr>
                <text>weibliches</text>
                <token type="N" genus="n">Wesen</token>
            </tr>
        </trans>
    </sense>
    <sense>
        <trans>
            <tr>
                <token type="N" genus="f">Weiblichkeit</token>
            </tr>
        </trans>
        <trans>
            <tr>
                <text>weibliche</text>
                <token type="N" genus="n">Geschlecht</token>
            </tr>
        </trans>
    </sense>
    <sense>
        <usg type="dom">Gramm.</usg>
        <ref type="anto" id="7469167">
            <transcr>dansei</transcr>
            <jap>男性</jap>
        </ref>
        <trans>
            <tr>
                <token type="N" genus="n">Femininum</token>
            </tr>
        </trans>
    </sense>
</entry>