Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
9 contributors

Users who have contributed to this file

@mwiencek @ianmcorvidae @warpr @ocharles @ijabz @mayhem @reosarevok @Zastai @mafr
2807 lines (2536 sloc) 80 KB
<?xml version="1.0" encoding="UTF-8"?>
<!-- ==================================================================
$Id$
Relax NG Schema for MusicBrainz XML Metadata Version 2.0
This XML schema has been designed to represent music metadata.
Documentation and the latest revision can be found at
http://musicbrainz.org/development/mmd/
Copyright (c) 2006 Robert Kaye, Matthias Friedrich
The schema is released under the Creative Commons
Attribution-ShareAlike 2.5 license.
http://creativecommons.org/licenses/by-sa/2.5/
================================================================== -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://musicbrainz.org/ns/mmd-2.0#">
<start>
<ref name="def_metadata-element"/>
</start>
<define name="def_metadata-element">
<element name="metadata">
<optional>
<attribute name="generator">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="created">
<data type="dateTime"/>
</attribute>
</optional>
<optional>
<ref name="def_artist-element"/>
</optional>
<optional>
<ref name="def_release-element"/>
</optional>
<optional>
<ref name="def_release-group-element"/>
</optional>
<optional>
<ref name="def_recording-element"/>
</optional>
<optional>
<ref name="def_label-element"/>
</optional>
<optional>
<ref name="def_work-element"/>
</optional>
<optional>
<ref name="def_area-element"/>
</optional>
<optional>
<ref name="def_place-element"/>
</optional>
<optional>
<ref name="def_instrument-element"/>
</optional>
<optional>
<ref name="def_series-element"/>
</optional>
<optional>
<ref name="def_event-element"/>
</optional>
<optional>
<ref name="def_url-element"/>
</optional>
<optional>
<ref name="def_puid-element"/>
</optional>
<optional>
<ref name="def_isrc-element"/>
</optional>
<optional>
<ref name="def_disc-element"/>
</optional>
<optional>
<ref name="def_cdstub"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<optional>
<ref name="def_collection"/>
</optional>
<optional>
<ref name="def_editor-element"/>
</optional>
<optional>
<ref name="def_artist-list"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<optional>
<ref name="def_release-group-list"/>
</optional>
<optional>
<ref name="def_recording-list"/>
</optional>
<optional>
<ref name="def_label-list"/>
</optional>
<optional>
<ref name="def_work-list"/>
</optional>
<optional>
<ref name="def_area-list"/>
</optional>
<optional>
<ref name="def_place-list"/>
</optional>
<optional>
<ref name="def_instrument-list"/>
</optional>
<optional>
<ref name="def_series-list"/>
</optional>
<optional>
<ref name="def_event-list"/>
</optional>
<optional>
<ref name="def_url-list"/>
</optional>
<optional>
<ref name="def_isrc-list"/>
</optional>
<optional>
<ref name="def_annotation-list"/>
</optional>
<optional>
<ref name="def_cdstub-list"/>
</optional>
<optional>
<ref name="def_freedb-disc-list"/>
</optional>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_collection-list"/>
</optional>
<optional>
<ref name="def_editor-list"/>
</optional>
<optional>
<ref name="def_entity-list"/>
</optional>
<ref name="def_metadata-element_extension"/>
</element>
</define>
<define name="def_artist-element">
<element name="artist">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_artist-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="sort-name">
<text/>
</element>
</optional>
<optional>
<element name="gender">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="country">
<ref name="def_iso-3166-1-code"/>
</element>
</optional>
<optional>
<ref name="def_area-element"/>
</optional>
<optional>
<element name="begin-area">
<ref name="def_area-element_inner"/>
</element>
</optional>
<optional>
<element name="end-area">
<ref name="def_area-element_inner"/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="ipi">
<ref name="def_ipi"/>
</element>
</optional>
<optional>
<ref name="def_ipi-list" />
</optional>
<optional>
<ref name="def_isni-list" />
</optional>
<optional>
<element name="life-span">
<optional>
<element name="begin">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="end">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<ref name="def_ended" />
</optional>
</element>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<optional>
<ref name="def_recording-list"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<optional>
<ref name="def_release-group-list"/>
</optional>
<optional>
<ref name="def_work-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<ref name="def_artist-element_extension"/>
</element>
</define>
<define name="def_release-element">
<element name="release">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="def_release-attribute_extension"/>
<optional>
<element name="title">
<text/>
</element>
</optional>
<optional>
<element name="status">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="quality">
<ref name="def_quality"/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="packaging">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="text-representation">
<optional>
<element name="language">
<ref name="def_iso-639"/>
</element>
</optional>
<optional>
<element name="script">
<ref name="def_iso-15924"/>
</element>
</optional>
</element>
</optional>
<optional>
<ref name="def_artist-credit"/>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<optional>
<ref name="def_release-group-element"/>
</optional>
<optional>
<element name="date">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="country">
<ref name="def_iso-3166-1-code"/>
</element>
</optional>
<optional>
<ref name="def_release-event-list"/>
</optional>
<optional>
<element name="barcode">
<text/>
</element>
</optional>
<optional>
<element name="asin">
<data type="string">
<param name="pattern">[A-Z0-9]{10}</param>
</data>
</element>
</optional>
<optional>
<ref name="def_cover-art-archive"/>
</optional>
<optional>
<ref name="def_label-info-list"/>
</optional>
<optional>
<ref name="def_medium-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_collection-list"/>
</optional>
<ref name="def_release-element_extension"/>
</element>
</define>
<define name="def_release-group-element">
<element name="release-group">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_release-group-attribute_extension"/>
<optional>
<element name="title">
<text/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="first-release-date">
<ref name="def_incomplete-date" />
</element>
</optional>
<optional>
<element name="primary-type">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="secondary-type-list">
<optional>
<zeroOrMore>
<element name="secondary-type">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text />
</element>
</zeroOrMore>
</optional>
</element>
</optional>
<optional>
<ref name="def_artist-credit"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<ref name="def_release-group-element_extension"/>
</element>
</define>
<define name="def_recording-element">
<element name="recording">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="def_recording-attribute_extension"/>
<optional>
<element name="title">
<text/>
</element>
</optional>
<optional>
<element name="length">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<ref name="def_video"/>
</optional>
<optional>
<ref name="def_artist-credit"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<optional>
<ref name="def_puid-list"/>
</optional>
<optional>
<ref name="def_isrc-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<ref name="def_recording-element_extension"/>
</element>
</define>
<define name="def_label-element">
<element name="label">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_label-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="sort-name">
<text/>
</element>
</optional>
<optional>
<element name="label-code">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="ipi">
<ref name="def_ipi"/>
</element>
</optional>
<optional>
<ref name="def_ipi-list" />
</optional>
<optional>
<ref name="def_isni-list" />
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="country">
<ref name="def_iso-3166-1-code"/>
</element>
</optional>
<optional>
<ref name="def_area-element"/>
</optional>
<optional>
<element name="life-span">
<optional>
<element name="begin">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="end">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<ref name="def_ended" />
</optional>
</element>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<ref name="def_label-element_extension"/>
</element>
</define>
<define name="def_work-element">
<element name="work">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_work-attribute_extension"/>
<optional>
<element name="title">
<text/>
</element>
</optional>
<optional>
<element name="language">
<ref name="def_iso-639"/>
</element>
</optional>
<optional>
<ref name="def_language-list" />
</optional>
<optional>
<ref name="def_artist-credit"/>
</optional>
<optional>
<ref name="def_iswc-element" />
</optional>
<optional>
<ref name="def_iswc-list" />
</optional>
<optional>
<ref name="def_work-attribute-list" />
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<ref name="def_work-element_extension"/>
</element>
</define>
<define name="def_area-element">
<element name="area">
<ref name="def_area-element_inner"/>
</element>
</define>
<define name="def_area-element_inner">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_area-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="sort-name">
<text/>
</element>
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<ref name="def_iso-3166-1-code-list" />
</optional>
<optional>
<ref name="def_iso-3166-2-code-list" />
</optional>
<optional>
<ref name="def_iso-3166-3-code-list" />
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<element name="life-span">
<optional>
<element name="begin">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="end">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<ref name="def_ended" />
</optional>
</element>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<ref name="def_area-element_extension"/>
</define>
<define name="def_place-element">
<element name="place">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_place-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="address">
<text/>
</element>
</optional>
<optional>
<element name="coordinates">
<optional>
<element name="latitude">
<text/>
</element>
</optional>
<optional>
<element name="longitude">
<text/>
</element>
</optional>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<ref name="def_area-element"/>
</optional>
<optional>
<element name="life-span">
<optional>
<element name="begin">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="end">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<ref name="def_ended" />
</optional>
</element>
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<ref name="def_place-element_extension"/>
</element>
</define>
<define name="def_instrument-element">
<element name="instrument">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_instrument-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="description">
<text/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<ref name="def_instrument-element_extension"/>
</element>
</define>
<define name="def_series-element">
<element name="series">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_series-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<element name="ordering-attribute">
<text/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<ref name="def_series-element_extension"/>
</element>
</define>
<define name="def_event-element">
<element name="event">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_event-attribute_extension"/>
<optional>
<element name="name">
<text/>
</element>
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<optional>
<ref name="def_cancelled" />
</optional>
<optional>
<element name="life-span">
<optional>
<element name="begin">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="end">
<ref name="def_incomplete-date"/>
</element>
</optional>
</element>
</optional>
<optional>
<element name="time">
<ref name="def_time" />
</element>
</optional>
<optional>
<element name="setlist">
<text/>
</element>
</optional>
<optional>
<ref name="def_annotation" />
</optional>
<optional>
<ref name="def_alias-list"/>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
<optional>
<ref name="def_tag-list"/>
</optional>
<optional>
<ref name="def_user-tag-list"/>
</optional>
<optional>
<ref name="def_genre-list"/>
</optional>
<optional>
<ref name="def_user-genre-list"/>
</optional>
<optional>
<ref name="def_rating"/>
</optional>
<optional>
<ref name="def_user-rating"/>
</optional>
<ref name="def_event-element_extension"/>
</element>
</define>
<define name="def_url-element">
<element name="url">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<ref name="def_url-attribute_extension"/>
<optional>
<element name="resource">
<text/>
</element>
</optional>
<zeroOrMore>
<ref name="def_relation-list"/>
</zeroOrMore>
</element>
</define>
<define name="def_disc-element">
<element name="disc">
<attribute name="id">
<data type="string">
<param name="pattern">[a-zA-Z0-9._]{27}-</param>
</data>
</attribute>
<ref name="def_disc-attribute_extension"/>
<optional>
<element name="sectors">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<ref name="def_offset-list"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<ref name="def_disc-element_extension"/>
</element>
</define>
<define name="def_puid-element">
<element name="puid">
<optional>
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
</optional>
<ref name="def_puid-attribute_extension"/>
<optional>
<ref name="def_recording-list"/>
</optional>
<ref name="def_puid-element_extension"/>
</element>
</define>
<define name="def_isrc-element">
<element name="isrc">
<optional>
<attribute name="id">
<ref name="def_isrc"/>
</attribute>
</optional>
<ref name="def_isrc-attribute_extension"/>
<optional>
<ref name="def_recording-list"/>
</optional>
<ref name="def_isrc-element_extension"/>
</element>
</define>
<define name="def_artist-credit">
<element name="artist-credit">
<oneOrMore>
<element name="name-credit">
<optional>
<attribute name="joinphrase">
<text/>
</attribute>
</optional>
<optional>
<element name="name">
<text/>
</element>
</optional>
<ref name="def_artist-element"/>
</element>
</oneOrMore>
</element>
</define>
<define name="def_relation-element">
<element name="relation">
<attribute name="type">
<data type="anyURI"/>
</attribute>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
<element name="target">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<data type="anyURI"/>
</element>
<optional>
<element name="ordering-key">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="direction">
<ref name="def_direction"/>
</element>
</optional>
<optional>
<ref name="def_attribute-list"/>
</optional>
<optional>
<element name="begin">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="end">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<ref name="def_ended" />
</optional>
<optional>
<choice>
<ref name="def_artist-element"/>
<ref name="def_release-element"/>
<ref name="def_release-group-element"/>
<ref name="def_recording-element"/>
<ref name="def_label-element"/>
<ref name="def_work-element"/>
<ref name="def_area-element"/>
<ref name="def_place-element"/>
<ref name="def_instrument-element"/>
<ref name="def_series-element"/>
<ref name="def_event-element"/>
<ref name="def_relation-element_extension"/>
</choice>
</optional>
<optional>
<element name="source-credit">
<text />
</element>
</optional>
<optional>
<element name="target-credit">
<text />
</element>
</optional>
</element>
</define>
<define name="def_alias">
<element name="alias">
<optional>
<attribute name="locale">
<ref name="def_locale" />
</attribute>
</optional>
<optional>
<attribute name="sort-name">
<text />
</attribute>
</optional>
<optional>
<attribute name="type">
<text />
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<optional>
<attribute name="primary">
<text />
</attribute>
</optional>
<optional>
<attribute name="begin-date">
<ref name="def_incomplete-date"/>
</attribute>
</optional>
<optional>
<attribute name="end-date">
<ref name="def_incomplete-date"/>
</attribute>
</optional>
<text/>
</element>
</define>
<define name="def_iswc-element">
<element name="iswc">
<optional>
<ref name="def_iswc"/>
</optional>
</element>
</define>
<define name="def_tag">
<element name="tag">
<optional>
<attribute name="count">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<ref name="def_tag-attribute_extension"/>
<element name="name">
<text/>
</element>
</element>
</define>
<define name="def_user-tag">
<element name="user-tag">
<ref name="def_tag-attribute_extension"/>
<element name="name">
<text/>
</element>
</element>
</define>
<define name="def_genre">
<element name="genre">
<optional>
<attribute name="count">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<ref name="def_genre-attribute_extension"/>
<element name="name">
<text/>
</element>
</element>
</define>
<define name="def_user-genre">
<element name="user-genre">
<ref name="def_genre-attribute_extension"/>
<element name="name">
<text/>
</element>
</element>
</define>
<define name="def_rating">
<element name="rating">
<optional>
<attribute name="votes-count">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<data type="float"/>
</element>
</define>
<define name="def_user-rating">
<element name="user-rating">
<data type="nonNegativeInteger"/>
</element>
</define>
<define name="def_label-info">
<element name="label-info">
<optional>
<element name="catalog-number">
<text/>
</element>
</optional>
<optional>
<ref name="def_label-element"/>
</optional>
</element>
</define>
<define name="def_medium">
<element name="medium">
<optional>
<element name="title">
<text/>
</element>
</optional>
<optional>
<element name="position">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="format">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text/>
</element>
</optional>
<optional>
<ref name="def_disc-list"/>
</optional>
<optional>
<ref name="def_pregap-track"/>
</optional>
<ref name="def_track-list"/>
<optional>
<ref name="def_data-track-list"/>
</optional>
</element>
</define>
<define name="def_track-data">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<element name="position">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="number">
<text/>
</element>
</optional>
<optional>
<element name="title">
<text/>
</element>
</optional>
<optional>
<element name="length">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<ref name="def_artist-credit"/>
</optional>
<optional>
<ref name="def_recording-element"/>
</optional>
</define>
<define name="def_pregap-track">
<element name="pregap">
<ref name="def_track-data"/>
</element>
</define>
<define name="def_track">
<element name="track">
<ref name="def_track-data"/>
</element>
</define>
<define name="def_annotation">
<element name="annotation">
<optional>
<attribute name="type">
<text/>
</attribute>
</optional>
<ref name="def_annotation-attribute_extension"/>
<optional>
<element name="entity">
<data type="anyURI"/>
</element>
</optional>
<optional>
<element name="name">
<text/>
</element>
</optional>
<element name="text">
<text/>
</element>
<ref name="def_annotation-element_extension"/>
</element>
</define>
<define name="def_cdstub">
<element name="cdstub">
<attribute name="id">
<data type="string">
<param name="pattern">[a-zA-Z0-9._]{27}-</param>
</data>
</attribute>
<ref name="def_cdstub-attribute_extension"/>
<element name="title">
<text/>
</element>
<optional>
<element name="artist">
<text/>
</element>
</optional>
<optional>
<element name="barcode">
<text/>
</element>
</optional>
<optional>
<element name="disambiguation">
<text/>
</element>
</optional>
<ref name="def_nonmb-track-list"/>
<ref name="def_cdstub-element_extension"/>
</element>
</define>
<define name="def_freedb-disc">
<element name="freedb-disc">
<optional>
<attribute name="id">
<data type="string">
<param name="pattern">[a-zA-Z0-9]{8}</param>
</data>
</attribute>
</optional>
<ref name="def_freedb-disc-attribute_extension"/>
<element name="title">
<text/>
</element>
<optional>
<element name="artist">
<text/>
</element>
</optional>
<optional>
<element name="category">
<text/>
</element>
</optional>
<optional>
<element name="year">
<data type="string">
<param name="pattern">[0-9]{4}</param>
</data>
</element>
</optional>
<ref name="def_nonmb-track-list"/>
<ref name="def_freedb-disc-element_extension"/>
</element>
</define>
<define name="def_nonmb-track">
<element name="track">
<element name="title">
<text/>
</element>
<optional>
<element name="artist">
<text/>
</element>
</optional>
<element name="length">
<data type="nonNegativeInteger"/>
</element>
</element>
</define>
<define name="def_collection">
<element name="collection">
<optional>
<attribute name="id">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type">
<data type="anyURI"/>
</attribute>
</optional>
<optional>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<optional>
<attribute name="entity-type">
<data type="anyURI"/>
</attribute>
</optional>
<element name="name">
<text/>
</element>
<optional>
<element name="editor">
<text/>
</element>
</optional>
<optional>
<ref name="def_area-list"/>
</optional>
<optional>
<ref name="def_artist-list"/>
</optional>
<optional>
<ref name="def_event-list"/>
</optional>
<optional>
<ref name="def_instrument-list"/>
</optional>
<optional>
<ref name="def_label-list"/>
</optional>
<optional>
<ref name="def_place-list"/>
</optional>
<optional>
<ref name="def_recording-list"/>
</optional>
<optional>
<ref name="def_release-list"/>
</optional>
<optional>
<ref name="def_release-group-list"/>
</optional>
<optional>
<ref name="def_series-list"/>
</optional>
<optional>
<ref name="def_work-list"/>
</optional>
</element>
</define>
<define name="def_editor-element">
<element name="editor">
<optional>
<attribute name="id">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<ref name="def_editor-attribute_extension"/>
<element name="name">
<text/>
</element>
<optional>
<element name="member-since">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<element name="privs">
<data type="nonNegativeInteger"/>
</element>
</optional>
<optional>
<element name="gender">
<attribute name="id">
<ref name="def_uuid"/>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="age">
<text/>
</element>
</optional>
<optional>
<element name="homepage">
<data type="anyURI"/>
</element>
</optional>
<optional>
<element name="bio">
<text/>
</element>
</optional>
<optional>
<ref name="def_area-element"/>
</optional>
<optional>
<ref name="def_language-list"/>
</optional>
<optional>
<element name="edit-information">
<element name="edits-accepted">
<data type="nonNegativeInteger"/>
</element>
<element name="edits-rejected">
<data type="nonNegativeInteger"/>
</element>
<element name="auto-edits-accepted">
<data type="nonNegativeInteger"/>
</element>
<element name="edits-failed">
<data type="nonNegativeInteger"/>
</element>
</element>
</optional>
</element>
</define>
<define name="def_language-list">
<element name="language-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<element name="language">
<optional>
<attribute name="fluency">
<choice>
<value>basic</value>
<value>intermediate</value>
<value>advanced</value>
<value>native</value>
</choice>
</attribute>
</optional>
<ref name="def_iso-639"/>
</element>
</zeroOrMore>
</element>
</define>
<define name="def_release-event-element">
<element name="release-event">
<optional>
<element name="date">
<ref name="def_incomplete-date"/>
</element>
</optional>
<optional>
<ref name="def_area-element"/>
</optional>
</element>
</define>
<!--
This part defines the extensions elements and attributes.
-->
<define name="def_metadata-element_extension">
<optional>
<ref name="def_extension_element"/>
</optional>
</define>
<define name="def_artist-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_release-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_release-group-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_recording-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_series-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_label-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_work-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_area-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_place-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_instrument-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_event-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_puid-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_isrc-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_relation-element_extension">
<ref name="def_extension_element"/>
</define>
<define name="def_annotation-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_disc-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_cdstub-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_freedb-disc-element_extension">
<zeroOrMore>
<ref name="def_extension_element"/>
</zeroOrMore>
</define>
<define name="def_artist-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_area-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_place-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_instrument-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_series-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_event-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_editor-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_url-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_release-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_release-group-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_recording-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_label-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_work-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_puid-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_isrc-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_annotation-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_disc-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_cdstub-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_freedb-disc-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_tag-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_genre-attribute_extension">
<zeroOrMore>
<ref name="def_extension_attribute"/>
</zeroOrMore>
</define>
<define name="def_extension_element">
<element>
<anyName>
<except>
<nsName ns="http://musicbrainz.org/ns/mmd-2.0#"/>
<nsName ns=""/>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<ref name="def_anything"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="def_extension_attribute">
<attribute>
<anyName>
<except>
<nsName ns="http://musicbrainz.org/ns/mmd-2.0#"/>
<nsName ns=""/>
</except>
</anyName>
</attribute>
</define>
<define name="def_anything">
<element>
<anyName>
<except>
<nsName ns=""/>
</except>
</anyName>
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<ref name="def_anything"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="def_artist-list">
<element name="artist-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_artist-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_medium-list">
<element name="medium-list">
<ref name="def_list-attributes"/>
<optional>
<element name="track-count">
<data type="nonNegativeInteger"/>
</element>
</optional>
<zeroOrMore>
<ref name="def_medium"/>
</zeroOrMore>
</element>
</define>
<define name="def_release-list">
<element name="release-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_release-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_release-group-list">
<element name="release-group-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_release-group-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_alias-list">
<element name="alias-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_alias"/>
</zeroOrMore>
</element>
</define>
<define name="def_recording-list">
<element name="recording-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_recording-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_track-list">
<element name="track-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_track"/>
</zeroOrMore>
</element>
</define>
<define name="def_data-track-list">
<element name="data-track-list">
<ref name="def_list-attributes"/>
<oneOrMore>
<ref name="def_track"/>
</oneOrMore>
</element>
</define>
<define name="def_offset-list">
<element name="offset-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<element name="offset">
<attribute name="position">
<data type="nonNegativeInteger"/>
</attribute>
<data type="nonNegativeInteger"/>
</element>
</zeroOrMore>
</element>
</define>
<define name="def_label-list">
<element name="label-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_label-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_label-info-list">
<element name="label-info-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_label-info"/>
</zeroOrMore>
</element>
</define>
<define name="def_work-list">
<element name="work-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_work-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_area-list">
<element name="area-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_area-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_place-list">
<element name="place-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_place-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_instrument-list">
<element name="instrument-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_instrument-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_series-list">
<element name="series-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_series-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_event-list">
<element name="event-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_event-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_url-list">
<element name="url-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_url-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_release-event-list">
<element name="release-event-list">
<ref name="def_list-attributes" />
<zeroOrMore>
<ref name="def_release-event-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_annotation-list">
<element name="annotation-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_annotation"/>
</zeroOrMore>
</element>
</define>
<define name="def_cdstub-list">
<element name="cdstub-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_cdstub"/>
</zeroOrMore>
</element>
</define>
<define name="def_nonmb-track-list">
<element name="track-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_nonmb-track"/>
</zeroOrMore>
</element>
</define>
<define name="def_freedb-disc-list">
<element name="freedb-disc-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_freedb-disc"/>
</zeroOrMore>
</element>
</define>
<define name="def_disc-list">
<element name="disc-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_disc-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_puid-list">
<element name="puid-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_puid-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_isrc-list">
<element name="isrc-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_isrc-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_relation-list">
<element name="relation-list">
<attribute name="target-type">
<data type="anyURI"/>
</attribute>
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_relation-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_tag-list">
<element name="tag-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_tag"/>
</zeroOrMore>
</element>
</define>
<define name="def_genre-list">
<element name="genre-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_genre"/>
</zeroOrMore>
</element>
</define>
<define name="def_iswc-list">
<element name="iswc-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_iswc-element" />
</zeroOrMore>
</element>
</define>
<define name="def_user-tag-list">
<element name="user-tag-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_user-tag"/>
</zeroOrMore>
</element>
</define>
<define name="def_user-genre-list">
<element name="user-genre-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_user-genre"/>
</zeroOrMore>
</element>
</define>
<define name="def_collection-list">
<element name="collection-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_collection"/>
</zeroOrMore>
</element>
</define>
<define name="def_editor-list">
<element name="editor-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_editor-element"/>
</zeroOrMore>
</element>
</define>
<define name="def_entity-list">
<element name="entity-list">
<ref name="def_list-attributes"/>
<zeroOrMore>
<ref name="def_artist-element"/>
<ref name="def_release-element"/>
<ref name="def_release-group-element"/>
<ref name="def_recording-element"/>
<ref name="def_label-element"/>
<ref name="def_work-element"/>
<ref name="def_area-element"/>
<ref name="def_place-element"/>
<ref name="def_instrument-element"/>
<ref name="def_series-element"/>
<ref name="def_event-element"/>
</zeroOrMore>
</element>
</define>
<!-- the list of attributes on a relationship. -->
<define name="def_attribute-list">
<element name="attribute-list">
<oneOrMore>
<element name="attribute">
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
<optional>
<attribute name="value">
<data type="string"/>
</attribute>
</optional>
<optional>
<attribute name="credited-as">
<data type="string"/>
</attribute>
</optional>
<text />
</element>
</oneOrMore>
</element>
</define>
<!-- the attributes which can be used on a -list element. -->
<define name="def_list-attributes">
<optional>
<attribute name="count">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
<optional>
<attribute name="offset">
<data type="nonNegativeInteger"/>
</attribute>
</optional>
</define>
<define name="def_cover-art-archive">
<element name="cover-art-archive">
<element name="artwork"><choice><value>true</value><value>false</value></choice></element>
<element name="count"><data type="nonNegativeInteger"/></element>
<element name="front"><choice><value>true</value><value>false</value></choice></element>
<element name="back"><choice><value>true</value><value>false</value></choice></element>
<optional><element name="darkened"><choice><value>true</value></choice></element></optional>
</element>
</define>
<!-- A date with varying precision in format 'YYYY-MM-DD'. -->
<define name="def_incomplete-date">
<data type="string">
<param name="pattern">[0-9]{4}(-[0-9]{2})?(-[0-9]{2})?</param>
</data>
</define>
<!-- An IPI code -->
<define name="def_ipi">
<data type="string">
<param name="pattern">[0-9]{11}</param>
</data>
</define>
<define name="def_ipi-list">
<element name="ipi-list">
<zeroOrMore>
<element name="ipi">
<ref name="def_ipi" />
</element>
</zeroOrMore>
</element>
</define>
<!-- An ISNI code (last digit is a MOD 11 check digit, so can be X for 10. -->
<define name="def_isni">
<data type="string">
<param name="pattern">[0-9]{15}[0-9X]</param>
</data>
</define>
<define name="def_isni-list">
<element name="isni-list">
<zeroOrMore>
<element name="isni">
<ref name="def_isni" />
</element>
</zeroOrMore>
</element>
</define>
<define name="def_ended">
<element name="ended">
<choice>
<value>true</value>
</choice>
</element>
</define>
<define name="def_cancelled">
<element name="cancelled">
<choice>
<value>true</value>
</choice>
</element>
</define>
<define name="def_video">
<element name="video">
<choice>
<value>true</value>
</choice>
</element>
</define>
<define name="def_locale">
<data type="string">
<param name="pattern">[a-z]{2}(_[A-Za-z]+)?</param>
</data>
</define>
<define name="def_time">
<data type="string">
<param name="pattern">([01][0-9]|2[0-3]):[0-5][0-9]</param>
</data>
</define>
<!-- A two-letter country code like 'DE', 'UK', 'FR' etc. -->
<define name="def_iso-3166-1-code">
<data type="string">
<param name="pattern">[A-Z]{2}</param>
</data>
</define>
<define name="def_iso-3166-1-code-list">
<element name="iso-3166-1-code-list">
<zeroOrMore>
<element name="iso-3166-1-code">
<ref name="def_iso-3166-1-code" />
</element>
</zeroOrMore>
</element>
</define>
<!-- A two-letter country code followed by a subdivision code -->
<define name="def_iso-3166-2-code">
<data type="string">
<param name="pattern">[A-Z]{2}\-[A-Z0-9]+</param>
</data>
</define>
<define name="def_iso-3166-2-code-list">
<element name="iso-3166-2-code-list">
<zeroOrMore>
<element name="iso-3166-2-code">
<ref name="def_iso-3166-2-code" />
</element>
</zeroOrMore>
</element>
</define>
<!-- A four-letter country code like "DDDE" -->
<define name="def_iso-3166-3-code">
<data type="string">
<param name="pattern">[A-Z]{4}</param>
</data>
</define>
<define name="def_iso-3166-3-code-list">
<element name="iso-3166-3-code-list">
<zeroOrMore>
<element name="iso-3166-3-code">
<ref name="def_iso-3166-3-code" />
</element>
</zeroOrMore>
</element>
</define>
<!-- An ISO-639 Part 3 language code like 'deu', 'eng', 'jpn' etc. -->
<define name="def_iso-639">
<data type="string">
<param name="pattern">[a-z]{3}</param>
</data>
</define>
<!-- A four-letter script code like 'Latn', 'Cyrl', etc. -->
<define name="def_iso-15924">
<data type="string">
<param name="pattern">[A-Z][a-z]{3}</param>
</data>
</define>
<!-- An ISRC code: CCXXXYYNNNNN, with
CC - two-letter ISO-3166-1 alpha 2 country code
XXX - alphanumeric registrant code (organization)
YY - year
NNNNN - 5-digit number
-->
<define name="def_isrc">
<data type="string">
<param name="pattern">[A-Z]{2}[A-Z0-9]{3}[0-9]{2}[0-9]{5}</param>
</data>
</define>
<!-- An ISWC code:
C - single-letter prefix character
NNN.NNN.NNN - 9-digit number. A "."-separated grouping in
3x3 digits is commonly used. This grouping
is allowed by the standard, but not
mandatory. For consistency we force this
grouping in the schema.
C - check digit
-->
<define name="def_iswc">
<data type="string">
<param name="pattern">[A-Z]-[0-9]{3}\.[0-9]{3}\.[0-9]{3}-[0-9]</param>
</data>
</define>
<!-- A 128 Bit UUID in its standard ASCII representation. -->
<define name="def_uuid">
<data type="string">
<param name="pattern">[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}</param>
</data>
</define>
<!-- Reading direction of a relation. Defaults to "both". -->
<define name="def_direction">
<choice>
<value>both</value>
<value>forward</value>
<value>backward</value>
</choice>
</define>
<!-- Data Quality of an entity. -->
<define name="def_quality">
<choice>
<value>low</value>
<value>normal</value>
<value>high</value>
</choice>
</define>
<!-- A list of work attributes. -->
<define name="def_work-attribute-list">
<element name="attribute-list">
<oneOrMore>
<element name="attribute">
<attribute name="type">
<data type="string"/>
</attribute>
<attribute name="type-id">
<ref name="def_uuid"/>
</attribute>
<optional>
<attribute name="value-id">
<ref name="def_uuid"/>
</attribute>
</optional>
<text />
</element>
</oneOrMore>
</element>
</define>
</grammar>
You can’t perform that action at this time.