idnits 2.17.1 draft-bryan-metalink-14.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.ii or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 24, 2009) is 5357 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'BITTORRENT' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO3166-1' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml-infoset' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml-names' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xmlbase' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xmldsig-core' ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3023 (Obsoleted by RFC 7303) ** Downref: Normative reference to an Informational RFC: RFC 3174 ** Obsolete normative reference: RFC 4646 (Obsoleted by RFC 5646) Summary: 5 errors (**), 0 flaws (~~), 1 warning (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Bryan, Ed. 3 Internet-Draft T. Tsujikawa 4 Intended status: Standards Track N. McNab 5 Expires: February 25, 2010 Metalinker Project 6 P. Poeml 7 Novell, Inc. 8 August 24, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-14 13 Status of this Memo 15 This Internet-Draft is submitted to IETF in full conformance with the 16 provisions of BCP 78 and BCP 79. This document may contain material 17 from IETF Documents or IETF Contributions published or made publicly 18 available before November 10, 2008. The person(s) controlling the 19 copyright in some of this material may not have granted the IETF 20 Trust the right to allow modifications of such material outside the 21 IETF Standards Process. Without obtaining an adequate license from 22 the person(s) controlling the copyright in such materials, this 23 document may not be modified outside the IETF Standards Process, and 24 derivative works of it may not be created outside the IETF Standards 25 Process, except to format it for publication as an RFC or to 26 translate it into languages other than English. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/ietf/1id-abstracts.txt. 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html. 44 This Internet-Draft will expire on February 25, 2010. 46 Copyright Notice 48 Copyright (c) 2009 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents in effect on the date of 53 publication of this document (http://trustee.ietf.org/license-info). 54 Please review these documents carefully, as they describe your rights 55 and restrictions with respect to this document. 57 Abstract 59 This document specifies Metalink, an XML-based download description 60 format. Metalink describes alternate download locations (mirrors), 61 checksums, and other information. Clients can transparently use this 62 information to reliably transfer files. 64 Table of Contents 66 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 67 1.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 4 68 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 5 69 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 6 70 2. Metalink Documents . . . . . . . . . . . . . . . . . . . . . . 6 71 3. Common Metalink Constructs . . . . . . . . . . . . . . . . . . 7 72 3.1. Text Constructs . . . . . . . . . . . . . . . . . . . . . 8 73 3.1.1. Text . . . . . . . . . . . . . . . . . . . . . . . . . 8 74 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 8 75 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 9 76 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 9 77 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 9 78 4.1.2. The "metalink:file" Element . . . . . . . . . . . . . 10 79 4.1.3. The "metalink:pieces" Element . . . . . . . . . . . . 12 80 4.2. Metadata Elements . . . . . . . . . . . . . . . . . . . . 12 81 4.2.1. The "metalink:copyright" Element . . . . . . . . . . . 12 82 4.2.2. The "metalink:description" Element . . . . . . . . . . 13 83 4.2.3. The "metalink:dynamic" Element . . . . . . . . . . . . 13 84 4.2.4. The "metalink:generator" Element . . . . . . . . . . . 13 85 4.2.5. The "metalink:hash" Element . . . . . . . . . . . . . 13 86 4.2.6. The "metalink:identity" Element . . . . . . . . . . . 15 87 4.2.7. The "metalink:language" Element . . . . . . . . . . . 15 88 4.2.8. The "metalink:license" Element . . . . . . . . . . . . 15 89 4.2.9. The "metalink:logo" Element . . . . . . . . . . . . . 15 90 4.2.10. The "metalink:metaurl" Element . . . . . . . . . . . . 16 91 4.2.11. The "metalink:origin" Element . . . . . . . . . . . . 17 92 4.2.12. The "metalink:os" Element . . . . . . . . . . . . . . 17 93 4.2.13. The "metalink:published" Element . . . . . . . . . . . 17 94 4.2.14. The "metalink:publisher" Element . . . . . . . . . . . 18 95 4.2.15. The "metalink:signature" Element . . . . . . . . . . . 18 96 4.2.16. The "metalink:size" Element . . . . . . . . . . . . . 18 97 4.2.17. The "metalink:updated" Element . . . . . . . . . . . . 19 98 4.2.18. The "metalink:url" Element . . . . . . . . . . . . . . 19 99 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 20 100 5. Securing Metalink Documents . . . . . . . . . . . . . . . . . 20 101 6. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 20 102 6.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 20 103 6.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 20 104 6.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 21 105 6.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 21 106 6.4.1. Simple Extension Elements . . . . . . . . . . . . . . 21 107 6.4.2. Structured Extension Elements . . . . . . . . . . . . 22 108 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 109 7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 22 110 7.2. application/metalink+xml MIME type . . . . . . . . . . . . 22 111 8. Security Considerations . . . . . . . . . . . . . . . . . . . 23 112 8.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 23 113 8.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 24 114 8.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 24 115 8.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 24 116 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24 117 9.1. Normative References . . . . . . . . . . . . . . . . . . . 24 118 9.2. Informative References . . . . . . . . . . . . . . . . . . 26 119 Appendix A. Acknowledgements and Contributors . . . . . . . . . . 26 120 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 27 121 Appendix C. Document History (to be removed by RFC Editor 122 before publication) . . . . . . . . . . . . . . . . . 32 123 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 124 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 37 126 1. Introduction 128 Metalink is an XML-based document format that describes a file or 129 lists of files to be added to a download queue. Metalinks can list a 130 number of files, each with an extensible set of attached metadata. 131 For example, each file can have a description, checksum, and list of 132 URIs that it is available from. 134 Identical copies of a file are frequently accessible in multiple 135 locations on the Internet over a variety of protocols (FTP, HTTP, and 136 Peer-to-Peer). In some cases, Users are shown a list of these 137 multiple download locations (mirrors) and must manually select a 138 single one on the basis of geographical location, priority, or 139 bandwidth. This distributes the load across multiple servers. At 140 times, individual servers can be slow, outdated, or unreachable, but 141 this can not be determined until the download has been initiated. 142 This can lead to the user canceling the download and needing to 143 restart it. During downloads, errors in transmission can corrupt the 144 file. There are no easy ways to repair these files. For large 145 downloads this can be extremely troublesome. Any of the number of 146 problems that can occur during a download lead to frustration on the 147 part of users. 149 All the information about a download, including mirrors, checksums, 150 digital signatures, and other information can be stored in a machine- 151 readable Metalink file. This Metalink file transfers the knowledge 152 of the download server (and mirror database) to the client. With 153 this knowledge, the client is enabled to work its way to a successful 154 download even under adverse circumstances. All this is done 155 transparently to the user and the download is much more reliable and 156 efficient. In contrast, a traditional HTTP redirect to a mirror 157 conveys only extremely minimal information - one link to one server, 158 and there is no provision in the HTTP protocol to handle failures. 159 Other features that some clients provide include multi-source 160 downloads, where chunks of a file are downloaded from multiple 161 mirrors (and optionally, Peer-to-Peer) simultaneously, which 162 frequently results in a faster download. 164 [[ Discussion of this draft should take place on 165 discuss@apps.ietf.org or the Metalink discussion mailing list located 166 at metalink-discussion@googlegroups.com. To join the list, visit 167 http://groups.google.com/group/metalink-discussion . ]] 169 1.1. Examples 170 A brief, single file Metalink Document: 172 173 174 175 ftp://ftp.example.com/example.ext 176 http://example.com/example.ext 177 178 http://example.com/example.ext.torrent 179 180 181 183 A more extensive, single file Metalink Document: 185 186 187 2009-05-15T12:23:23Z 188 189 Example 190 1.0 191 en 192 A description of the example file for 193 download. 194 195 80bc95fd391772fa61c91ed68567f0980bb45fd9 196 197 ftp://ftp.example.com/example.ext 198 199 http://example.com/example.ext 200 201 http://example.com/example.ext.torrent 202 203 204 206 1.2. Namespace and Version 208 The XML Namespaces URI [REC-xml-names] for the XML data format 209 described in this specification is: 211 urn:ietf:params:xml:ns:metalink 213 For convenience, this data format may be referred to as "Metalink", 214 which this specification uses internally. 216 1.3. Notational Conventions 218 This specification describes conformance of Metalink Documents. 219 Additionally, it places some requirements on Metalink Processors. 221 This specification uses the namespace prefix "metalink:" for the 222 Namespace URI identified in Section 1.2, above. Note that the choice 223 of namespace prefix is arbitrary and not semantically significant. 225 Metalink is specified using terms from the XML Infoset 226 [REC-xml-infoset]. However, this specification uses a shorthand for 227 two common terms: the phrase "Information Item" is omitted when 228 naming Element Information Items and Attribute Information Items. 229 Therefore, when this specification uses the term "element," it is 230 referring to an Element Information Item in Infoset terms. Likewise, 231 when it uses the term "attribute," it is referring to an Attribute 232 Information Item. 234 Some sections of this specification are illustrated with fragments of 235 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 236 text of this specification provides the definition of conformance. A 237 complete schema appears in Appendix B. 239 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 240 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 241 document are to be interpreted as described in BCP 14, [RFC2119], as 242 scoped to those conformance targets. 244 2. Metalink Documents 246 This specification describes Metalink Documents. 248 A Metalink Document describes a file or group of files, how to access 249 them, and metadata that identifies them. Its root is the metalink: 250 metalink element. 252 namespace metalink = "urn:ietf:params:xml:ns:metalink" 253 start = metalinkMetalink 255 Metalink Documents are specified in terms of the XML Information Set, 256 serialized as XML 1.0 [REC-xml] and identified with the "application/ 257 metalink+xml" media type. 259 Metalink Documents MUST be well-formed XML. This specification does 260 not define a DTD for Metalink Documents, and hence does not require 261 them to be valid (in the sense used by XML). 263 Metalink allows the use of IRIs [RFC3987]. Every URI [RFC3986] is 264 also an IRI, so a URI may be used wherever below an IRI is named. 265 There is one special consideration: when an IRI that is not also a 266 URI is given for dereferencing, it MUST be mapped to a URI using the 267 steps in Section 3.1 of [RFC3987]. 269 Any element defined by this specification MAY have an xml:base 270 attribute [REC-xmlbase]. When xml:base is used in an Metalink 271 Document, it serves the function described in Section 5.1.1 of 272 [RFC3986], establishing the base URI (or IRI) for resolving any 273 relative references found within the effective scope of the xml:base 274 attribute. 276 Any element defined by this specification MAY have an xml:lang 277 attribute, whose content indicates the natural language for the 278 element and its descendents. The language context is only 279 significant for elements and attributes declared to be "Language- 280 Sensitive" by this specification. Requirements regarding the content 281 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 282 Section 2.12. 284 metalinkCommonAttributes = 285 attribute xml:base { metalinkUri }?, 286 attribute xml:lang { metalinkLanguageTag }?, 287 undefinedAttribute* 289 Metalink is an extensible format. See Section 6 of this document for 290 a full description of how Metalink Documents can be extended. 292 3. Common Metalink Constructs 294 Many of Metalink's elements share a few common structures. This 295 section defines those structures and their requirements for 296 convenient reference by the appropriate element definitions. 298 When an element is identified as being a particular kind of 299 construct, it inherits the corresponding requirements from that 300 construct's definition in this section. 302 Note that there MUST NOT be any white space in a Date construct or in 303 any IRI. Some XML-emitting implementations erroneously insert white 304 space around values by default, and such implementations will emit 305 invalid Metalink Documents. 307 3.1. Text Constructs 309 A Text construct contains human-readable text, usually in small 310 quantities. The content of Text constructs is Language-Sensitive. 312 metalinkTextConstruct = 313 metalinkCommonAttributes, 314 text 316 3.1.1. Text 318 Example metalink:description with text content: 320 ... 321 322 A description of the example file for download. 323 324 ... 326 The content of the Text construct MUST NOT contain child elements. 327 Such text is intended to be presented to humans in a readable 328 fashion. Thus, white space could be collapsed (including line 329 breaks) and text could be displayed using typographic techniques such 330 as justification and proportional fonts. 332 3.2. Date Constructs 334 A Date construct is an element whose content MUST conform to the 335 "date-time" production in [RFC3339]. In addition, an uppercase "T" 336 character MUST be used to separate date and time, and an uppercase 337 "Z" character MUST be present in the absence of a numeric time zone 338 offset. 340 metalinkDateConstruct = 341 metalinkCommonAttributes, 342 xsd:dateTime 344 Such date values happen to be compatible with the following 345 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 346 [W3C.REC-xmlschema-2-20041028]. 348 Example Date constructs: 350 2009-05-15T18:30:02Z 351 2009-05-15T18:30:02.25Z 352 2009-05-15T18:30:02+01:00 353 2009-05-15T18:30:02.25+01:00 354 Date values SHOULD be as accurate as possible. For example, it would 355 be generally inappropriate for a publishing system to apply the same 356 timestamp to several Metalink Documents that were published during 357 the course of a single day. 359 4. Metalink Element Definitions 361 4.1. Container Elements 363 4.1.1. The "metalink:metalink" Element 365 The "metalink:metalink" element is the document (i.e., top-level) 366 element of a Metalink Document, acting as a container for metadata 367 and data associated with the listed files. It contains one or more 368 metalink:file child elements which consist of metadata elements. 370 metalinkMetalink = 371 element metalink:metalink { 372 metalinkCommonAttributes, 373 (metalinkDynamic? 374 & metalinkFile+ 375 & metalinkGenerator? 376 & metalinkOrigin? 377 & metalinkPublished? 378 & metalinkUpdated? 379 & extensionElement*) 380 } 382 The following child elements are defined by this specification (note 383 that the presence of some of these elements is required): 385 o metalink:metalink elements MAY contain exactly one metalink: 386 dynamic element. 387 o metalink:metalink elements MUST contain one or more metalink:file 388 elements. 389 o metalink:metalink elements MAY contain exactly one metalink: 390 generator element. 391 o metalink:metalink elements SHOULD contain exactly one metalink: 392 origin element. 393 o metalink:metalink elements MAY contain exactly one metalink: 394 published element. 396 4.1.1.1. Providing Textual Content 398 Experience teaches that downloads providing textual content are in 399 general more useful than those that do not. Some applications (one 400 example is full-text indexers) require a minimum amount of text to 401 function reliably and predictably. Metalink publishers should be 402 aware of these issues. It is advisable that each metalink:file 403 element contain a non-empty metalink:description element, a non-empty 404 metalink:identity element when that element is present, and a non- 405 empty metalink:version element, and a non-empty metalink:publisher 406 element. However, the absence of metalink:description is not an 407 error, and Metalink Processors MUST NOT fail to function correctly as 408 a consequence of such an absence. 410 4.1.2. The "metalink:file" Element 412 The "metalink:file" element represents an individual file, acting as 413 a container for metadata and data associated with the file. 415 All metalink:url elements SHOULD lead to identical files. That is, 416 each metalink:url element should be an alternative location for the 417 same file and each metalink:metaurl element should provide metadata 418 to retrieve the same file in another way, such as a peer to peer 419 network. 421 metalinkFile = 422 element metalink:file { 423 metalinkCommonAttributes, 424 attribute name { text }, 425 (metalinkCopyright? 426 & metalinkDescription? 427 & metalinkHash* 428 & metalinkIdentity? 429 & metalinkLanguage? 430 & metalinkLicense? 431 & metalinkLogo? 432 & metalinkMetaURL* 433 & metalinkURL* 434 & metalinkOS? 435 & metalinkPieces* 436 & metalinkPublisher? 437 & metalinkSignature? 438 & metalinkSize? 439 & metalinkVersion? 440 & extensionElement*) 441 } 443 This specification assigns no significance to the order of metalink: 444 file elements or to the order of metalink:url or metalink:metaurl 445 elements. Significance is determined by the value of the 446 "preference" attribute of the metalink:url or metalink:metaurl 447 elements. 449 The following child elements are defined by this specification (note 450 that it requires the presence of some of these elements): 452 o metalink:file elements MAY contain exactly one metalink:copyright 453 element. 454 o metalink:file elements MAY contain exactly one metalink: 455 description element. 456 o metalink:file elements MAY contain exactly one metalink:identity 457 element. 458 o metalink:file elements MAY contain one or more metalink:hash 459 elements. 460 o metalink:file elements MAY contain exactly one metalink:language 461 element. 462 o metalink:file elements MAY contain exactly one metalink:license 463 element. 464 o metalink:file elements MAY contain exactly one metalink:logo 465 element. 466 o metalink:file elements MAY contain exactly one metalink:os 467 element. 468 o metalink:file elements MUST contain at least one metalink:url 469 element or at least one metalink:metaurl element. Typically, 470 metalink:file elements contains more than one metalink:url element 471 to provide multiple download sources. 472 o metalink:file elements MAY contain one or more metalink:pieces 473 elements. 474 o metalink:file elements MAY contain exactly one metalink:publisher 475 element. 476 o metalink:file elements MAY contain one or more metalink:signature 477 elements. 478 o metalink:file elements SHOULD contain exactly one metalink:size 479 element. 480 o metalink:file elements MAY contain exactly one metalink:version 481 element. 483 4.1.2.1. The "name" Attribute 485 metalink:file elements MUST have a "name" attribute, which contains 486 the filename of the file to be downloaded. 488 Directory information can also be contained in a "path/file" format 489 only, as in: 491 493 In this example, a subdirectory "debian-amd64/sarge/" will be created 494 and a file named "Contents-amd64.gz" will be created inside it. The 495 path MUST NOT contain any directory traversal directives or 496 information. The path MUST be relative. The path MUST NOT begin 497 with a "/", "./" or "../", contain "/../", or end with "/..". 499 4.1.3. The "metalink:pieces" Element 501 The "metalink:pieces" element acts as a container for a list of 502 checksums of non-overlapping pieces of the file. The checksums MUST 503 be listed in the same order as the corresponding pieces appear in the 504 file, starting at the beginning of the file. 506 metalinkPieces = 507 element metalink:pieces { 508 attribute length { xsd:integer }, 509 attribute type { text }, 510 metalinkHash+ 511 } 513 4.1.3.1. The "type" Attribute 515 metalink:pieces elements MUST have a "type" attribute. 517 The IANA registry named "Hash Function Textual Names" defines values 518 for hash types. If a Metalink Document contains hashes, it SHOULD 519 include "sha-1" which is SHA-1 as specified in [RFC3174], or a 520 stronger hash. It MAY also include other hashes. 522 4.1.3.2. The "length" Attribute 524 metalink:pieces elements MUST have a "length" attribute, which is an 525 integer that describes the length of the pieces of the file in 526 octets. The whole file is divided into non-overlapping pieces of 527 this length, starting from the beginning of the file. The last piece 528 extends at most to the end of the file, and can therefore be shorter 529 than the other pieces. 531 4.2. Metadata Elements 533 4.2.1. The "metalink:copyright" Element 535 The "metalink:copyright" element is a Text construct that conveys a 536 human-readable copyright for a file. 538 metalinkCopyright = 539 element metalink:copyright { 540 metalinkTextConstruct 541 } 543 4.2.2. The "metalink:description" Element 545 The "metalink:description" element is a Text construct that conveys a 546 human-readable description for a file. 548 metalinkDescription = 549 element metalink:description { 550 metalinkTextConstruct 551 } 553 4.2.3. The "metalink:dynamic" Element 555 The "metalink:dynamic" element is a Text construct that describes 556 whether the IRI from "metalink:origin" in a Metalink will contain 557 dynamic updated information or if it is static and not likely to be 558 updated. 560 metalinkDynamic = 561 element metalink:dynamic { 562 "true" | "false" 563 } 565 4.2.4. The "metalink:generator" Element 567 The "metalink:generator" element's content identifies the generating 568 agent name and version, separated by a "/", used to generate a 569 Metalink Document, for debugging and other purposes. 571 metalinkGenerator = 572 element metalink:generator { 573 metalinkTextConstruct 574 } 576 The content of this element, when present, MUST be a string that is a 577 human-readable name and version, separated by a "/", for the 578 generating agent. For example, "MirrorBrain/2.8.1", where 579 "MirrorBrain" is the name and "2.8.1" is the version. Entities such 580 as "&" and "<" represent their corresponding characters ("&" 581 and "<" respectively), not markup. 583 4.2.5. The "metalink:hash" Element 585 The "metalink:hash" element is a Text construct that conveys a hash 586 for a file. All hashes are encoded in lowercase hexadecimal format. 587 Hashes are used to verify the integrity of a complete file or portion 588 of a file to determine if the file has been transferred without any 589 errors. 591 metalinkHash = 592 element metalink:hash { 593 attribute type { text }?, 594 text 595 } 597 metalink:hash elements with a "type" attribute MUST contain a hash of 598 the complete file. Metalink Documents can contain one or multiples 599 hashes of a complete file. In this example, both SHA-1 and SHA-256 600 hashes are included. 602 ... 603 a97fcf6ba9358f8a6f62beee4421863d3e52b080 604 fc87941af7fd7f03e53b34af393f4c14923d74 605 825f51116ff591336af4880227 606 ... 608 Metalink Documents can also contain hashes for individual pieces of a 609 file. metalink:hash elements that are inside a metalink:pieces 610 container element have a hash for that specific piece or chunk of the 611 file, and are of the same hash type as the metalink:pieces element 612 they are contained in. metalink:hash elements without a "type" 613 attribute MUST contain a hash for that specific piece or chunk of the 614 file and MUST be listed in the same order as the corresponding pieces 615 appear in the file, starting at the beginning of the file. 617 ... 618 a97fcf6ba9358f8a6f62beee4421863d3e52b080 619 fc87941af7fd7f03e53b34af393f4c14923d74 620 825f51116ff591336af4880227 621 622 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 623 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 624 3e84219096435c34e092b17b70a011771c52d87a 625 67183e4c3ab892d3ebe8326b7d79eb62d077f487 626 627 ... 629 4.2.5.1. The "type" Attribute 631 metalink:hash elements MUST have a "type" attribute, if and only if 632 it contains a hash of the complete file. The IANA registry named 633 "Hash Function Textual Names" defines values for hash types. If a 634 Metalink Document contains hashes, it SHOULD include "sha-1" which is 635 SHA-1 as specified in [RFC3174], or a stronger hash. It MAY also 636 include other hashes. 638 4.2.6. The "metalink:identity" Element 640 The "metalink:identity" element is a Text construct that conveys a 641 human-readable identity for a file. The identity of OpenOffice.org 642 3.0 would be "OpenOffice.org". 644 metalinkIdentity = 645 element metalink:identity { 646 metalinkTextConstruct 647 } 649 4.2.7. The "metalink:language" Element 651 The "metalink:language" element is a Text construct that conveys a 652 code for the language of a file, per [RFC4646]. 654 metalinkLanguage = 655 element metalink:language { 656 metalinkTextConstruct 657 } 659 4.2.8. The "metalink:license" Element 661 The "metalink:license" element is a Text construct that conveys a 662 human-readable license name for a file. 664 metalinkLicense = 665 element metalink:license { 666 metalinkCommonAttributes, 667 attribute url { metalinkUri }?, 668 attribute name { text }? 669 } 671 The metalink:license element MAY have a "url" attribute whose value 672 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 673 URI (mapped from an IRI, if necessary) SHOULD produce a 674 representation that is relevant to that agent. 676 The metalink:license element MAY have a "name" attribute that 677 indicates the name of the license. 679 4.2.9. The "metalink:logo" Element 681 The "metalink:logo" element's content is an IRI reference [RFC3987] 682 that identifies an image that provides visual identification for a 683 file. 685 metalinkLogo = 686 element metalink:logo { 687 metalinkCommonAttributes, 688 (metalinkUri) 689 } 691 The image SHOULD have an aspect ratio of one (horizontal) to one 692 (vertical) and SHOULD be suitable for presentation at a small size. 694 4.2.10. The "metalink:metaurl" Element 696 The "metalink:metaurl" element contains the IRI of metadata about a 697 resource to download. For example, this could be the IRI of a 698 BitTorrent .torrent file or a Metalink Document. Note that the 699 information in the metalink:hash element does not apply to these 700 files, but to the files that are described by them. 702 metalinkMetaURL = 703 element metalink:metaurl { 704 metalinkCommonAttributes, 705 attribute preference { xsd:integer }?, 706 attribute type { text }, 707 attribute name { text }?, 708 metalinkUri 709 } 711 4.2.10.1. The "preference" Attribute 713 metalink:metaurl elements MAY have a preference attribute, whose 714 value MUST be a number from 1 to 100 for priority, with 100 used 715 first and 1 used last. Multiple metalink:metaurl elements can have 716 the same preference, i.e. three BitTorrent .torrent files could have 717 preference="100". See also the "preference" attribute of the 718 metalink:url element. 720 4.2.10.2. The "type" Attribute 722 metalink:metaurl elements MUST have a "type" attribute that indicates 723 the MIME type of the metadata available at the IRI. In the case of 724 BitTorrent as specified in [BITTORRENT], the value "torrent" is 725 required. Types without "/" are reserved. Currently, "torrent" is 726 the only reserved value. 728 4.2.10.3. The "name" Attribute 730 metalink:metaurl elements MAY have a "name" attribute that indicates 731 a specific file in a BitTorrent .torrent file or a Metalink Document 732 that describes multiple files. 734 Directory information can also be contained in a "path/file" format 735 only, as in: 737 739 In this example, a file named "Contents-amd64.gz" is indicated, in a 740 "debian-amd64/sarge/" subdirectory. The path MUST NOT contain any 741 directory traversal directives or information. The path MUST be 742 relative. The path MUST NOT begin with a "/", "./" or "../", contain 743 "/../", or end with "/..". 745 4.2.11. The "metalink:origin" Element 747 The "metalink:origin" element is an IRI where the Metalink Document 748 was originally published. If metalink:dynamic is "true", then 749 updated versions of the Metalink can be found at this IRI. 751 metalinkOrigin = 752 element metalink:origin { 753 metalinkCommonAttributes, 754 (metalinkUri) 755 } 757 4.2.12. The "metalink:os" Element 759 The "metalink:os" element is a Text construct that conveys a human- 760 readable Operating System for a file. The IANA registry named 761 "Operating System Names" defines values for OS types. 763 metalinkOS = 764 element metalink:os { 765 metalinkTextConstruct 766 } 768 4.2.13. The "metalink:published" Element 770 The "metalink:published" element is a Date construct indicating an 771 instant in time associated with an event early in the life cycle of 772 the entry. 774 metalinkPublished = 775 element metalink:published { 776 metalinkDateConstruct 777 } 779 Typically, metalink:published will be associated with the initial 780 creation or first availability of the resource. 782 4.2.14. The "metalink:publisher" Element 784 The "metalink:publisher" element indicates a group or other entity 785 which has published the file described in the Metalink Document. 787 metalinkPublisher = 788 element metalink:publisher { 789 metalinkCommonAttributes, 790 attribute url { metalinkUri }?, 791 attribute name { text }? 792 } 794 The metalink:publisher element MAY have a "url" attribute whose value 795 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 796 URI (mapped from an IRI, if necessary) SHOULD produce a 797 representation that is relevant to that agent. 799 The metalink:publisher element MAY have a "name" attribute that 800 indicates the name of the publisher. 802 4.2.15. The "metalink:signature" Element 804 The "metalink:signature" element is a Text construct that conveys a 805 digital signature for a file described in a Metalink Document. 806 Digital signatures verify that a file is from the entity that has 807 signed it. 809 metalinkSignature = 810 element metalink:signature { 811 attribute type { "pgp" }, 812 metalinkTextConstruct 813 } 815 4.2.15.1. The "type" Attribute 817 metalink:signature elements MUST have a "type" attribute. The 818 initial value of "type" is the string that is non-empty and matches 819 "pgp". It may be useful to extend Metalink documents with new types 820 of digital signatures, so unknown types are allowed. 822 4.2.16. The "metalink:size" Element 824 The "metalink:size" element indicates the length of the linked 825 content in octets; it is a hint about the content length of the 826 representation returned when the IRI is mapped to a URI and 827 dereferenced. 829 metalinkSize = 830 element metalink:size { 831 metalinkTextConstruct 832 } 834 4.2.17. The "metalink:updated" Element 836 The "metalink:updated" element is a Date construct indicating the 837 most recent instant in time when a Metalink was modified in a way the 838 publisher considers significant. Therefore, not all modifications 839 necessarily result in a changed metalink:updated value. 841 metalinkUpdated = 842 element metalink:updated { 843 metalinkDateConstruct 844 } 846 Publishers MAY change the value of this element over time. 848 4.2.18. The "metalink:url" Element 850 The "metalink:url" element contains the IRI of a file. Most Metalink 851 Documents will contain multiple metalink:url elements, and each one 852 SHOULD be a valid alternative to download the same file. 854 metalinkURL = 855 element metalink:url { 856 metalinkCommonAttributes, 857 attribute location { xsd:string { 858 minLength = "2" maxLength="2"} 859 }?, 860 attribute preference { xsd:integer }?, 861 metalinkUri 862 } 864 4.2.18.1. The "preference" Attribute 866 metalink:url elements MAY have a preference attribute, whose value 867 MUST be a number from 1 to 100 for priority, with 100 used first and 868 1 used last. Multiple metalink:url elements can have the same 869 preference, i.e. ten mirrors could have preference="100". 871 4.2.18.2. The "location" Attribute 873 metalink:url elements MAY have a "location" attribute, which is a 874 [ISO3166-1] alpha-2 two letter country code for the geographical 875 location of the physical server an IRI is used to access. 877 4.2.19. The "metalink:version" Element 879 The "metalink:version" element is a Text construct that conveys a 880 human-readable version for a file. The version of OpenOffice.org 3.0 881 would be "3.0". 883 metalinkVersion = 884 element metalink:version { 885 metalinkTextConstruct 886 } 888 5. Securing Metalink Documents 890 Because Metalink is an XML-based format, existing XML security 891 mechanisms can be used to secure its content. 893 Producers of Metalink Documents may have sound reasons for signing 894 otherwise-unprotected content. For example, a merchant might 895 digitally sign a Metalink that lists a file download to verify its 896 origin. Other merchants may wish to sign and encrypt Metalink 897 Documents that list digital songs that have been purchased. Of 898 course, many other examples are conceivable as well. 900 The algorithm requirements in this section pertain to the Metalink 901 Processor. They require that a recipient, at a minimum, be able to 902 handle messages that use the specified cryptographic algorithms. 903 These requirements do not limit the algorithms that the sender can 904 choose. 906 Metalink Processors that verify signed Metalink Documents MUST at 907 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 909 6. Extending Metalink 911 6.1. Extensions from Non-Metalink Vocabularies 913 This specification describes Metalink's XML markup vocabulary. 914 Markup from other vocabularies ("foreign markup") can be used in an 915 Metalink Document. 917 6.2. Extensions to the Metalink Vocabulary 919 The Metalink namespace is reserved for future forward-compatible 920 revisions of Metalink. Future versions of this specification could 921 add new elements and attributes to the Metalink markup vocabulary. 922 Software written to conform to this version of the specification will 923 not be able to process such markup correctly and, in fact, will not 924 be able to distinguish it from markup error. For the purposes of 925 this discussion, unrecognized markup from the Metalink vocabulary 926 will be considered "foreign markup". 928 6.3. Processing Foreign Markup 930 Metalink Processors that encounter foreign markup in a location that 931 is legal according to this specification MUST NOT stop processing or 932 signal an error. It might be the case that the Metalink Processor is 933 able to process the foreign markup correctly and does so. Otherwise, 934 such markup is termed "unknown foreign markup". 936 When unknown foreign markup is encountered as a child of metalink: 937 file, metalink:metalink, Metalink Processors MAY bypass the markup 938 and any textual content and MUST NOT change their behavior as a 939 result of the markup's presence. 941 When unknown foreign markup is encountered in a Text Construct, 942 software SHOULD ignore the markup and process any text content of 943 foreign elements as though the surrounding markup were not present. 945 6.4. Extension Elements 947 Metalink allows foreign markup anywhere in an Metalink document, 948 except where it is explicitly forbidden. Child elements of metalink: 949 file and metalink:metalink are considered Metadata elements and are 950 described below. Child elements of Person constructs are considered 951 to apply to the construct. The role of other foreign markup is 952 undefined by this specification. 954 6.4.1. Simple Extension Elements 956 A Simple Extension element MUST NOT have any attributes or child 957 elements. The element MAY contain character data or be empty. 958 Simple Extension elements are not Language-Sensitive. 960 simpleExtensionElement = 961 element * - metalink:* { 962 text 963 } 965 The element can be interpreted as a simple property (or name/value 966 pair) of the parent element that encloses it. The pair consisting of 967 the namespace-URI of the element and the local name of the element 968 can be interpreted as the name of the property. The character data 969 content of the element can be interpreted as the value of the 970 property. If the element is empty, then the property value can be 971 interpreted as an empty string. 973 6.4.2. Structured Extension Elements 975 The root element of a Structured Extension element MUST have at least 976 one attribute or child element. It MAY have attributes, it MAY 977 contain well-formed XML content (including character data), or it MAY 978 be empty. Structured Extension elements are Language-Sensitive. 980 structuredExtensionElement = 981 element * - metalink:* { 982 (attribute * { text }+, 983 (text|anyElement)*) 984 | (attribute * { text }*, 985 (text?, anyElement+, (text|anyElement)*)) 986 } 988 The structure of a Structured Extension element, including the order 989 of its child elements, could be significant. 991 This specification does not provide an interpretation of a Structured 992 Extension element. The syntax of the XML contained in the element 993 (and an interpretation of how the element relates to its containing 994 element) is defined by the specification of the Metalink extension. 996 7. IANA Considerations 998 7.1. XML Namespace Registration 1000 This document makes use of the XML registry specified in [RFC3688]. 1001 Accordingly, IANA has made the following registration: 1003 Registration request for the Metalink namespace: 1005 URI: urn:ietf:params:xml:ns:metalink 1007 Registrant Contact: See the "Author's Address" section of this 1008 document. 1010 XML: None. Namespace URIs do not represent an XML specification. 1012 7.2. application/metalink+xml MIME type 1014 A Metalink Document, when serialized as XML 1.0, can be identified 1015 with the following media type: 1017 MIME media type name: application 1018 MIME subtype name: metalink4+xml 1019 Mandatory parameters: None. 1020 Optional parameters: 1021 "charset": This parameter has semantics identical to the charset 1022 parameter of the "application/xml" media type as specified in 1023 [RFC3023]. 1024 Encoding considerations: Identical to those of "application/xml" as 1025 described in [RFC3023], Section 3.2. 1026 Security considerations: As defined in this specification. 1027 In addition, as this media type uses the "+xml" convention, it 1028 shares the same security considerations as described in [RFC3023], 1029 Section 10. 1030 Interoperability considerations: There are no known interoperability 1031 issues. 1032 Published specification: This specification. 1033 Applications that use this media type: No known applications 1034 currently use this media type. 1036 Additional information: 1038 Magic number(s): As specified for "application/xml" in [RFC3023], 1039 Section 3.2. 1040 File extension: .metalink 1041 Fragment identifiers: As specified for "application/xml" in 1042 [RFC3023], Section 5. 1043 Base URI: As specified in [RFC3023], Section 6. 1044 Macintosh File Type code: TEXT 1045 Person and email address to contact for further information: Anthony 1046 Bryan 1047 Intended usage: COMMON 1048 Author/Change controller: IESG 1050 8. Security Considerations 1052 Publishers are encouraged to offer Metalink documents via 1053 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1054 are also encouraged to include digital signatures of the files within 1055 the Metalink Documents if they are available. 1057 8.1. URIs and IRIs 1059 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1060 and Section 8 of [RFC3987] for security considerations related to 1061 their handling and use. 1063 8.2. Spoofing 1065 There is potential for spoofing attacks where the attacker publishes 1066 Metalink Documents with false information. Malicious publishers 1067 might create Metalink Documents containing inaccurate information 1068 anywhere in the document. At best, this could deceive unaware 1069 downloaders that they are downloading a malicious or worthless file. 1070 At worst, malicious publishers could attempt a distributed denial of 1071 service attack by inserting unrelated IRIs into Metalink Documents. 1073 8.3. Cryptographic Hashes 1075 Currently, some of the hash types defined in the IANA registry named 1076 "Hash Function Textual Names" are considered insecure. These include 1077 the whole Message Digest family of algorithms which are not suitable 1078 for cryptographically strong verification. Malicious people could 1079 provide files that appear to be identical to another file because of 1080 a collision, i.e. the weak cryptographic hashes of the intended file 1081 and a substituted malicious file could match. 1083 If a Metalink Document contains hashes, it SHOULD include "sha-1" 1084 which is SHA-1, as specified in [RFC3174]. It MAY also include other 1085 hashes. 1087 8.4. Signing 1089 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1090 subject to the security considerations implied by its use. This 1091 addresses the issue of spoofing. 1093 Digital signatures provide authentication, message integrity, and 1094 non-repudiation with proof of origin. 1096 9. References 1098 9.1. Normative References 1100 [BITTORRENT] 1101 Cohen, B., "The BitTorrent Protocol Specification", 1102 BITTORRENT 11031, February 2008, 1103 . 1105 [ISO3166-1] 1106 International Organization for Standardization, "ISO 3166- 1107 1:2006. Codes for the representation of names of 1108 countries and their subdivisions -- Part 1: Country 1109 codes", November 2006. 1111 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1112 and E. Maler, "Extensible Markup Language (XML) 1.0 1113 (Fourth Edition)", World Wide Web Consortium 1114 Recommendation REC-xml-20060816, August 2006, 1115 . 1117 [REC-xml-infoset] 1118 Cowan, J. and R. Tobin, "XML Information Set (Second 1119 Edition)", World Wide Web Consortium Recommendation REC- 1120 xml-infoset-20040204, February 2004, 1121 . 1123 [REC-xml-names] 1124 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1125 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1126 Consortium Recommendation REC-xml-names-20060816, 1127 August 2006, 1128 . 1130 [REC-xmlbase] 1131 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1132 June 2001, 1133 . 1135 [REC-xmldsig-core] 1136 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1137 Syntax and Processing (Second Edition)", World Wide Web 1138 Consortium Recommendation REC-xmldsig-core-20080610, 1139 June 2008, 1140 . 1142 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1143 Requirement Levels", BCP 14, RFC 2119, March 1997. 1145 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1147 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1148 Types", RFC 3023, January 2001. 1150 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1151 (SHA1)", RFC 3174, September 2001. 1153 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1154 Timestamps", RFC 3339, July 2002. 1156 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1157 January 2004. 1159 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1160 Resource Identifier (URI): Generic Syntax", STD 66, 1161 RFC 3986, January 2005. 1163 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1164 Identifiers (IRIs)", RFC 3987, January 2005. 1166 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 1167 Languages", BCP 47, RFC 4646, September 2006. 1169 9.2. Informative References 1171 [ISO.8601.1988] 1172 International Organization for Standardization, "Data 1173 elements and interchange formats - Information interchange 1174 - Representation of dates and times", ISO Standard 8601, 1175 June 1988. 1177 [RELAX-NG] 1178 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1182 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1183 Format", RFC 4287, December 2005. 1185 [W3C.NOTE-datetime-19980827] 1186 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1187 NOTE NOTE-datetime-19980827, August 1998, 1188 . 1190 [W3C.REC-xmlschema-2-20041028] 1191 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1192 Second Edition", W3C REC REC-xmlschema-2-20041028, 1193 October 2004, 1194 . 1196 Appendix A. Acknowledgements and Contributors 1198 The layout and content of this document relies heavily on work 1199 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1201 The following people contributed to preliminary versions of this 1202 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1203 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1204 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1205 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1206 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1207 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1208 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1209 Hoffman, Felix Sasaki, Matthias Fuchs, Eran Hammer-Lahav, and Mark 1210 Nottingham. The content and concepts within are a product of the 1211 Metalink community. 1213 The Metalink community has dozens of contributors who proposed ideas 1214 and wording for this document, or contributed to the evolution of 1215 Metalink, including: 1217 Nicolas Alvarez, Patrick Ruckstuhl, Sebastien Willemijns, Micah 1218 Cowan, Yazsoft, KGet developers, FDM Team, Orbit Team, Arne 1219 Babenhauserheide, Mathias Berchtold, Xienzhenyu and TheWorld Browser 1220 Team, Xi Software, Bridget and Ethan Fletcher, Ruben Kerkhof, 1221 Agostino Russo, Salvatore and Robin Musumeci, Steve and Rachel 1222 Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave Winquist, Bob 1223 Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve Kleisath, Chad 1224 Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, Derick Cordoba, 1225 Ryan Alexander, John Sowder, Sandra Amisano, Tom Mainville, Janie 1226 Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus Hofmann, Dan 1227 Connolly, Tim Berners-Lee, Louis Suarez-Potts, Ross Smith, Jeff 1228 Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan Svedberg, Dedric 1229 Carter, James Antill, Debi Goulding, the Anthony Family, the Bryan 1230 Family, Juanita Anthony and Zimmy Bryan. 1232 Appendix B. RELAX NG Compact Schema 1234 This appendix is informative. 1236 The Relax NG schema explicitly excludes elements in the Metalink 1237 namespace that are not defined in this revision of the specification. 1238 Requirements for Metalink Processors encountering such markup are 1239 given in Sections 6.2 and 6.3. 1241 # -*- rnc -*- 1242 # RELAX NG Compact Syntax Grammar for the 1243 # Metalink Format Specification Version 4 1245 namespace local = "" 1246 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1247 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1249 # Common attributes 1251 metalinkCommonAttributes = 1252 attribute xml:base { metalinkUri }?, 1253 attribute xml:lang { metalinkLanguageTag }?, 1254 undefinedAttribute* 1256 # Text Constructs 1258 metalinkTextConstruct = 1259 metalinkCommonAttributes, 1260 text 1262 # Date Construct 1264 metalinkDateConstruct = 1265 metalinkCommonAttributes, 1266 xsd:dateTime 1268 start = metalinkMetalink 1270 metalinkMetalink = 1271 element metalink:metalink { 1272 metalinkCommonAttributes, 1273 (metalinkDynamic? 1274 & metalinkFile+ 1275 & metalinkGenerator? 1276 & metalinkOrigin? 1277 & metalinkPublished? 1278 & metalinkUpdated? 1279 & extensionElement*) 1280 } 1282 metalinkFile = 1283 element metalink:file { 1284 metalinkCommonAttributes, 1285 attribute name { text }, 1286 (metalinkCopyright? 1287 & metalinkDescription? 1288 & metalinkIdentity? 1289 & metalinkHash* 1290 & metalinkLanguage? 1291 & metalinkLicense? 1292 & metalinkLogo? 1293 & metalinkMetaURL* 1294 & metalinkURL* 1295 & metalinkOS? 1296 & metalinkPieces* 1297 & metalinkPublisher? 1298 & metalinkSignature? 1299 & metalinkSize? 1300 & metalinkVersion? 1301 & extensionElement*) 1302 } 1304 metalinkPieces = 1305 element metalink:pieces { 1306 attribute length { xsd:integer }, 1307 attribute type { text }, 1308 metalinkHash+ 1309 } 1311 metalinkCopyright = 1312 element metalink:copyright { 1313 metalinkTextConstruct 1314 } 1316 metalinkDescription = 1317 element metalink:description { 1318 metalinkTextConstruct 1319 } 1321 metalinkDynamic = 1322 element metalink:dynamic { 1323 "true" | "false" 1324 } 1326 metalinkGenerator = 1327 element metalink:generator { 1328 metalinkTextConstruct 1329 } 1331 metalinkHash = 1332 element metalink:hash { 1333 attribute type { text }?, 1334 text 1335 } 1337 metalinkIdentity = 1338 element metalink:identity { 1339 metalinkTextConstruct 1340 } 1342 metalinkLanguage = 1343 element metalink:language { 1344 metalinkTextConstruct 1345 } 1347 metalinkLicense = 1348 element metalink:license { 1349 metalinkCommonAttributes, 1350 attribute url { metalinkUri }?, 1351 attribute name { text }? 1352 } 1354 metalinkLogo = 1355 element metalink:logo { 1356 metalinkCommonAttributes, 1357 (metalinkUri) 1358 } 1360 metalinkMetaURL = 1361 element metalink:metaurl { 1362 metalinkCommonAttributes, 1363 attribute preference { xsd:integer }?, 1364 attribute type { text }, 1365 attribute name { text }?, 1366 metalinkUri 1367 } 1369 metalinkOrigin = 1370 element metalink:origin { 1371 metalinkCommonAttributes, 1372 (metalinkUri) 1373 } 1375 metalinkOS = 1376 element metalink:os { 1377 metalinkTextConstruct 1378 } 1380 metalinkPublished = 1381 element metalink:published { 1382 metalinkDateConstruct 1383 } 1385 metalinkPublisher = 1386 element metalink:publisher { 1387 metalinkCommonAttributes, 1388 attribute url { metalinkUri }?, 1389 attribute name { text }? 1390 } 1392 metalinkSignature = 1393 element metalink:signature { 1394 attribute type { "pgp" }, 1395 metalinkTextConstruct 1396 } 1398 metalinkSize = 1399 element metalink:size { 1400 metalinkTextConstruct 1401 } 1403 metalinkUpdated = 1404 element metalink:updated { 1405 metalinkDateConstruct 1406 } 1408 metalinkURL = 1409 element metalink:url { 1410 metalinkCommonAttributes, 1411 attribute location { xsd:string { 1412 minLength = "2" maxLength="2"} 1413 }?, 1414 attribute preference { xsd:integer }?, 1415 metalinkUri 1416 } 1418 metalinkVersion = 1419 element metalink:version { 1420 metalinkTextConstruct 1421 } 1423 # As defined in RFC 3066 and compatible with RFC 4646 1424 metalinkLanguageTag = xsd:string { 1425 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1426 } 1428 # Unconstrained; it's not entirely clear how IRI fit into 1429 # xsd:anyURI so let's not try to constrain it here 1430 metalinkUri = text 1432 # Simple Extension 1434 simpleExtensionElement = 1435 element * - metalink:* { 1436 text 1437 } 1439 # Structured Extension 1441 structuredExtensionElement = 1442 element * - metalink:* { 1443 (attribute * { text }+, 1444 (text|anyElement)*) 1445 | (attribute * { text }*, 1446 (text?, anyElement+, (text|anyElement)*)) 1447 } 1449 # Other Extensibility 1451 extensionElement = 1452 simpleExtensionElement | structuredExtensionElement 1454 undefinedAttribute = 1455 attribute * - (xml:base | xml:lang | local:*) { text } 1457 undefinedContent = (text|anyForeignElement)* 1459 anyElement = 1460 element * { 1461 (attribute * { text } 1462 | text 1463 | anyElement)* 1464 } 1466 anyForeignElement = 1467 element * - metalink:* { 1468 (attribute * { text } 1469 | text 1470 | anyElement)* 1471 } 1473 # EOF 1475 Appendix C. Document History (to be removed by RFC Editor before 1476 publication) 1478 [[ to be removed by the RFC editor before publication as an RFC. ]] 1480 Updated versions can be found at 1481 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1482 in Subversion at 1483 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1485 Known issues concerning this draft: 1486 o None. 1488 -14 : August , 2009. 1489 o Update abstract and introduction. 1491 -13 : August 21, 2009. 1493 o Remove files, resources, verification container elements. 1494 o MIME type: application/metalink4+xml 1496 -12 : August 18, 2009. 1497 o Remove "piece" attribute from hash elements in pieces container 1498 elements. 1499 o Rename "uri" attribute of license and publisher elements to "url". 1501 -11 : August 08, 2009. 1502 o Renamed type element (static or dynamic values) to dynamic element 1503 (true or false values). 1504 o Removed metadata inheritance and most other elements from files 1505 element. 1507 -10 : July 28, 2009. 1508 o Schema fixes. 1509 o Rename metadata element to metaurl, add name attribute to it 1510 similar to file element's name attribute. 1511 o Update REC-xmldsig-core reference to second edition. 1513 -09 : July 11, 2009. 1514 o Replace ISO639-2 references with RFC 4646. 1515 o Add ISO3166-1. 1517 -08 : July 04, 2009. 1518 o Clarifications. 1519 o Remove "uri" and "version" attributes from generator element. 1521 -07 : June 18, 2009. 1522 o This ID describes the Metalink document format/schema. 1523 o Remove "Client Implementation Considerations" section. 1524 o Expand "Known issues" section of Document History. 1526 -06 : March 3, 2009. 1527 o Add authors and this Document History section. 1529 -05 : January 13, 2009. 1530 o Clarifications. 1532 -04 : December 31, 2008. 1533 o New IPR notice as required by IETF. 1534 o Correct "metalink:pieces" Element text. 1535 o Add hash examples. 1536 o Slim down "Securing Metalink Documents" section. 1537 o Recommend at least SHA-1. 1539 -03 : September 19, 2008. 1541 o New namespace - urn:ietf:params:xml:ns:metalink 1542 o Use the IANA registry named "Operating System Names" to define 1543 values for OS types. 1544 o Add "Client Implementation Considerations" section, which includes 1545 Content Negotiation. 1547 -02 : September 4, 2008. 1548 o Use the IANA registry named "Hash Function Textual Names" for hash 1549 types. 1550 o metadata Element for listing .torrent, .metalink, etc. 1551 o Remove type attribute for url Element. 1553 -01 : August 28, 2008. 1554 o Clarify directory info in name attribute, hash types, add text for 1555 preference attribute. 1557 -00 : August 23, 2008. 1558 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1559 3.0 specification. 1561 Index 1563 A 1564 application/metalink+xml Media Type 22 1566 C 1567 copyright XML element 12 1569 D 1570 description XML element 13 1572 F 1573 file XML element 10 1575 G 1576 generator XML element 13 1577 Grammar 1578 metalinkCommonAttributes 7 1579 metalinkCopyright 12 1580 metalinkDateConstruct 8 1581 metalinkDescription 13 1582 metalinkFile 10 1583 metalinkGenerator 13 1584 metalinkHash 14 1585 metalinkIdentity 15 1586 metalinkLanguage 15 1587 metalinkLicense 15 1588 metalinkLogo 16 1589 metalinkMetalink 9 1590 metalinkOrigin 17 1591 metalinkOS 17 1592 metalinkPieces 12 1593 metalinkPublished 17 1594 metalinkPublisher 18 1595 metalinkSignature 18 1596 metalinkSize 19 1597 metalinkTextConstruct 8 1598 metalinkType 13 1599 metalinkUpdated 19 1600 metalinkURL 16, 19 1601 metalinkVersion 20 1602 simpleExtensionElement 21 1603 structuredExtensionElement 22 1605 H 1606 hash XML element 13 1608 I 1609 identity XML element 15 1611 L 1612 language XML element 15 1613 license XML element 15 1614 logo XML element 15 1616 M 1617 Media Type 1618 application/metalink+xml 22 1619 metadata XML element 16 1620 metalink XML element 9 1621 metalinkCommonAttributes grammar production 7 1622 metalinkCopyright grammar production 12 1623 metalinkDateConstruct grammar production 8 1624 metalinkDescription grammar production 13 1625 metalinkFile grammar production 10 1626 metalinkGenerator grammar production 13 1627 metalinkHash grammar production 14 1628 metalinkIdentity grammar production 15 1629 metalinkLanguage grammar production 15 1630 metalinkLicense grammar production 15 1631 metalinkLogo grammar production 16 1632 metalinkMetalink grammar production 9 1633 metalinkOrigin grammar production 17 1634 metalinkOS grammar production 17 1635 metalinkPieces grammar production 12 1636 metalinkPublished grammar production 17 1637 metalinkPublisher grammar production 18 1638 metalinkSignature grammar production 18 1639 metalinkSize grammar production 19 1640 metalinkTextConstruct grammar production 8 1641 metalinkType grammar production 13 1642 metalinkUpdated grammar production 19 1643 metalinkURL grammar production 16, 19 1644 metalinkVersion grammar production 20 1646 O 1647 origin XML element 17 1648 os XML element 17 1650 P 1651 pieces XML element 12 1652 published XML element 17 1653 publisher XML element 18 1655 S 1656 signature XML element 18 1657 simpleExtensionElement grammar production 21 1658 size XML element 18 1659 structuredExtensionElement grammar production 22 1661 T 1662 type XML element 13 1664 U 1665 updated XML element 19 1666 url XML element 19 1668 V 1669 version XML element 20 1671 X 1672 XML Elements 1673 copyright 12 1674 description 13 1675 entry 10 1676 generator 13 1677 hash 13 1678 identity 15 1679 language 15 1680 license 15 1681 logo 15 1682 metadata 16 1683 metalink 9 1684 origin 17 1685 os 17 1686 pieces 12 1687 published 17 1688 publisher 18 1689 signature 18 1690 size 18 1691 type 13 1692 updated 19 1693 url 19 1694 version 20 1696 Authors' Addresses 1698 Anthony Bryan (editor) 1699 Metalinker Project 1701 Email: anthonybryan@gmail.com 1702 URI: http://www.metalinker.org 1704 Tatsuhiro Tsujikawa 1705 Metalinker Project 1707 Email: tatsuhiro.t@gmail.com 1708 URI: http://aria2.sourceforge.net 1710 Neil McNab 1711 Metalinker Project 1713 Email: nabber00@gmail.com 1714 URI: http://www.nabber.org 1716 Peter Poeml 1717 Novell, Inc. 1719 Email: info@mirrorbrain.org 1720 URI: http://www.mirrorbrain.org/