The MusicBrainz XML Metadata Format (MMD) is an XML based document format to represent music metadata. It has been designed to be easy to read, powerful and extensible. MMD is the official successor of the old RDF-based metadata format, which was popular among semantic web enthusiasts, but didn't have much acceptance otherwise because of its perceived complexity. The initial and predetermined use of MMD is in the MusicBrainz XML API. However, it may be useful for other applications, too. Third party use and extensions to the format will be discussed later in this document. The official format description is a Relax NG schema. You can browse and access the schema and example documents via GitHub or clone it locally: git clone -schema.gitQuestions about MMD can be asked on either the IRC channel or posted to mb-devel. The rest of this document is a loose collection of examples and descriptions, feel free to improve the documentation to make it a more valuable resource for developers. StructureAll valid MMD documents are in the -1.0# namespace. The following is a perfectly valid, but empty, MMD document: The metadata element may contain one of the following elements: artist, release, track, artist-list, release-list, track-list. Although the schema permits more than one of these elements to appear as children of metadata, it usually just contains one. The artist, release, and track elementsThe artist, release and track elements represent a corresponding entity from the MusicBrainz database. This MMD document represents an artist: Tori Amos Amos, Tori If there are two artists with the same name in the database, a disambiguation element can be used. It could contain the decade the artist was active, or the genre. The following document represents a release: Little Earthquakes B000002IT2 Tori Amos Amos, Tori The text-representation gives the language and script the release and track titles are written in. The asin element contains an amazon shop identifier. The following MMD document describes a track: Silent All These Years 253466 There may also be an artist element, which is left out in this example. The puid-list lists all PUIDs (audio checksums) associated with this track. The list elementsAdditional to the elements discussed in the last section, MMD supports several list elements. The metadata element may contain artist-list, release-list, and track-list elements, the release element can (among others) contain a track-list element etc. Usually, a list contains other elements. A track-list contains track elements, a puid-list contains puid elements, and so on. In some cases, it is not possible to list all elements of the list because there would be too many. In this case, the count and offset attributes can be used, which are available for all lists in MMD. The following example shows a partial artist list: Little Earthquakes 457760 Tori Amos Little Earthquakes 413693 Tori Amos The full track-list would have 147 entries (the count attribute), and this partial list starts at the first element (offset is zero-based). RelationsRelations are the most complex part of MMD. An artist, release, or track can be in a relation to any other artist, release, track, or URL. This is how it looks like: Tori Amos Amos, Tori Y Kant Tori Read Y Kant Tori Read Mark Hawley Hawley, Mark From the Choirgirl Hotel Y Kant Tori Read Blue Skies (feat. Tori Amos) 306040 Down by the Seaside (feat. Tori Amos) 256414 In the XML document above, there are four relation-list elements, each representing relations from the artist Tori Amos to a different target type (Artist, Release, Track, and Url). IDs and TypesThe IDs and types used in the XML format are URIs. To keep the transmission overhead low, all URIs in the MusicBrainz namespace may be used in their relative form. So if a track's fully qualified id is -407d-4e06-a1ba-49c399a4c42f, it may be shortened to d6118046-407d-4e06-a1ba-49c399a4c42f in the XML. Note that this shortening is only allowed for URIs from the MusicBrainz namespace. The following rules apply to create a fully qualified URI from a relative one: The id attributes: artist: relative URIrelease: relative URItrack: relative URIThe type attributes: artist: -1.0#relative URIrelease: -1.0#relative URI (for each relative URI in the list)Due to their large number, relations are in a namespace on their own to avoid clashes: Various relation attributes: type: -1.0#relative URIattributes: -1.0#relative URI (for each relative URI in the list)Note: Don't confuse the URIs, especially the id URIs with URLs. The URIs are just names, they should not be used to query data from the server. But they are in a permanent format which will always be valid and can easily be transformed to URLs. Example: The following is an absolute, permanent MusicBrainz artist identifier which is the preferred representation. Shorter representations may be used for storing IDs in file tags or databases. -0cef-4130-869d-732b23ed9df5This one is a URL created from the URI above, using a simple transformation. It can be used to request data from the MusicBrainz server via the API. URLs may change over time, the URIs will not. -0cef-4130-869d-732b23ed9df5Note: When requesting XML data, you should specify the type to be xml using GET parameters. Currently only type xml is supported; in the future more might be supported. For example: -0cef-4130-869d-732b23ed9df5?type=xmlUsing the XML format for other applicationsThe XML format format uses URIs for several IDs and types. The artist element, for example, has a type attribute which accepts a URI. Users of the format may use the URIs defined by MusicBrainz or use one from their own namespace. This example uses a definition from MusicBrainz: If an application needs "Orchestra" as an artist type, a different namespace has to be used: This method may be used in all places where the schema accepts an anyURI datatype. As mentioned earlier, there is a special rule for all URIs defined by MusicBrainz: They may be relative, as you can see in the examples above. The complete artist ids have the form -0cef-4130-869d-732b23ed9df5 and the type attribute in the first example could also be written as Group, without the namespace prefix. To extend the format even further, the schema has several extension points (see def_extension) which allows adding arbitrary XML elements from a user-defined namespace. Using the mmd-namespace or no namespace at all is not permitted. There are no namespace restrictions inside that element, however, and unlimited nesting is possible, too. If your private namespace is -9.1# and you want to add data from a rating system, for example, it could be coded like this: Silent All These Years 253466 Even more complicated things, like nested tags are possible. Note that the em doesn't belong to the ext namespace. Silent All These Years 253466 This is a very nice song. This is still valid according to the schema, but inside the extension elements, only well-formedness can be checked. CreditsThe MusicBrainz XML Metadata Format has been designed by Matthias Friedrich and Robert Kaye. Most of the schema as well as the test suite have been written by Matthias Friedrich. TODOexplain type, attributes, reading direction, dates in the relations sectionwhat else?This page is transcluded from MusicBrainz XML Meta Data.DonateWikiForumsChat (IRC)Bug TrackerBlogTwitterUse beta site
Y Kant Tori Read Download
2ff7e9595c
Comentários