idnits 2.17.1 draft-bryan-metalink-23.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Sep 2009 rather than the newer Notice from 28 Dec 2009. (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 (November 26, 2009) is 5257 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 4288 (Obsoleted by RFC 6838) 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 3 Internet-Draft T. Tsujikawa 4 Intended status: Standards Track N. McNab 5 Expires: May 30, 2010 6 P. Poeml 7 Novell, Inc. 8 November 26, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-23 13 Abstract 15 This document specifies Metalink, an XML-based download description 16 format. Metalink describes download locations (mirrors), checksums, 17 and other information. Clients can transparently use this 18 information to reliably transfer files. 20 Status of this Memo 22 This Internet-Draft is submitted to IETF in full conformance with the 23 provisions of BCP 78 and BCP 79. 25 Internet-Drafts are working documents of the Internet Engineering 26 Task Force (IETF), its areas, and its working groups. Note that 27 other groups may also distribute working documents as Internet- 28 Drafts. 30 Internet-Drafts are draft documents valid for a maximum of six months 31 and may be updated, replaced, or obsoleted by other documents at any 32 time. It is inappropriate to use Internet-Drafts as reference 33 material or to cite them other than as "work in progress." 35 The list of current Internet-Drafts can be accessed at 36 http://www.ietf.org/ietf/1id-abstracts.txt. 38 The list of Internet-Draft Shadow Directories can be accessed at 39 http://www.ietf.org/shadow.html. 41 This Internet-Draft will expire on May 30, 2010. 43 Copyright Notice 45 Copyright (c) 2009 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the BSD License. 58 This document may contain material from IETF Documents or IETF 59 Contributions published or made publicly available before November 60 10, 2008. The person(s) controlling the copyright in some of this 61 material may not have granted the IETF Trust the right to allow 62 modifications of such material outside the IETF Standards Process. 63 Without obtaining an adequate license from the person(s) controlling 64 the copyright in such materials, this document may not be modified 65 outside the IETF Standards Process, and derivative works of it may 66 not be created outside the IETF Standards Process, except to format 67 it for publication as an RFC or to translate it into languages other 68 than English. 70 Table of Contents 72 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 73 1.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 5 74 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 7 75 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 7 76 2. Metalink Documents . . . . . . . . . . . . . . . . . . . . . . 7 77 3. Common Metalink Constructs . . . . . . . . . . . . . . . . . . 9 78 3.1. Text Constructs . . . . . . . . . . . . . . . . . . . . . 9 79 3.1.1. Text . . . . . . . . . . . . . . . . . . . . . . . . . 9 80 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 9 81 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 10 82 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 10 83 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 10 84 4.1.2. The "metalink:file" Element . . . . . . . . . . . . . 11 85 4.1.3. The "metalink:pieces" Element . . . . . . . . . . . . 13 86 4.2. Metadata Elements . . . . . . . . . . . . . . . . . . . . 14 87 4.2.1. The "metalink:copyright" Element . . . . . . . . . . . 14 88 4.2.2. The "metalink:description" Element . . . . . . . . . . 14 89 4.2.3. The "metalink:dynamic" Element . . . . . . . . . . . . 14 90 4.2.4. The "metalink:generator" Element . . . . . . . . . . . 15 91 4.2.5. The "metalink:hash" Element . . . . . . . . . . . . . 15 92 4.2.6. The "metalink:identity" Element . . . . . . . . . . . 16 93 4.2.7. The "metalink:language" Element . . . . . . . . . . . 17 94 4.2.8. The "metalink:license" Element . . . . . . . . . . . . 17 95 4.2.9. The "metalink:logo" Element . . . . . . . . . . . . . 17 96 4.2.10. The "metalink:metaurl" Element . . . . . . . . . . . . 18 97 4.2.11. The "metalink:origin" Element . . . . . . . . . . . . 19 98 4.2.12. The "metalink:os" Element . . . . . . . . . . . . . . 19 99 4.2.13. The "metalink:published" Element . . . . . . . . . . . 19 100 4.2.14. The "metalink:publisher" Element . . . . . . . . . . . 19 101 4.2.15. The "metalink:signature" Element . . . . . . . . . . . 20 102 4.2.16. The "metalink:size" Element . . . . . . . . . . . . . 20 103 4.2.17. The "metalink:updated" Element . . . . . . . . . . . . 21 104 4.2.18. The "metalink:url" Element . . . . . . . . . . . . . . 21 105 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 21 106 5. Securing Metalink Documents . . . . . . . . . . . . . . . . . 22 107 6. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 22 108 6.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 22 109 6.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 22 110 6.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 23 111 6.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 23 112 6.4.1. Simple Extension Elements . . . . . . . . . . . . . . 23 113 6.4.2. Structured Extension Elements . . . . . . . . . . . . 23 114 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 115 7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 24 116 7.2. application/metalink4+xml MIME type . . . . . . . . . . . 24 117 8. Security Considerations . . . . . . . . . . . . . . . . . . . 25 118 8.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 25 119 8.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 25 120 8.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 26 121 8.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 26 122 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 123 9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 124 9.2. Informative References . . . . . . . . . . . . . . . . . . 28 125 Appendix A. Acknowledgements and Contributors . . . . . . . . . . 28 126 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 29 127 Appendix C. Document History (to be removed by RFC Editor 128 before publication) . . . . . . . . . . . . . . . . . 34 129 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 130 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 40 132 1. Introduction 134 Metalink is an XML-based document format that describes a file or 135 list of files to be downloaded from a server. Metalinks can list a 136 number of files, each with an extensible set of attached metadata. 137 Each listed file can have a description, checksum, and a list of URIs 138 that it is available from. 140 Often, identical copies of a file are accessible in multiple 141 locations on the Internet over a variety of protocols (FTP, HTTP, and 142 Peer-to-Peer). In some cases, users are shown a list of these 143 multiple download locations (mirror servers) and must manually select 144 one based on geographical location, priority, or bandwidth. This is 145 done to distribute the load across multiple servers, and to give 146 human users the opportunity to choose a download location that they 147 expect to work best for them. 149 At times, individual servers can be slow, outdated, or unreachable, 150 but this can not be determined until the download has been initiated. 151 This can lead to the user canceling the download and needing to 152 restart it. During downloads, errors in transmission can corrupt the 153 file. There are no easy ways to repair these files. For large 154 downloads this can be especially troublesome. Any of the number of 155 problems that can occur during a download lead to frustration on the 156 part of users, and bandwith wasted with retransmission. 158 Knowledge about availability of a download on mirror servers can be 159 acquired and maintained by the operators of the origin server, or by 160 third a party. This knowledge, together with checksums, digital 161 signatures, and more can be stored in a machine-readable Metalink 162 file. The Metalink file can transfer this knowledge to the user 163 agent, which can peruse it in automatic ways or present the 164 information to a human user. User agents can fall back to alternate 165 mirrors if the current one has an issue. Thereby, clients are 166 enabled to work their way to a successful download even under adverse 167 circumstances. All this can be done transparently to the human user 168 and the download is much more reliable and efficient. In contrast, a 169 traditional HTTP redirect to one mirror conveys only comparatively 170 minimal information - a referral to a single server, and there is no 171 provision in the HTTP protocol to handle failures. 173 Other features that some clients provide include multi-source 174 downloads, where chunks of a file are downloaded from multiple 175 mirrors (and optionally, Peer-to-Peer) simultaneously, which 176 frequently results in a faster download. Metalinks can leverage 177 HTTP, FTP and Peer-to-Peer protocols together, because regardless 178 over which protocol the Metalink was obtained, it can make a resource 179 accessible through other protocols. If the Metalink was obtained 180 from a trusted source, included verification metadata can solve trust 181 issues when downloading files from replica servers operated by third 182 parties. Metalinks also provide structured information about 183 downloads that can be indexed by search engines. 185 [[ Discussion of this draft should take place on 186 discuss@apps.ietf.org. Past discussion has gone on at the Metalink 187 discussion mailing list located at 188 metalink-discussion@googlegroups.com / 189 http://groups.google.com/group/metalink-discussion . ]] 191 1.1. Examples 193 A brief, Metalink Document that describes a single file: 195 196 197 198 199 14471447 200 201 202 ftp://ftp.example.com/example.ext 203 204 205 http://example.com/example.ext 206 207 208 http://example.com/example.ext.torrent 209 210 211 213 A more extensive, Metalink Document that describes two files: 215 216 217 218 2009-05-15T12:23:23Z 219 220 221 222 14471447 223 224 225 Example 226 227 228 1.0 229 230 231 en 232 233 234 A description of the example file for download. 235 236 237 80bc95fd391772fa61c91ed68567f0980bb45fd9 238 239 240 ftp://ftp.example.com/example.ext 241 242 243 http://example.com/example.ext 244 245 246 http://example.com/example.ext.torrent 247 248 249 250 251 14471447 252 253 254 Example 255 256 257 1.0 258 259 260 en 261 262 263 Another description for a second file. 264 265 266 7f4afdc84bd1b79238703fb45cd045efd08bee4b 267 268 269 ftp://ftp.example.com/example2.ext 270 271 272 http://example.com/example2.ext 273 274 275 http://example.com/example2.ext.torrent 277 278 279 281 1.2. Namespace and Version 283 The XML Namespaces URI [REC-xml-names] for the XML data format 284 described in this specification is: 286 urn:ietf:params:xml:ns:metalink 288 For convenience, this data format may be referred to as "Metalink", 289 which this specification uses internally. 291 1.3. Notational Conventions 293 This specification describes conformance of Metalink Documents. 294 Additionally, it places some requirements on Metalink Processors. 296 This specification uses the namespace prefix "metalink:" for the 297 Namespace URI identified in Section 1.2, above. Note that the choice 298 of namespace prefix is arbitrary and not semantically significant. 300 Metalink is specified using terms from the XML Infoset 301 [REC-xml-infoset]. However, this specification uses a shorthand for 302 two common terms: the phrase "Information Item" is omitted when 303 naming Element Information Items and Attribute Information Items. 304 Therefore, when this specification uses the term "element," it is 305 referring to an Element Information Item in Infoset terms. Likewise, 306 when it uses the term "attribute," it is referring to an Attribute 307 Information Item. 309 Some sections of this specification are illustrated with fragments of 310 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 311 text of this specification provides the definition of conformance. A 312 complete schema appears in Appendix B. 314 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 315 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 316 document are to be interpreted as described in BCP 14, [RFC2119], as 317 scoped to those conformance targets. 319 2. Metalink Documents 321 This specification describes Metalink Documents. 323 A Metalink Document describes a file or group of files, how to access 324 them, and metadata that identifies them. Its root is the metalink: 325 metalink element. 327 namespace metalink = "urn:ietf:params:xml:ns:metalink" 328 start = metalinkMetalink 330 Metalink Documents are specified in terms of the XML Information Set, 331 serialized as XML 1.0 [REC-xml] and identified with the "application/ 332 metalink4+xml" media type. 334 Metalink Documents MUST be well-formed XML. This specification does 335 not define a DTD for Metalink Documents, and hence does not require 336 them to be valid (in the sense used by XML). 338 Metalink allows the use of IRIs, encoded according to [RFC3987]. 339 Every URI [RFC3986] is also an IRI, so a URI may be used wherever 340 below an IRI is named. There is one special consideration: when an 341 IRI that is not also a URI is given for dereferencing, it MUST be 342 mapped to a URI using the steps in Section 3.1 of [RFC3987]. 344 Any element defined by this specification MAY have an xml:base 345 attribute [REC-xmlbase]. When xml:base is used in an Metalink 346 Document, it serves the function described in Section 5.1.1 of 347 [RFC3986], establishing the base URI (or IRI) for resolving any 348 relative references found within the effective scope of the xml:base 349 attribute. 351 Any element defined by this specification MAY have an xml:lang 352 attribute, whose content indicates the natural language for the 353 element and its descendents. The language context is only 354 significant for elements and attributes declared to be "Language- 355 Sensitive" by this specification. Requirements regarding the content 356 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 357 Section 2.12. 359 metalinkCommonAttributes = 360 attribute xml:base { metalinkUri }?, 361 attribute xml:lang { metalinkLanguageTag }?, 362 undefinedAttribute* 364 Metalink Documents that do not follow this specification are invalid, 365 and partially or wholly unusable to Metalink Processors. 367 Metalink is an extensible format. See Section 6 of this document for 368 a full description of how Metalink Documents can be extended. 370 3. Common Metalink Constructs 372 Many of Metalink's elements share a few common structures. This 373 section defines those structures and their requirements for 374 convenient reference by the appropriate element definitions. 376 When an element is identified as being a particular kind of 377 construct, it inherits the corresponding requirements from that 378 construct's definition in this section. 380 Note that there MUST NOT be any white space in a Date construct or in 381 any IRI. Some XML-emitting implementations erroneously insert white 382 space around values by default, and such implementations will emit 383 invalid Metalink Documents. 385 3.1. Text Constructs 387 A Text construct contains human-readable text, usually in small 388 quantities. The content of Text constructs is Language-Sensitive. 390 metalinkTextConstruct = 391 metalinkCommonAttributes, 392 text 394 3.1.1. Text 396 Example metalink:description with text content: 398 ... 399 400 A description of the example file for download. 401 402 ... 404 The content of the Text construct MUST NOT contain child elements. 405 Such text is intended to be presented to humans in a readable 406 fashion. Thus, white space could be collapsed (including line 407 breaks) and text could be displayed using typographic techniques such 408 as justification and proportional fonts. 410 3.2. Date Constructs 412 A Date construct is an element whose content MUST conform to the 413 "date-time" production in [RFC3339]. In addition, an uppercase "T" 414 character MUST be used to separate date and time, and an uppercase 415 "Z" character MUST be present in the absence of a numeric time zone 416 offset. 418 metalinkDateConstruct = 419 metalinkCommonAttributes, 420 xsd:dateTime 422 Such date values happen to be compatible with the following 423 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 424 [W3C.REC-xmlschema-2-20041028]. 426 Example Date constructs: 428 2009-05-15T18:30:02Z 429 2009-05-15T18:30:02.25Z 430 2009-05-15T18:30:02+01:00 431 2009-05-15T18:30:02.25+01:00 433 Date values SHOULD be as accurate as possible. For example, it would 434 be generally inappropriate for a publishing system to apply the same 435 timestamp to several Metalink Documents that were published during 436 the course of a single day. 438 4. Metalink Element Definitions 440 4.1. Container Elements 442 4.1.1. The "metalink:metalink" Element 444 The "metalink:metalink" element is the document (i.e., top-level) 445 element of a Metalink Document, acting as a container for metadata 446 and data associated with the listed files. It contains one or more 447 metalink:file child elements which consist of metadata elements. 449 metalinkMetalink = 450 element metalink:metalink { 451 metalinkCommonAttributes, 452 (metalinkDynamic? 453 & metalinkFile+ 454 & metalinkGenerator? 455 & metalinkOrigin? 456 & metalinkPublished? 457 & metalinkUpdated? 458 & extensionElement*) 459 } 461 The following child elements are defined by this specification (note 462 that the presence of some of these elements is required): 464 o metalink:metalink elements MAY contain exactly one metalink: 465 dynamic element. 466 o metalink:metalink elements MUST contain one or more metalink:file 467 elements. 468 o metalink:metalink elements MAY contain exactly one metalink: 469 generator element. 470 o metalink:metalink elements SHOULD contain exactly one metalink: 471 origin element. 472 o metalink:metalink elements MAY contain exactly one metalink: 473 published element. 475 4.1.1.1. Providing Textual Content 477 Experience teaches that downloads providing textual content are in 478 general more useful than those that do not. Some applications (one 479 example is full-text indexers) require a minimum amount of text to 480 function reliably and predictably. Metalink publishers should be 481 aware of these issues. It is advisable that each metalink:file 482 element contain a non-empty metalink:description element, a non-empty 483 metalink:identity element when that element is present, and a non- 484 empty metalink:version element, and a non-empty metalink:publisher 485 element. However, the absence of metalink:description is not an 486 error, and Metalink Processors MUST NOT fail to function correctly as 487 a consequence of such an absence. 489 4.1.2. The "metalink:file" Element 491 The "metalink:file" element represents an individual file, acting as 492 a container for metadata and data associated with the file. 494 All metalink:url elements SHOULD lead to identical files. That is, 495 each metalink:url element should be an alternative location for the 496 same file and each metalink:metaurl element should provide metadata 497 to retrieve the same file in another way, such as a peer to peer 498 network. 500 metalinkFile = 501 element metalink:file { 502 metalinkCommonAttributes, 503 attribute name { text }, 504 (metalinkCopyright? 505 & metalinkDescription? 506 & metalinkHash* 507 & metalinkIdentity? 508 & metalinkLanguage? 509 & metalinkLicense? 510 & metalinkLogo? 511 & metalinkMetaURL* 512 & metalinkURL* 513 & metalinkOS* 514 & metalinkPieces* 515 & metalinkPublisher? 516 & metalinkSignature? 517 & metalinkSize? 518 & metalinkVersion? 519 & extensionElement*) 520 } 522 This specification assigns no significance to the order of metalink: 523 file elements or to the order of metalink:url or metalink:metaurl 524 elements. Significance is determined by the value of the "priority" 525 attribute of the metalink:url or metalink:metaurl elements. 527 The following child elements are defined by this specification (note 528 that it requires the presence of some of these elements): 530 o metalink:file elements MAY contain exactly one metalink:copyright 531 element. 532 o metalink:file elements MAY contain exactly one metalink: 533 description element. 534 o metalink:file elements MAY contain exactly one metalink:identity 535 element. 536 o metalink:file elements MAY contain one or more metalink:hash 537 elements. 538 o metalink:file elements MAY contain exactly one metalink:language 539 element. 540 o metalink:file elements MAY contain exactly one metalink:license 541 element. 542 o metalink:file elements MAY contain exactly one metalink:logo 543 element. 544 o metalink:file elements MAY contain one or more metalink:os 545 element. 547 o metalink:file elements MUST contain at least one metalink:url 548 element or at least one metalink:metaurl element. Typically, 549 metalink:file elements contain more than one metalink:url element 550 to provide multiple download sources. 551 o metalink:file elements MAY contain one or more metalink:pieces 552 elements. 553 o metalink:file elements MAY contain exactly one metalink:publisher 554 element. 555 o metalink:file elements MAY contain one or more metalink:signature 556 elements. 557 o metalink:file elements SHOULD contain exactly one metalink:size 558 element. 559 o metalink:file elements MAY contain exactly one metalink:version 560 element. 562 4.1.2.1. The "name" Attribute 564 metalink:file elements MUST have a "name" attribute, which contains 565 the filename of the file to be downloaded. 567 Directory information can also be contained in a "path/file" format 568 only, as in: 570 572 In this example, a subdirectory "debian-amd64/sarge/" will be created 573 and a file named "Contents-amd64.gz" will be created inside it. The 574 path MUST NOT contain any directory traversal directives or 575 information. The path MUST be relative. The path MUST NOT begin 576 with a "/", "./" or "../", contain "/../", or end with "/..". 578 4.1.3. The "metalink:pieces" Element 580 The "metalink:pieces" element acts as a container for a list of 581 checksums of non-overlapping pieces of the file. The checksums MUST 582 be listed in the same order as the corresponding pieces appear in the 583 file, starting at the beginning of the file. 585 metalinkPieces = 586 element metalink:pieces { 587 attribute length { xsd:positiveInteger }, 588 attribute type { text }, 589 metalinkHash+ 590 } 592 4.1.3.1. The "type" Attribute 594 metalink:pieces elements MUST have a "type" attribute. 596 The IANA registry named "Hash Function Textual Names" defines values 597 for hash types. If a Metalink Document contains hashes, it SHOULD 598 include "sha-1" which is SHA-1 as specified in [RFC3174], or a 599 stronger hash. It MAY also include other hashes. 601 4.1.3.2. The "length" Attribute 603 metalink:pieces elements MUST have a "length" attribute, which is an 604 positive integer that describes the length of the pieces of the file 605 in octets. The whole file is divided into non-overlapping pieces of 606 this length, starting from the beginning of the file. That is, every 607 piece should be the same size, apart from the last piece which is the 608 remainder. The last piece extends to the end of the file, and can 609 therefore be shorter than the other pieces. 611 4.2. Metadata Elements 613 4.2.1. The "metalink:copyright" Element 615 The "metalink:copyright" element is a Text construct that conveys a 616 human-readable copyright for a file. 618 metalinkCopyright = 619 element metalink:copyright { 620 metalinkTextConstruct 621 } 623 4.2.2. The "metalink:description" Element 625 The "metalink:description" element is a Text construct that conveys a 626 human-readable description for a file. 628 metalinkDescription = 629 element metalink:description { 630 metalinkTextConstruct 631 } 633 4.2.3. The "metalink:dynamic" Element 635 The "metalink:dynamic" element is a Text construct that describes 636 whether the IRI from "metalink:origin" in a Metalink will contain 637 dynamic updated information or if it is static and not likely to be 638 updated. 640 metalinkDynamic = 641 element metalink:dynamic { 642 "true" | "false" 643 } 645 4.2.4. The "metalink:generator" Element 647 The "metalink:generator" element's content identifies the generating 648 agent name and version, separated by a "/", used to generate a 649 Metalink Document, for debugging and other purposes. 651 metalinkGenerator = 652 element metalink:generator { 653 metalinkTextConstruct 654 } 656 The content of this element, when present, MUST be a string that is a 657 human-readable name and version, separated by a "/", for the 658 generating agent. For example, "MirrorBrain/2.9.2", where 659 "MirrorBrain" is the name and "2.9.2" is the version. Entities such 660 as "&" and "<" represent their corresponding characters ("&" 661 and "<" respectively), not markup. 663 4.2.5. The "metalink:hash" Element 665 The "metalink:hash" element is a Text construct that conveys a hash 666 for a file. All hashes are encoded in lowercase hexadecimal format. 667 Hashes are used to verify the integrity of a complete file or portion 668 of a file to determine if the file has been transferred without any 669 errors. 671 metalinkHash = 672 element metalink:hash { 673 attribute type { text }?, 674 text 675 } 677 metalink:hash elements with a "type" attribute MUST contain a hash of 678 the complete file. Metalink Documents can contain one or multiples 679 hashes of a complete file. In this example, both SHA-1 and SHA-256 680 hashes are included. 682 ... 683 a97fcf6ba9358f8a6f62beee4421863d3e52b080 684 fc87941af7fd7f03e53b34af393f4c14923d74 685 825f51116ff591336af4880227 686 ... 688 Metalink Documents can also contain hashes for individual pieces of a 689 file. metalink:hash elements that are inside a metalink:pieces 690 container element have a hash for that specific piece or chunk of the 691 file, and are of the same hash type as the metalink:pieces element 692 they are contained in. metalink:hash elements without a "type" 693 attribute MUST contain a hash for that specific piece or chunk of the 694 file and MUST be listed in the same order as the corresponding pieces 695 appear in the file, starting at the beginning of the file. The size 696 of the piece is equal to the value of the "length" attribute of the 697 metalink:pieces element. The whole file is divided into non- 698 overlapping pieces of this length, starting from the beginning of the 699 file. That is, every piece should be the same size, apart from the 700 last piece which is the remainder. The last piece extends to the end 701 of the file, and can therefore be shorter than the other pieces. 703 ... 704 a97fcf6ba9358f8a6f62beee4421863d3e52b080 705 fc87941af7fd7f03e53b34af393f4c14923d74 706 825f51116ff591336af4880227 707 708 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 709 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 710 3e84219096435c34e092b17b70a011771c52d87a 711 67183e4c3ab892d3ebe8326b7d79eb62d077f487 712 713 ... 715 4.2.5.1. The "type" Attribute 717 metalink:hash elements MUST have a "type" attribute, if and only if 718 it contains a hash of the complete file. The IANA registry named 719 "Hash Function Textual Names" defines values for hash types. If a 720 Metalink Document contains hashes, it SHOULD include "sha-1" which is 721 SHA-1 as specified in [RFC3174], or a stronger hash. It MAY also 722 include additional hash types. 724 4.2.6. The "metalink:identity" Element 726 The "metalink:identity" element is a Text construct that conveys a 727 human-readable identity for a file. For example, the identity of 728 Firefox 3.5 would be "Firefox". 730 metalinkIdentity = 731 element metalink:identity { 732 metalinkTextConstruct 733 } 735 4.2.7. The "metalink:language" Element 737 The "metalink:language" element is a Text construct that conveys a 738 code for the language of a file, per [RFC5646]. 740 metalinkLanguage = 741 element metalink:language { 742 metalinkTextConstruct 743 } 745 4.2.8. The "metalink:license" Element 747 The "metalink:license" element is a Text construct that conveys a 748 human-readable license name for a file. 750 metalinkLicense = 751 element metalink:license { 752 metalinkCommonAttributes, 753 attribute url { metalinkUri }?, 754 attribute name { text }? 755 } 757 The metalink:license element MAY have a "url" attribute whose value 758 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 759 URI (mapped from an IRI, if necessary) SHOULD produce a 760 representation that is relevant to that agent. 762 The metalink:license element MAY have a "name" attribute that 763 indicates the name of the license. 765 4.2.9. The "metalink:logo" Element 767 The "metalink:logo" element's content is an IRI reference [RFC3987] 768 that identifies an image that provides visual identification for a 769 file. 771 metalinkLogo = 772 element metalink:logo { 773 metalinkCommonAttributes, 774 (metalinkUri) 775 } 777 The image SHOULD have an aspect ratio of one (horizontal) to one 778 (vertical) and SHOULD be suitable for presentation at a small size. 780 4.2.10. The "metalink:metaurl" Element 782 The "metalink:metaurl" element contains the IRI of a metadata file, 783 also known as a metainfo file, about a resource to download. For 784 example, this could be the IRI of a BitTorrent .torrent file, a 785 Metalink Document, or other type of metadata file. Note that the 786 information in the metalink:hash element does not apply to these 787 metadata files, but to the files that are described by them. 789 metalinkMetaURL = 790 element metalink:metaurl { 791 metalinkCommonAttributes, 792 attribute priority { xsd:positiveInteger }?, 793 attribute type { text }, 794 attribute name { text }?, 795 metalinkUri 796 } 798 4.2.10.1. The "priority" Attribute 800 metalink:metaurl elements MAY have a priority attribute. Values MUST 801 be positive integers. Lower values indicate a higher priority. 802 Multiple metalink:metaurl elements can have the same priority, i.e. 803 three BitTorrent .torrent files could have priority="1". See also 804 the "priority" attribute of the metalink:url element. 806 4.2.10.2. The "type" Attribute 808 metalink:metaurl elements MUST have a "type" attribute that indicates 809 the MIME media type [RFC4288] of the metadata available at the IRI. 810 In the case of BitTorrent as specified in [BITTORRENT], the value 811 "torrent" is required. Types without "/" are reserved. Currently, 812 "torrent" is the only reserved value. 814 4.2.10.3. The "name" Attribute 816 metalink:metaurl elements MAY have a "name" attribute that indicates 817 a specific file in a BitTorrent .torrent file or a Metalink Document 818 that describes multiple files. 820 Directory information can also be contained in a "path/file" format 821 only, as in: 823 825 In this example, a file named "Contents-amd64.gz" is indicated, in a 826 "debian-amd64/sarge/" subdirectory. The path MUST NOT contain any 827 directory traversal directives or information. The path MUST be 828 relative. The path MUST NOT begin with a "/", "./" or "../", contain 829 "/../", or end with "/..". 831 4.2.11. The "metalink:origin" Element 833 The "metalink:origin" element is an IRI where the Metalink Document 834 was originally published. If metalink:dynamic is "true", then 835 updated versions of the Metalink can be found at this IRI. 837 metalinkOrigin = 838 element metalink:origin { 839 metalinkCommonAttributes, 840 (metalinkUri) 841 } 843 4.2.12. The "metalink:os" Element 845 The "metalink:os" element is a Text construct that conveys a human- 846 readable Operating System for a file. The IANA registry named 847 "Operating System Names" defines values for OS types. 849 metalinkOS = 850 element metalink:os { 851 metalinkTextConstruct 852 } 854 4.2.13. The "metalink:published" Element 856 The "metalink:published" element is a Date construct indicating an 857 instant in time associated with an event early in the life cycle of 858 the entry. 860 metalinkPublished = 861 element metalink:published { 862 metalinkDateConstruct 863 } 865 Typically, metalink:published will be associated with the initial 866 creation or first availability of the resource. 868 4.2.14. The "metalink:publisher" Element 870 The "metalink:publisher" element indicates a group or other entity 871 which has published the file described in the Metalink Document. 873 metalinkPublisher = 874 element metalink:publisher { 875 metalinkCommonAttributes, 876 attribute url { metalinkUri }?, 877 attribute name { text }? 878 } 880 The metalink:publisher element MAY have a "url" attribute whose value 881 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 882 URI (mapped from an IRI, if necessary) SHOULD produce a 883 representation that is relevant to that agent. 885 The metalink:publisher element MAY have a "name" attribute that 886 indicates the name of the publisher. 888 4.2.15. The "metalink:signature" Element 890 The "metalink:signature" element is a Text construct that conveys a 891 digital signature for a file described in a Metalink Document. 892 Digital signatures verify that a file is from the entity that has 893 signed it. 895 metalinkSignature = 896 element metalink:signature { 897 attribute type { "pgp" }, 898 metalinkTextConstruct 899 } 901 4.2.15.1. The "type" Attribute 903 metalink:signature elements MUST have a "type" attribute. The 904 initial value of "type" is the string that is non-empty and matches 905 "pgp". It may be useful to extend Metalink documents with new types 906 of digital signatures, so unknown types are allowed. 908 4.2.16. The "metalink:size" Element 910 The "metalink:size" element indicates the length of the linked 911 content in octets; it is a hint about the content length of the 912 representation returned when the IRI is mapped to a URI and 913 dereferenced. This value MUST be a non-negative integer. 915 metalinkSize = 916 element metalink:size { 917 xsd:nonNegativeInteger 918 } 920 4.2.17. The "metalink:updated" Element 922 The "metalink:updated" element is a Date construct indicating the 923 most recent instant in time when a Metalink was modified in a way the 924 publisher considers significant. Therefore, not all modifications 925 necessarily result in a changed metalink:updated value. 927 metalinkUpdated = 928 element metalink:updated { 929 metalinkDateConstruct 930 } 932 Publishers MAY change the value of this element over time. 934 4.2.18. The "metalink:url" Element 936 The "metalink:url" element contains the IRI of a file. Most Metalink 937 Documents will contain multiple metalink:url elements, and each one 938 SHOULD be a valid alternative to download the same file. 940 metalinkURL = 941 element metalink:url { 942 metalinkCommonAttributes, 943 attribute location { xsd:string { 944 minLength = "2" maxLength="2"} 945 }?, 946 attribute priority { xsd:positiveInteger }?, 947 metalinkUri 948 } 950 4.2.18.1. The "priority" Attribute 952 metalink:url elements MAY have a priority attribute. Values MUST be 953 positive integers. Lower values indicate a higher priority. 954 Multiple metalink:url elements can have the same priority, i.e. ten 955 mirrors could have priority="1". 957 4.2.18.2. The "location" Attribute 959 metalink:url elements MAY have a "location" attribute, which is a 960 [ISO3166-1] alpha-2 two letter country code for the geographical 961 location of the physical server an IRI is used to access. 963 4.2.19. The "metalink:version" Element 965 The "metalink:version" element is a Text construct that conveys a 966 human-readable version for a file. The version of Firefox 3.5 would 967 be "3.5". 969 metalinkVersion = 970 element metalink:version { 971 metalinkTextConstruct 972 } 974 5. Securing Metalink Documents 976 Because Metalink is an XML-based format, existing XML security 977 mechanisms can be used to secure its content. 979 Producers of Metalink Documents may have sound reasons for signing 980 otherwise-unprotected content. For example, a merchant might 981 digitally sign a Metalink that lists a file download to verify its 982 origin. Other merchants may wish to sign and encrypt Metalink 983 Documents that list digital songs that have been purchased. Of 984 course, many other examples are conceivable as well. 986 The algorithm requirements in this section pertain to the Metalink 987 Processor. They require that a recipient, at a minimum, be able to 988 handle messages that use the specified cryptographic algorithms. 989 These requirements do not limit the algorithms that the sender can 990 choose. 992 Metalink Processors that verify signed Metalink Documents MUST at 993 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 995 6. Extending Metalink 997 6.1. Extensions from Non-Metalink Vocabularies 999 This specification describes Metalink's XML markup vocabulary. 1000 Markup from other vocabularies ("foreign markup") can be used in an 1001 Metalink Document. 1003 6.2. Extensions to the Metalink Vocabulary 1005 The Metalink namespace is reserved for future forward-compatible 1006 revisions of Metalink. Future versions of this specification could 1007 add new elements and attributes to the Metalink markup vocabulary. 1008 Software written to conform to this version of the specification will 1009 not be able to process such markup correctly and, in fact, will not 1010 be able to distinguish it from markup error. For the purposes of 1011 this discussion, unrecognized markup from the Metalink vocabulary 1012 will be considered "foreign markup". 1014 6.3. Processing Foreign Markup 1016 Metalink Processors that encounter foreign markup in a location that 1017 is legal according to this specification MUST NOT stop processing or 1018 signal an error. It might be the case that the Metalink Processor is 1019 able to process the foreign markup correctly and does so. Otherwise, 1020 such markup is termed "unknown foreign markup". 1022 When unknown foreign markup is encountered as a child of metalink: 1023 file, metalink:metalink, Metalink Processors MAY bypass the markup 1024 and any textual content and MUST NOT change their behavior as a 1025 result of the markup's presence. 1027 When unknown foreign markup is encountered in a Text Construct, 1028 software SHOULD ignore the markup and process any text content of 1029 foreign elements as though the surrounding markup were not present. 1031 6.4. Extension Elements 1033 Metalink allows foreign markup anywhere in an Metalink document, 1034 except where it is explicitly forbidden. Child elements of metalink: 1035 file and metalink:metalink are considered Metadata elements and are 1036 described below. The role of other foreign markup is undefined by 1037 this specification. 1039 6.4.1. Simple Extension Elements 1041 A Simple Extension element MUST NOT have any attributes or child 1042 elements. The element MAY contain character data or be empty. 1043 Simple Extension elements are not Language-Sensitive. 1045 simpleExtensionElement = 1046 element * - metalink:* { 1047 text 1048 } 1050 The element can be interpreted as a simple property (or name/value 1051 pair) of the parent element that encloses it. The pair consisting of 1052 the namespace-URI of the element and the local name of the element 1053 can be interpreted as the name of the property. The character data 1054 content of the element can be interpreted as the value of the 1055 property. If the element is empty, then the property value can be 1056 interpreted as an empty string. 1058 6.4.2. Structured Extension Elements 1060 The root element of a Structured Extension element MUST have at least 1061 one attribute or child element. It MAY have attributes, it MAY 1062 contain well-formed XML content (including character data), or it MAY 1063 be empty. Structured Extension elements are Language-Sensitive. 1065 structuredExtensionElement = 1066 element * - metalink:* { 1067 (attribute * { text }+, 1068 (text|anyElement)*) 1069 | (attribute * { text }*, 1070 (text?, anyElement+, (text|anyElement)*)) 1071 } 1073 The structure of a Structured Extension element, including the order 1074 of its child elements, could be significant. 1076 This specification does not provide an interpretation of a Structured 1077 Extension element. The syntax of the XML contained in the element 1078 (and an interpretation of how the element relates to its containing 1079 element) is defined by the specification of the Metalink extension. 1081 7. IANA Considerations 1083 7.1. XML Namespace Registration 1085 This document makes use of the XML registry specified in [RFC3688]. 1086 Accordingly, IANA has made the following registration: 1088 Registration request for the Metalink namespace: 1090 URI: urn:ietf:params:xml:ns:metalink 1092 Registrant Contact: See the "Author's Address" section of this 1093 document. 1095 XML: None. Namespace URIs do not represent an XML specification. 1097 7.2. application/metalink4+xml MIME type 1099 A Metalink Document, when serialized as XML 1.0, can be identified 1100 with the following media type: 1102 MIME media type name: application 1103 MIME subtype name: metalink4+xml 1104 Mandatory parameters: None. 1106 Optional parameters: 1107 "charset": This parameter has semantics identical to the charset 1108 parameter of the "application/xml" media type as specified in 1109 [RFC3023]. 1110 Encoding considerations: Identical to those of "application/xml" as 1111 described in [RFC3023], Section 3.2. 1112 Security considerations: As defined in this specification. 1113 In addition, as this media type uses the "+xml" convention, it 1114 shares the same security considerations as described in [RFC3023], 1115 Section 10. 1116 Interoperability considerations: There are no known interoperability 1117 issues. 1118 Published specification: This specification. 1119 Applications that use this media type: No known applications 1120 currently use this media type. 1122 Additional information: 1124 Magic number(s): As specified for "application/xml" in [RFC3023], 1125 Section 3.2. 1126 File extension: .meta4 1127 Fragment identifiers: As specified for "application/xml" in 1128 [RFC3023], Section 5. 1129 Base URI: As specified in [RFC3023], Section 6. 1130 Macintosh File Type code: TEXT 1131 Person and email address to contact for further information: Anthony 1132 Bryan 1133 Intended usage: COMMON 1134 Author/Change controller: IESG 1136 8. Security Considerations 1138 Publishers are encouraged to offer Metalink documents via 1139 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1140 are also encouraged to include digital signatures of the files within 1141 the Metalink Documents if they are available. 1143 8.1. URIs and IRIs 1145 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1146 and Section 8 of [RFC3987] for security considerations related to 1147 their handling and use. 1149 8.2. Spoofing 1151 There is potential for spoofing attacks where the attacker publishes 1152 Metalink Documents with false information. Malicious publishers 1153 might create Metalink Documents containing inaccurate information 1154 anywhere in the document. Unaware downloaders could be deceived into 1155 downloading a malicious or worthless file. Malicious publishers 1156 could attempt a distributed denial of service attack by inserting 1157 unrelated IRIs into Metalink Documents. 1159 8.3. Cryptographic Hashes 1161 Currently, some of the hash types defined in the IANA registry named 1162 "Hash Function Textual Names" are considered insecure. These include 1163 the whole Message Digest family of algorithms which are not suitable 1164 for cryptographically strong verification. Malicious people could 1165 provide files that appear to be identical to another file because of 1166 a collision, i.e. the weak cryptographic hashes of the intended file 1167 and a substituted malicious file could match. 1169 If a Metalink Document contains hashes, it SHOULD include "sha-1" 1170 which is SHA-1, as specified in [RFC3174], or stronger. It MAY also 1171 include other hashes from the IANA registry named "Hash Function 1172 Textual Names". 1174 8.4. Signing 1176 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1177 subject to the security considerations implied by its use. This 1178 addresses the issue of spoofing. 1180 Digital signatures provide authentication, message integrity, and 1181 non-repudiation with proof of origin. 1183 9. References 1185 9.1. Normative References 1187 [BITTORRENT] 1188 Cohen, B., "The BitTorrent Protocol Specification", 1189 BITTORRENT 11031, February 2008, 1190 . 1192 [ISO3166-1] 1193 International Organization for Standardization, "ISO 3166- 1194 1:2006. Codes for the representation of names of 1195 countries and their subdivisions -- Part 1: Country 1196 codes", November 2006. 1198 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1199 and E. Maler, "Extensible Markup Language (XML) 1.0 1200 (Fourth Edition)", World Wide Web Consortium 1201 Recommendation REC-xml-20060816, August 2006, 1202 . 1204 [REC-xml-infoset] 1205 Cowan, J. and R. Tobin, "XML Information Set (Second 1206 Edition)", World Wide Web Consortium Recommendation REC- 1207 xml-infoset-20040204, February 2004, 1208 . 1210 [REC-xml-names] 1211 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1212 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1213 Consortium Recommendation REC-xml-names-20060816, 1214 August 2006, 1215 . 1217 [REC-xmlbase] 1218 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1219 June 2001, 1220 . 1222 [REC-xmldsig-core] 1223 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1224 Syntax and Processing (Second Edition)", World Wide Web 1225 Consortium Recommendation REC-xmldsig-core-20080610, 1226 June 2008, 1227 . 1229 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1230 Requirement Levels", BCP 14, RFC 2119, March 1997. 1232 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1234 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1235 Types", RFC 3023, January 2001. 1237 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1238 (SHA1)", RFC 3174, September 2001. 1240 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1241 Timestamps", RFC 3339, July 2002. 1243 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1244 Resource Identifier (URI): Generic Syntax", STD 66, 1245 RFC 3986, January 2005. 1247 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1248 Identifiers (IRIs)", RFC 3987, January 2005. 1250 [RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and 1251 Registration Procedures", BCP 13, RFC 4288, December 2005. 1253 [RFC5646] Phillips, A. and M. Davis, "Tags for Identifying 1254 Languages", BCP 47, RFC 5646, September 2009. 1256 9.2. Informative References 1258 [ISO.8601.1988] 1259 International Organization for Standardization, "Data 1260 elements and interchange formats - Information interchange 1261 - Representation of dates and times", ISO Standard 8601, 1262 June 1988. 1264 [RELAX-NG] 1265 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1269 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1270 January 2004. 1272 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1273 Format", RFC 4287, December 2005. 1275 [W3C.NOTE-datetime-19980827] 1276 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1277 NOTE NOTE-datetime-19980827, August 1998, 1278 . 1280 [W3C.REC-xmlschema-2-20041028] 1281 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1282 Second Edition", W3C REC REC-xmlschema-2-20041028, 1283 October 2004, 1284 . 1286 Appendix A. Acknowledgements and Contributors 1288 The layout and content of this document relies heavily on work 1289 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1291 The content and concepts within are a product of the Metalink 1292 community. 1294 The Metalink community has dozens of contributors who proposed ideas 1295 and wording for this document, or contributed to the evolution of 1296 Metalink, including: 1298 Paul Burkhead, Kristian Weston, Darius Liktorius, Michael Burford, 1299 Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, Manolo 1300 Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus Wessman, 1301 Hayden Legendre, Danny Ayers, Nick Dominguez, Rene Leonhardt, Per 1302 Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel Stenberg, Matt 1303 Domsch, Yazsoft, KGet developers, FDM Team, Orbit Team, Arne 1304 Babenhauserheide, Mathias Berchtold, Xienzhenyu and TheWorld Browser 1305 Team, Xi Software, Nicolas Alvarez, Patrick Ruckstuhl, Sebastien 1306 Willemijns, Micah Cowan, Bridget and Ethan Fletcher, Ruben Kerkhof, 1307 Agostino Russo, Salvatore Musumeci, Steve Eshelman, Lucas Hewett, 1308 Ryan Cronin, Dave Winquist, Bob Denison, Wes Shelton, Kees Cook, Josh 1309 Colbert, Steve Kleisath, Chad Neptune, Nick Carrabba, Chris Carrabba, 1310 Erin Solari, Derick Cordoba, Ryan Alexander, John & Sandra Sowder, 1311 Tom Mainville, Janie Wargo, Jason Hansen, Tim Bray, Dan Brickley, 1312 Markus Hofmann, Dan Connolly, Tim Berners-Lee, Louis Suarez-Potts, 1313 Ross Smith, Jeff Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan 1314 Svedberg, Dedric Carter, James Antill, Debi Goulding, Chris Newman, 1315 Lisa Dusseault, Ian Macfarlane, Dave Cridland, Julian Reschke, Barry 1316 Leiba, Uri Blumenthal, Paul Hoffman, Felix Sasaki, Matthias Fuchs, 1317 Mark Baker, Eran Hammer-Lahav, Mark Nottingham, and Peter Saint- 1318 Andre. We also thank the Anthony Family, the Bryan Family, Juanita 1319 Anthony and Zimmy Bryan. 1321 Appendix B. RELAX NG Compact Schema 1323 This appendix is informative. 1325 The Relax NG schema explicitly excludes elements in the Metalink 1326 namespace that are not defined in this revision of the specification. 1327 Requirements for Metalink Processors encountering such markup are 1328 given in Sections 6.2 and 6.3. 1330 # -*- rnc -*- 1331 # RELAX NG Compact Syntax Grammar for the 1332 # Metalink Format Specification Version 4 1334 namespace local = "" 1335 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1336 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1338 # Common attributes 1340 metalinkCommonAttributes = 1341 attribute xml:base { metalinkUri }?, 1342 attribute xml:lang { metalinkLanguageTag }?, 1343 undefinedAttribute* 1345 # Text Constructs 1347 metalinkTextConstruct = 1348 metalinkCommonAttributes, 1349 text 1351 # Date Construct 1353 metalinkDateConstruct = 1354 metalinkCommonAttributes, 1355 xsd:dateTime 1357 start = metalinkMetalink 1359 metalinkMetalink = 1360 element metalink:metalink { 1361 metalinkCommonAttributes, 1362 (metalinkDynamic? 1363 & metalinkFile+ 1364 & metalinkGenerator? 1365 & metalinkOrigin? 1366 & metalinkPublished? 1367 & metalinkUpdated? 1368 & extensionElement*) 1369 } 1371 metalinkFile = 1372 element metalink:file { 1373 metalinkCommonAttributes, 1374 attribute name { text }, 1375 (metalinkCopyright? 1376 & metalinkDescription? 1377 & metalinkIdentity? 1378 & metalinkHash* 1379 & metalinkLanguage? 1380 & metalinkLicense? 1381 & metalinkLogo? 1382 & metalinkMetaURL* 1383 & metalinkURL* 1384 & metalinkOS* 1385 & metalinkPieces* 1386 & metalinkPublisher? 1387 & metalinkSignature? 1388 & metalinkSize? 1389 & metalinkVersion? 1390 & extensionElement*) 1391 } 1393 metalinkPieces = 1394 element metalink:pieces { 1395 attribute length { xsd:positiveInteger }, 1396 attribute type { text }, 1397 metalinkHash+ 1398 } 1400 metalinkCopyright = 1401 element metalink:copyright { 1402 metalinkTextConstruct 1403 } 1405 metalinkDescription = 1406 element metalink:description { 1407 metalinkTextConstruct 1408 } 1410 metalinkDynamic = 1411 element metalink:dynamic { 1412 "true" | "false" 1413 } 1415 metalinkGenerator = 1416 element metalink:generator { 1417 metalinkTextConstruct 1418 } 1420 metalinkHash = 1421 element metalink:hash { 1422 attribute type { text }?, 1423 text 1424 } 1426 metalinkIdentity = 1427 element metalink:identity { 1428 metalinkTextConstruct 1429 } 1431 metalinkLanguage = 1432 element metalink:language { 1433 metalinkTextConstruct 1434 } 1436 metalinkLicense = 1437 element metalink:license { 1438 metalinkCommonAttributes, 1439 attribute url { metalinkUri }?, 1440 attribute name { text }? 1441 } 1443 metalinkLogo = 1444 element metalink:logo { 1445 metalinkCommonAttributes, 1446 (metalinkUri) 1447 } 1449 metalinkMetaURL = 1450 element metalink:metaurl { 1451 metalinkCommonAttributes, 1452 attribute priority { xsd:positiveInteger }?, 1453 attribute type { text }, 1454 attribute name { text }?, 1455 metalinkUri 1456 } 1458 metalinkOrigin = 1459 element metalink:origin { 1460 metalinkCommonAttributes, 1461 (metalinkUri) 1462 } 1464 metalinkOS = 1465 element metalink:os { 1466 metalinkTextConstruct 1467 } 1469 metalinkPublished = 1470 element metalink:published { 1471 metalinkDateConstruct 1472 } 1474 metalinkPublisher = 1475 element metalink:publisher { 1476 metalinkCommonAttributes, 1477 attribute url { metalinkUri }?, 1478 attribute name { text }? 1479 } 1481 metalinkSignature = 1482 element metalink:signature { 1483 attribute type { "pgp" }, 1484 metalinkTextConstruct 1485 } 1487 metalinkSize = 1488 element metalink:size { 1489 xsd:nonNegativeInteger 1490 } 1492 metalinkUpdated = 1493 element metalink:updated { 1494 metalinkDateConstruct 1495 } 1497 metalinkURL = 1498 element metalink:url { 1499 metalinkCommonAttributes, 1500 attribute location { xsd:string { 1501 minLength = "2" maxLength="2"} 1502 }?, 1503 attribute priority { xsd:positiveInteger }?, 1504 metalinkUri 1505 } 1507 metalinkVersion = 1508 element metalink:version { 1509 metalinkTextConstruct 1510 } 1512 # As defined in RFC 3066 and compatible with RFC 5646 1513 metalinkLanguageTag = xsd:string { 1514 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1515 } 1517 # Unconstrained; it's not entirely clear how IRI fit into 1518 # xsd:anyURI so let's not try to constrain it here 1519 metalinkUri = text 1521 # Simple Extension 1523 simpleExtensionElement = 1524 element * - metalink:* { 1525 text 1526 } 1528 # Structured Extension 1530 structuredExtensionElement = 1531 element * - metalink:* { 1532 (attribute * { text }+, 1533 (text|anyElement)*) 1534 | (attribute * { text }*, 1535 (text?, anyElement+, (text|anyElement)*)) 1536 } 1538 # Other Extensibility 1540 extensionElement = 1541 simpleExtensionElement | structuredExtensionElement 1543 undefinedAttribute = 1544 attribute * - (xml:base | xml:lang | local:*) { text } 1546 undefinedContent = (text|anyForeignElement)* 1548 anyElement = 1549 element * { 1550 (attribute * { text } 1551 | text 1552 | anyElement)* 1553 } 1555 anyForeignElement = 1556 element * - metalink:* { 1557 (attribute * { text } 1558 | text 1559 | anyElement)* 1560 } 1562 # EOF 1564 Appendix C. Document History (to be removed by RFC Editor before 1565 publication) 1567 [[ to be removed by the RFC editor before publication as an RFC. ]] 1569 Updated versions can be found at 1570 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1571 in Subversion at 1572 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1574 Known issues concerning this draft: 1575 o None. 1577 -23 : November 26, 2009. 1578 o Apps Area AD review changes, Change RFC3688 from Normative to 1579 Informative Reference. 1581 o Schema: integer changed to positiveInteger or nonNegativeInteger 1582 where fitting. 1584 -22 : November 09, 2009. 1585 o Clarifications. 1587 -21 : October 13, 2009. 1588 o Update author details. 1590 -20 : October 12, 2009. 1591 o RFC 5646 updates RFC 4646. 1593 -19 : October 5, 2009. 1594 o Remove organization for independent authors. 1596 -18 : October 4, 2009. 1597 o File extension: .meta4 1598 o Hashes clarification, modified to allow multiple metalink:os 1599 elements, add size element to example. 1601 -17 : September 28, 2009. 1602 o Typo correction. 1604 -16 : August 31, 2009. 1605 o Clarifications. 1607 -15 : August 26, 2009. 1608 o Rename "preference" attribute of metaurl and url elements to 1609 "priority", where lower values indicate higher priority. 1611 -14 : August 24, 2009. 1612 o Update abstract and introduction. 1614 -13 : August 21, 2009. 1615 o Remove files, resources, verification container elements. 1616 o MIME type: application/metalink4+xml 1618 -12 : August 18, 2009. 1619 o Remove "piece" attribute from hash elements in pieces container 1620 elements. 1621 o Rename "uri" attribute of license and publisher elements to "url". 1623 -11 : August 08, 2009. 1624 o Renamed type element (static or dynamic values) to dynamic element 1625 (true or false values). 1626 o Removed metadata inheritance and most other elements from files 1627 element. 1629 -10 : July 28, 2009. 1630 o Schema fixes. 1631 o Rename metadata element to metaurl, add name attribute to it 1632 similar to file element's name attribute. 1633 o Update REC-xmldsig-core reference to second edition. 1635 -09 : July 11, 2009. 1636 o Replace ISO639-2 references with RFC 4646. 1637 o Add ISO3166-1. 1639 -08 : July 04, 2009. 1640 o Clarifications. 1641 o Remove "uri" and "version" attributes from generator element. 1643 -07 : June 18, 2009. 1644 o This ID describes the Metalink document format/schema. 1645 o Remove "Client Implementation Considerations" section. 1646 o Expand "Known issues" section of Document History. 1648 -06 : March 3, 2009. 1649 o Add authors and this Document History section. 1651 -05 : January 13, 2009. 1652 o Clarifications. 1654 -04 : December 31, 2008. 1655 o New IPR notice as required by IETF. 1656 o Correct "metalink:pieces" Element text. 1657 o Add hash examples. 1658 o Slim down "Securing Metalink Documents" section. 1659 o Recommend at least SHA-1. 1661 -03 : September 19, 2008. 1662 o New namespace - urn:ietf:params:xml:ns:metalink 1663 o Use the IANA registry named "Operating System Names" to define 1664 values for OS types. 1665 o Add "Client Implementation Considerations" section, which includes 1666 Content Negotiation. 1668 -02 : September 4, 2008. 1669 o Use the IANA registry named "Hash Function Textual Names" for hash 1670 types. 1671 o metadata Element for listing .torrent, .metalink, etc. 1672 o Remove type attribute for url Element. 1674 -01 : August 28, 2008. 1676 o Clarify directory info in name attribute, hash types, add text for 1677 preference attribute. 1679 -00 : August 23, 2008. 1680 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1681 3.0 specification. 1683 Index 1685 A 1686 application/metalink4+xml Media Type 25 1688 C 1689 copyright XML element 15 1691 D 1692 description XML element 15 1694 F 1695 file XML element 12 1697 G 1698 generator XML element 16 1699 Grammar 1700 metalinkCommonAttributes 9 1701 metalinkCopyright 15 1702 metalinkDateConstruct 11 1703 metalinkDescription 15 1704 metalinkFile 13 1705 metalinkGenerator 16 1706 metalinkHash 16 1707 metalinkIdentity 17 1708 metalinkLanguage 18 1709 metalinkLicense 18 1710 metalinkLogo 18 1711 metalinkMetalink 11 1712 metalinkOrigin 20 1713 metalinkOS 20 1714 metalinkPieces 14 1715 metalinkPublished 20 1716 metalinkPublisher 21 1717 metalinkSignature 21 1718 metalinkSize 21 1719 metalinkTextConstruct 10 1720 metalinkType 16 1721 metalinkUpdated 22 1722 metalinkURL 19, 22 1723 metalinkVersion 23 1724 simpleExtensionElement 24 1725 structuredExtensionElement 25 1727 H 1728 hash XML element 16 1730 I 1731 identity XML element 17 1733 L 1734 language XML element 18 1735 license XML element 18 1736 logo XML element 18 1738 M 1739 Media Type 1740 application/metalink4+xml 25 1741 metadata XML element 19 1742 metalink XML element 11 1743 metalinkCommonAttributes grammar production 9 1744 metalinkCopyright grammar production 15 1745 metalinkDateConstruct grammar production 11 1746 metalinkDescription grammar production 15 1747 metalinkFile grammar production 13 1748 metalinkGenerator grammar production 16 1749 metalinkHash grammar production 16 1750 metalinkIdentity grammar production 17 1751 metalinkLanguage grammar production 18 1752 metalinkLicense grammar production 18 1753 metalinkLogo grammar production 18 1754 metalinkMetalink grammar production 11 1755 metalinkOrigin grammar production 20 1756 metalinkOS grammar production 20 1757 metalinkPieces grammar production 14 1758 metalinkPublished grammar production 20 1759 metalinkPublisher grammar production 21 1760 metalinkSignature grammar production 21 1761 metalinkSize grammar production 21 1762 metalinkTextConstruct grammar production 10 1763 metalinkType grammar production 16 1764 metalinkUpdated grammar production 22 1765 metalinkURL grammar production 19, 22 1766 metalinkVersion grammar production 23 1768 O 1769 origin XML element 20 1770 os XML element 20 1772 P 1773 pieces XML element 14 1774 published XML element 20 1775 publisher XML element 20 1777 S 1778 signature XML element 21 1779 simpleExtensionElement grammar production 24 1780 size XML element 21 1781 structuredExtensionElement grammar production 25 1783 T 1784 type XML element 15 1786 U 1787 updated XML element 22 1788 url XML element 22 1790 V 1791 version XML element 22 1793 X 1794 XML Elements 1795 copyright 15 1796 description 15 1797 entry 12 1798 generator 16 1799 hash 16 1800 identity 17 1801 language 18 1802 license 18 1803 logo 18 1804 metadata 19 1805 metalink 11 1806 origin 20 1807 os 20 1808 pieces 14 1809 published 20 1810 publisher 20 1811 signature 21 1812 size 21 1813 type 15 1814 updated 22 1815 url 22 1816 version 22 1818 Authors' Addresses 1820 Anthony Bryan 1821 Pompano Beach, FL 1822 USA 1824 Email: anthonybryan@gmail.com 1825 URI: http://www.metalinker.org 1827 Tatsuhiro Tsujikawa 1829 Email: tatsuhiro.t@gmail.com 1830 URI: http://aria2.sourceforge.net 1832 Neil McNab 1834 Email: neil@nabber.org 1835 URI: http://www.nabber.org 1837 Peter Poeml 1838 Novell, Inc. 1840 Email: poeml@mirrorbrain.org 1841 URI: http://www.mirrorbrain.org/