xml implementations for multilingual descriptions in the wmo core metadata profile
DESCRIPTION
XML Implementations for Multilingual Descriptions in the WMO Core Metadata Profile. Jürgen Seib Deutscher Wetterdienst e-mail: [email protected]. Introduction. WMO has six official languages multilingual metadata is important for WMO - PowerPoint PPT PresentationTRANSCRIPT
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
XML Implementations for Multilingual Descriptions in the
WMO Core Metadata Profile
Jürgen Seib
Deutscher Wetterdienst
e-mail: [email protected]
Saturday 22 April 2023 - 2 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Introduction• WMO has six official languages
• multilingual metadata is important for WMO
• WMO Core Metadata Profile V0.2 does not support multilingual metadata descriptions
• ISO-19115 and ISO-19139 propose extensions for handling multi-languages support in text elements
• <language> and <characterSet> are default values for the language and the character encoding used in text elements
Saturday 22 April 2023 - 3 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
The xml:lang attribute
• a special attribute for all XML tags
• specifies the language used in the tag content
• has to be declared for XML validation– standard XSD type is xsd:language
• the values are language identifiers as defined by [IETF RFC 1766]– [IETF RFC 1766] tags are two-letter language codes (ISO
639) with optional two-letter country codes (ISO 3166)
Saturday 22 April 2023 - 4 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
The xml:lang attribute - cont.
• Examples:– <keyword xml:lang="en">air temperature</keyword>– <keyword xml:lang="en-GB">colour</keyword>– <keyword xml:lang="en-US">colour</keyword>
• Drawbacks:– attribute must be declared in XML schema– if a metadata element could not occur multiple
times, then xml:lang is insufficient for the specification of multilingual alternatives
(e.g. <abstract> )
Saturday 22 April 2023 - 5 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
The rdf:Alt container
• RDF = Resource Description Framework
• RDF is a family of specifications for a metadata model
• An RDF container is a resource that contains things.
• RDF defines three types of containers: <rdf:Bag>, <rdf:Seq> and <rdf:Alt>
Saturday 22 April 2023 - 6 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
The rdf:Alt container - cont.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:creator>Ernest Hemmingway</dc:creator> <dc:title> <rdf:Alt> <rdf:li xml:lang="en">Old man in the Sea</rdf:li> <rdf:li xml:lang=”de">Der alte Mann und das Meer</rdf:li> <rdf:li xml:lang=”fr">Le vieil homme et la mer</rdf:li> </rdf:Alt> </dc:title></rdf:RDF>
Saturday 22 April 2023 - 7 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
The proposal in annex J of ISO 19115
Saturday 22 April 2023 - 8 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Implementation of annex J<xs:complexType name="PT_FreeText_PropertyType"> <xs:complexContent> <xs:extension base="gco:CharacterString_PropertyType"> <xs:sequence minOccurs="0"> <xs:element ref="gmd:PT_FreeText"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
<xs:element name="PT_FreeText" type="gmd:PT_FreeText_Type"/>
<xs:complexType name="PT_FreeText_Type"> <xs:complexContent> <xs:extension base="gco:AbstractObject_Type"> <xs:sequence> <xs:element name="textGroup" type="gmd:PT_Group_PropertyType" maxOccurs="unbounded"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
Saturday 22 April 2023 - 9 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Implementation of annex J<xs:complexType name="PT_Group_PropertyType"> <xs:sequence> <xs:element ref="gmd:PT_Group" minOccurs="0"/> </xs:sequence> <xs:attributeGroup ref="gco:ObjectReference"/></xs:complexType>
<xs:element name="PT_Group" type="gmd:PT_Group_Type"/>
<xs:complexType name="PT_Group_Type"> <xs:complexContent> <xs:extension base="gco:AbstractObject_Type"> <xs:sequence> <xs:element name="plainText" type="xs:string"/> <xs:element name="languageCode" type="gmd:LanguageCode_PropertyType"/> <xs:element name="country" type="gmd:Country_PropertyType" minOccurs="0"/> <xs:element name="characterEncoding" type="gmd:MD_CharacterSetCode_PropertyType"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
Saturday 22 April 2023 - 10 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Proposal of ISO 19139
Saturday 22 April 2023 - 11 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Implementation
<xs:complexType name=”PT_Locale_Type"> <xs:complexContent> <xs:extension base="gco:AbstractObject_Type"> <xs:sequence> <xs:element name="languageCode" type="gmd:LanguageCode_PropertyType"/> <xs:element name="country" type="gmd:Country_PropertyType" minOccurs="0"/> <xs:element name="characterEncoding” type="gmd:MD_CharacterSetCode_PropertyType"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
Saturday 22 April 2023 - 12 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Implementation<xs:complexType name="LocalisedCharacterString_PropertyType"> <xs:complexContent> <xs:extension base="gco:ObjectReference_PropertyType"> <xs:sequence minOccurs="0"> <xs:element ref="gmd:LocalisedCharacterString"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
<xs:element name="LocalisedCharacterString" type="gmd:LocalisedCharacterString_Type" substitutionGroup="gco:CharacterString"/>
<xs:complexType name="LocalisedCharacterString_Type"> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="id" type="xs:ID" use="optional"/> <xs:attribute name="locale" type="xs:anyURI" use="optional"/> </xs:extension> </xs:simpleContent></xs:complexType>
Saturday 22 April 2023 - 13 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Implementation
<xs:complexType name="PT_FreeText_PropertyType"> <xs:complexContent> <xs:extension base="gco:CharacterString_PropertyType"> <xs:sequence minOccurs="0"> <xs:element ref="gmd:PT_FreeText"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
Saturday 22 April 2023 - 14 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
<xs:element name="PT_FreeText" type="gmd:PT_FreeText_Type"/>
<xs:complexType name="PT_FreeText_Type"> <xs:complexContent> <xs:extension base="gco:AbstractObject_Type"> <xs:sequence> <xs:element name="textGroup” type="gmd:LocalisedCharacterString_PropertyType" maxOccurs="unbounded"/> </xs:sequence> </xs:extension> </xs:complexContent></xs:complexType>
Implementation
Saturday 22 April 2023 - 15 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
First requirement:
Proposal for WMO Metadata Profile
• explicit definition of language and character encoding for all text fields implemented by LocalisedCharacterString
Example:<keyword>
<LocalisedCharacterString locale=“de”>
Lufttemperatur</LocalisedCharacterString>
</keyword>
Saturday 22 April 2023 - 16 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Second requirement:
Proposal for WMO Metadata Profile
• possibility to specify translations of a text field into another language implemented by PT_FreeText
Saturday 22 April 2023 - 17 -
Abteilung Systeme und Betrieb
CBS IPET-MI meeting, Moscow
Metadata Example <keyword> <wmo:WMO_keyword>agriculture</wmo:WMO_keyword> <PT_FreeText> <textGroup> <LocalisedCharacterString locale="fr">agriculture</LocalisedCharacterString> </textGroup> <textGroup> <LocalisedCharacterString locale="es">agricultura</LocalisedCharacterString> </textGroup> <textGroup> <LocalisedCharacterString locale="de">Landwirtschaft</LocalisedCharacterString> </textGroup> </PT_FreeText> </keyword>