idnits 2.17.1 draft-bryan-metalink-13.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 21, 2009) is 5362 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 22, 2010 Metalinker Project 6 P. Poeml 7 Novell, Inc. 8 August 21, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-13 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 22, 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 Documents, an XML-based download 60 description format. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 65 1.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 5 67 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 5 68 2. Metalink Documents . . . . . . . . . . . . . . . . . . . . . . 6 69 3. Common Metalink Constructs . . . . . . . . . . . . . . . . . . 7 70 3.1. Text Constructs . . . . . . . . . . . . . . . . . . . . . 7 71 3.1.1. Text . . . . . . . . . . . . . . . . . . . . . . . . . 7 72 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 8 73 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 8 74 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 8 75 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 8 76 4.1.2. The "metalink:file" Element . . . . . . . . . . . . . 9 77 4.1.3. The "metalink:pieces" Element . . . . . . . . . . . . 11 78 4.2. Metadata Elements . . . . . . . . . . . . . . . . . . . . 12 79 4.2.1. The "metalink:copyright" Element . . . . . . . . . . . 12 80 4.2.2. The "metalink:description" Element . . . . . . . . . . 12 81 4.2.3. The "metalink:dynamic" Element . . . . . . . . . . . . 12 82 4.2.4. The "metalink:generator" Element . . . . . . . . . . . 13 83 4.2.5. The "metalink:hash" Element . . . . . . . . . . . . . 13 84 4.2.6. The "metalink:identity" Element . . . . . . . . . . . 14 85 4.2.7. The "metalink:language" Element . . . . . . . . . . . 14 86 4.2.8. The "metalink:license" Element . . . . . . . . . . . . 15 87 4.2.9. The "metalink:logo" Element . . . . . . . . . . . . . 15 88 4.2.10. The "metalink:metaurl" Element . . . . . . . . . . . . 15 89 4.2.11. The "metalink:origin" Element . . . . . . . . . . . . 16 90 4.2.12. The "metalink:os" Element . . . . . . . . . . . . . . 17 91 4.2.13. The "metalink:published" Element . . . . . . . . . . . 17 92 4.2.14. The "metalink:publisher" Element . . . . . . . . . . . 17 93 4.2.15. The "metalink:signature" Element . . . . . . . . . . . 18 94 4.2.16. The "metalink:size" Element . . . . . . . . . . . . . 18 95 4.2.17. The "metalink:updated" Element . . . . . . . . . . . . 18 96 4.2.18. The "metalink:url" Element . . . . . . . . . . . . . . 19 97 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 19 98 5. Securing Metalink Documents . . . . . . . . . . . . . . . . . 19 99 6. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 20 100 6.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 20 101 6.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 20 102 6.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 20 103 6.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 21 104 6.4.1. Simple Extension Elements . . . . . . . . . . . . . . 21 105 6.4.2. Structured Extension Elements . . . . . . . . . . . . 21 106 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 22 107 7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 22 108 7.2. application/metalink+xml MIME type . . . . . . . . . . . . 22 109 8. Security Considerations . . . . . . . . . . . . . . . . . . . 23 110 8.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 23 111 8.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 23 112 8.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 23 113 8.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 24 114 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 24 115 9.1. Normative References . . . . . . . . . . . . . . . . . . . 24 116 9.2. Informative References . . . . . . . . . . . . . . . . . . 25 117 Appendix A. Acknowledgements and Contributors . . . . . . . . . . 26 118 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 27 119 Appendix C. Document History (to be removed by RFC Editor 120 before publication) . . . . . . . . . . . . . . . . . 32 121 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 122 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 36 124 1. Introduction 126 Metalink is an XML-based document format that describes a file or 127 lists of files to be added to a download queue. Lists are composed 128 of a number of files, each with an extensible set of attached 129 metadata. For example, each file can have a description, checksum, 130 and list of URIs that it is available from. 132 The primary use case that Metalink addresses is the description of 133 downloadable content in a format so download agents can act 134 intelligently and recover from common errors with little or no user 135 interaction necessary. These errors can include multiple servers 136 going down and data corrupted in transmission. 138 [[ Discussion of this draft should take place on 139 discuss@apps.ietf.org or the Metalink discussion mailing list located 140 at metalink-discussion@googlegroups.com. To join the list, visit 141 http://groups.google.com/group/metalink-discussion . ]] 143 1.1. Examples 145 A brief, single file Metalink Document: 147 148 149 150 ftp://ftp.example.com/example.ext 151 http://example.com/example.ext 152 153 http://example.com/example.ext.torrent 154 155 156 157 A more extensive, single file Metalink Document: 159 160 161 2009-05-15T12:23:23Z 162 163 Example 164 1.0 165 en 166 A description of the example file for 167 download. 168 169 80bc95fd391772fa61c91ed68567f0980bb45fd9 170 171 ftp://ftp.example.com/example.ext 172 173 http://example.com/example.ext 174 175 http://example.com/example.ext.torrent 176 177 178 180 1.2. Namespace and Version 182 The XML Namespaces URI [REC-xml-names] for the XML data format 183 described in this specification is: 185 urn:ietf:params:xml:ns:metalink 187 For convenience, this data format may be referred to as "Metalink", 188 which this specification uses internally. 190 1.3. Notational Conventions 192 This specification describes conformance of Metalink Documents. 193 Additionally, it places some requirements on Metalink Processors. 195 This specification uses the namespace prefix "metalink:" for the 196 Namespace URI identified in Section 1.2, above. Note that the choice 197 of namespace prefix is arbitrary and not semantically significant. 199 Metalink is specified using terms from the XML Infoset 200 [REC-xml-infoset]. However, this specification uses a shorthand for 201 two common terms: the phrase "Information Item" is omitted when 202 naming Element Information Items and Attribute Information Items. 203 Therefore, when this specification uses the term "element," it is 204 referring to an Element Information Item in Infoset terms. Likewise, 205 when it uses the term "attribute," it is referring to an Attribute 206 Information Item. 208 Some sections of this specification are illustrated with fragments of 209 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 210 text of this specification provides the definition of conformance. A 211 complete schema appears in Appendix B. 213 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 214 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 215 document are to be interpreted as described in BCP 14, [RFC2119], as 216 scoped to those conformance targets. 218 2. Metalink Documents 220 This specification describes Metalink Documents. 222 A Metalink Document describes a file or group of files, how to access 223 them, and metadata that identifies them. Its root is the metalink: 224 metalink element. 226 namespace metalink = "urn:ietf:params:xml:ns:metalink" 227 start = metalinkMetalink 229 Metalink Documents are specified in terms of the XML Information Set, 230 serialized as XML 1.0 [REC-xml] and identified with the "application/ 231 metalink+xml" media type. 233 Metalink Documents MUST be well-formed XML. This specification does 234 not define a DTD for Metalink Documents, and hence does not require 235 them to be valid (in the sense used by XML). 237 Metalink allows the use of IRIs [RFC3987]. Every URI [RFC3986] is 238 also an IRI, so a URI may be used wherever below an IRI is named. 239 There is one special consideration: when an IRI that is not also a 240 URI is given for dereferencing, it MUST be mapped to a URI using the 241 steps in Section 3.1 of [RFC3987]. 243 Any element defined by this specification MAY have an xml:base 244 attribute [REC-xmlbase]. When xml:base is used in an Metalink 245 Document, it serves the function described in Section 5.1.1 of 246 [RFC3986], establishing the base URI (or IRI) for resolving any 247 relative references found within the effective scope of the xml:base 248 attribute. 250 Any element defined by this specification MAY have an xml:lang 251 attribute, whose content indicates the natural language for the 252 element and its descendents. The language context is only 253 significant for elements and attributes declared to be "Language- 254 Sensitive" by this specification. Requirements regarding the content 255 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 256 Section 2.12. 258 metalinkCommonAttributes = 259 attribute xml:base { metalinkUri }?, 260 attribute xml:lang { metalinkLanguageTag }?, 261 undefinedAttribute* 263 Metalink is an extensible format. See Section 6 of this document for 264 a full description of how Metalink Documents can be extended. 266 3. Common Metalink Constructs 268 Many of Metalink's elements share a few common structures. This 269 section defines those structures and their requirements for 270 convenient reference by the appropriate element definitions. 272 When an element is identified as being a particular kind of 273 construct, it inherits the corresponding requirements from that 274 construct's definition in this section. 276 Note that there MUST NOT be any white space in a Date construct or in 277 any IRI. Some XML-emitting implementations erroneously insert white 278 space around values by default, and such implementations will emit 279 invalid Metalink Documents. 281 3.1. Text Constructs 283 A Text construct contains human-readable text, usually in small 284 quantities. The content of Text constructs is Language-Sensitive. 286 metalinkTextConstruct = 287 metalinkCommonAttributes, 288 text 290 3.1.1. Text 292 Example metalink:description with text content: 294 ... 295 296 A description of the example file for download. 297 298 ... 300 The content of the Text construct MUST NOT contain child elements. 301 Such text is intended to be presented to humans in a readable 302 fashion. Thus, white space could be collapsed (including line 303 breaks) and text could be displayed using typographic techniques such 304 as justification and proportional fonts. 306 3.2. Date Constructs 308 A Date construct is an element whose content MUST conform to the 309 "date-time" production in [RFC3339]. In addition, an uppercase "T" 310 character MUST be used to separate date and time, and an uppercase 311 "Z" character MUST be present in the absence of a numeric time zone 312 offset. 314 metalinkDateConstruct = 315 metalinkCommonAttributes, 316 xsd:dateTime 318 Such date values happen to be compatible with the following 319 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 320 [W3C.REC-xmlschema-2-20041028]. 322 Example Date constructs: 324 2009-05-15T18:30:02Z 325 2009-05-15T18:30:02.25Z 326 2009-05-15T18:30:02+01:00 327 2009-05-15T18:30:02.25+01:00 329 Date values SHOULD be as accurate as possible. For example, it would 330 be generally inappropriate for a publishing system to apply the same 331 timestamp to several Metalink Documents that were published during 332 the course of a single day. 334 4. Metalink Element Definitions 336 4.1. Container Elements 338 4.1.1. The "metalink:metalink" Element 340 The "metalink:metalink" element is the document (i.e., top-level) 341 element of a Metalink Document, acting as a container for metadata 342 and data associated with the listed files. It contains one or more 343 metalink:file child elements which consist of metadata elements. 345 metalinkMetalink = 346 element metalink:metalink { 347 metalinkCommonAttributes, 348 (metalinkDynamic? 349 & metalinkFile+ 350 & metalinkGenerator? 351 & metalinkOrigin? 352 & metalinkPublished? 353 & metalinkUpdated? 354 & extensionElement*) 355 } 357 The following child elements are defined by this specification (note 358 that the presence of some of these elements is required): 360 o metalink:metalink elements MAY contain exactly one metalink: 361 dynamic element. 362 o metalink:metalink elements MUST contain one or more metalink:file 363 elements. 364 o metalink:metalink elements MAY contain exactly one metalink: 365 generator element. 366 o metalink:metalink elements SHOULD contain exactly one metalink: 367 origin element. 368 o metalink:metalink elements MAY contain exactly one metalink: 369 published element. 371 4.1.1.1. Providing Textual Content 373 Experience teaches that downloads providing textual content are in 374 general more useful than those that do not. Some applications (one 375 example is full-text indexers) require a minimum amount of text to 376 function reliably and predictably. Metalink publishers should be 377 aware of these issues. It is advisable that each metalink:file 378 element contain a non-empty metalink:description element, a non-empty 379 metalink:identity element when that element is present, and a non- 380 empty metalink:version element, and a non-empty metalink:publisher 381 element. However, the absence of metalink:description is not an 382 error, and Metalink Processors MUST NOT fail to function correctly as 383 a consequence of such an absence. 385 4.1.2. The "metalink:file" Element 387 The "metalink:file" element represents an individual file, acting as 388 a container for metadata and data associated with the file. 390 All metalink:url elements SHOULD lead to identical files. That is, 391 each metalink:url element should be an alternative location for the 392 same file and each metalink:metaurl element should provide metadata 393 to retrieve the same file in another way, such as a peer to peer 394 network. 396 metalinkFile = 397 element metalink:file { 398 metalinkCommonAttributes, 399 attribute name { text }, 400 (metalinkCopyright? 401 & metalinkDescription? 402 & metalinkHash* 403 & metalinkIdentity? 404 & metalinkLanguage? 405 & metalinkLicense? 406 & metalinkLogo? 407 & metalinkMetaURL* 408 & metalinkURL* 409 & metalinkOS? 410 & metalinkPieces* 411 & metalinkPublisher? 412 & metalinkSignature? 413 & metalinkSize? 414 & metalinkVersion? 415 & extensionElement*) 416 } 418 This specification assigns no significance to the order of metalink: 419 file elements or to the order of metalink:url or metalink:metaurl 420 elements. Significance is determined by the value of the 421 "preference" attribute of the metalink:url or metalink:metaurl 422 elements. 424 The following child elements are defined by this specification (note 425 that it requires the presence of some of these elements): 427 o metalink:file elements MAY contain exactly one metalink:copyright 428 element. 429 o metalink:file elements MAY contain exactly one metalink: 430 description element. 431 o metalink:file elements MAY contain exactly one metalink:identity 432 element. 433 o metalink:file elements MAY contain one or more metalink:hash 434 elements. 435 o metalink:file elements MAY contain exactly one metalink:language 436 element. 437 o metalink:file elements MAY contain exactly one metalink:license 438 element. 440 o metalink:file elements MAY contain exactly one metalink:logo 441 element. 442 o metalink:file elements MAY contain exactly one metalink:os 443 element. 444 o metalink:file elements MUST contain at least one metalink:url 445 element or at least one metalink:metaurl element. Typically, 446 metalink:file elements contains more than one metalink:url element 447 to provide multiple download sources. 448 o metalink:file elements MAY contain one or more metalink:pieces 449 elements. 450 o metalink:file elements MAY contain exactly one metalink:publisher 451 element. 452 o metalink:file elements MAY contain one or more metalink:signature 453 elements. 454 o metalink:file elements SHOULD contain exactly one metalink:size 455 element. 456 o metalink:file elements MAY contain exactly one metalink:version 457 element. 459 4.1.2.1. The "name" Attribute 461 metalink:file elements MUST have a "name" attribute, which contains 462 the filename of the file to be downloaded. 464 Directory information can also be contained in a "path/file" format 465 only, as in: 467 469 In this example, a subdirectory "debian-amd64/sarge/" will be created 470 and a file named "Contents-amd64.gz" will be created inside it. The 471 path MUST NOT contain any directory traversal directives or 472 information. The path MUST be relative. The path MUST NOT begin 473 with a "/", "./" or "../", contain "/../", or end with "/..". 475 4.1.3. The "metalink:pieces" Element 477 The "metalink:pieces" element acts as a container for a list of 478 checksums of non-overlapping pieces of the file. The checksums MUST 479 be listed in the same order as the corresponding pieces appear in the 480 file, starting at the beginning of the file. 482 metalinkPieces = 483 element metalink:pieces { 484 attribute length { xsd:integer }, 485 attribute type { text }, 486 metalinkHash+ 487 } 489 4.1.3.1. The "type" Attribute 491 metalink:pieces elements MUST have a "type" attribute. 493 The IANA registry named "Hash Function Textual Names" defines values 494 for hash types. If a Metalink Document contains hashes, it SHOULD 495 include "sha-1" which is SHA-1 as specified in [RFC3174], or a 496 stronger hash. It MAY also include other hashes. 498 4.1.3.2. The "length" Attribute 500 metalink:pieces elements MUST have a "length" attribute, which is an 501 integer that describes the length of the pieces of the file in 502 octets. The whole file is divided into non-overlapping pieces of 503 this length, starting from the beginning of the file. The last piece 504 extends at most to the end of the file, and can therefore be shorter 505 than the other pieces. 507 4.2. Metadata Elements 509 4.2.1. The "metalink:copyright" Element 511 The "metalink:copyright" element is a Text construct that conveys a 512 human-readable copyright for a file. 514 metalinkCopyright = 515 element metalink:copyright { 516 metalinkTextConstruct 517 } 519 4.2.2. The "metalink:description" Element 521 The "metalink:description" element is a Text construct that conveys a 522 human-readable description for a file. 524 metalinkDescription = 525 element metalink:description { 526 metalinkTextConstruct 527 } 529 4.2.3. The "metalink:dynamic" Element 531 The "metalink:dynamic" element is a Text construct that describes 532 whether the IRI from "metalink:origin" in a Metalink will contain 533 dynamic updated information or if it is static and not likely to be 534 updated. 536 metalinkDynamic = 537 element metalink:dynamic { 538 "true" | "false" 539 } 541 4.2.4. The "metalink:generator" Element 543 The "metalink:generator" element's content identifies the generating 544 agent name and version, separated by a "/", used to generate a 545 Metalink Document, for debugging and other purposes. 547 metalinkGenerator = 548 element metalink:generator { 549 metalinkTextConstruct 550 } 552 The content of this element, when present, MUST be a string that is a 553 human-readable name and version, separated by a "/", for the 554 generating agent. For example, "MirrorBrain/2.8.1", where 555 "MirrorBrain" is the name and "2.8.1" is the version. Entities such 556 as "&" and "<" represent their corresponding characters ("&" 557 and "<" respectively), not markup. 559 4.2.5. The "metalink:hash" Element 561 The "metalink:hash" element is a Text construct that conveys a hash 562 for a file. All hashes are encoded in lowercase hexadecimal format. 563 Hashes are used to verify the integrity of a complete file or portion 564 of a file to determine if the file has been transferred without any 565 errors. 567 metalinkHash = 568 element metalink:hash { 569 attribute type { text }?, 570 text 571 } 573 metalink:hash elements with a "type" attribute MUST contain a hash of 574 the complete file. Metalink Documents can contain one or multiples 575 hashes of a complete file. In this example, both SHA-1 and SHA-256 576 hashes are included. 578 ... 579 a97fcf6ba9358f8a6f62beee4421863d3e52b080 580 fc87941af7fd7f03e53b34af393f4c14923d74 581 825f51116ff591336af4880227 582 ... 584 Metalink Documents can also contain hashes for individual pieces of a 585 file. metalink:hash elements that are inside a metalink:pieces 586 container element have a hash for that specific piece or chunk of the 587 file, and are of the same hash type as the metalink:pieces element 588 they are contained in. metalink:hash elements without a "type" 589 attribute MUST contain a hash for that specific piece or chunk of the 590 file and MUST be listed in the same order as the corresponding pieces 591 appear in the file, starting at the beginning of the file. 593 ... 594 a97fcf6ba9358f8a6f62beee4421863d3e52b080 595 fc87941af7fd7f03e53b34af393f4c14923d74 596 825f51116ff591336af4880227 597 598 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 599 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 600 3e84219096435c34e092b17b70a011771c52d87a 601 67183e4c3ab892d3ebe8326b7d79eb62d077f487 602 603 ... 605 4.2.5.1. The "type" Attribute 607 metalink:hash elements MUST have a "type" attribute, if and only if 608 it contains a hash of the complete file. The IANA registry named 609 "Hash Function Textual Names" defines values for hash types. If a 610 Metalink Document contains hashes, it SHOULD include "sha-1" which is 611 SHA-1 as specified in [RFC3174], or a stronger hash. It MAY also 612 include other hashes. 614 4.2.6. The "metalink:identity" Element 616 The "metalink:identity" element is a Text construct that conveys a 617 human-readable identity for a file. The identity of OpenOffice.org 618 3.0 would be "OpenOffice.org". 620 metalinkIdentity = 621 element metalink:identity { 622 metalinkTextConstruct 623 } 625 4.2.7. The "metalink:language" Element 627 The "metalink:language" element is a Text construct that conveys a 628 code for the language of a file, per [RFC4646]. 630 metalinkLanguage = 631 element metalink:language { 632 metalinkTextConstruct 633 } 635 4.2.8. The "metalink:license" Element 637 The "metalink:license" element is a Text construct that conveys a 638 human-readable license name for a file. 640 metalinkLicense = 641 element metalink:license { 642 metalinkCommonAttributes, 643 attribute url { metalinkUri }?, 644 attribute name { text }? 645 } 647 The metalink:license element MAY have a "url" attribute whose value 648 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 649 URI (mapped from an IRI, if necessary) SHOULD produce a 650 representation that is relevant to that agent. 652 The metalink:license element MAY have a "name" attribute that 653 indicates the name of the license. 655 4.2.9. The "metalink:logo" Element 657 The "metalink:logo" element's content is an IRI reference [RFC3987] 658 that identifies an image that provides visual identification for a 659 file. 661 metalinkLogo = 662 element metalink:logo { 663 metalinkCommonAttributes, 664 (metalinkUri) 665 } 667 The image SHOULD have an aspect ratio of one (horizontal) to one 668 (vertical) and SHOULD be suitable for presentation at a small size. 670 4.2.10. The "metalink:metaurl" Element 672 The "metalink:metaurl" element contains the IRI of metadata about a 673 resource to download. For example, this could be the IRI of a 674 BitTorrent .torrent file or a Metalink Document. Note that the 675 information in the metalink:hash element does not apply to these 676 files, but to the files that are described by them. 678 metalinkMetaURL = 679 element metalink:metaurl { 680 metalinkCommonAttributes, 681 attribute preference { xsd:integer }?, 682 attribute type { text }, 683 attribute name { text }?, 684 metalinkUri 685 } 687 4.2.10.1. The "preference" Attribute 689 metalink:metaurl elements MAY have a preference attribute, whose 690 value MUST be a number from 1 to 100 for priority, with 100 used 691 first and 1 used last. Multiple metalink:metaurl elements can have 692 the same preference, i.e. three BitTorrent .torrent files could have 693 preference="100". See also the "preference" attribute of the 694 metalink:url element. 696 4.2.10.2. The "type" Attribute 698 metalink:metaurl elements MUST have a "type" attribute that indicates 699 the MIME type of the metadata available at the IRI. In the case of 700 BitTorrent as specified in [BITTORRENT], the value "torrent" is 701 required. Types without "/" are reserved. Currently, "torrent" is 702 the only reserved value. 704 4.2.10.3. The "name" Attribute 706 metalink:metaurl elements MAY have a "name" attribute that indicates 707 a specific file in a BitTorrent .torrent file or a Metalink Document 708 that describes multiple files. 710 Directory information can also be contained in a "path/file" format 711 only, as in: 713 715 In this example, a file named "Contents-amd64.gz" is indicated, in a 716 "debian-amd64/sarge/" subdirectory. The path MUST NOT contain any 717 directory traversal directives or information. The path MUST be 718 relative. The path MUST NOT begin with a "/", "./" or "../", contain 719 "/../", or end with "/..". 721 4.2.11. The "metalink:origin" Element 723 The "metalink:origin" element is an IRI where the Metalink Document 724 was originally published. If metalink:dynamic is "true", then 725 updated versions of the Metalink can be found at this IRI. 727 metalinkOrigin = 728 element metalink:origin { 729 metalinkCommonAttributes, 730 (metalinkUri) 731 } 733 4.2.12. The "metalink:os" Element 735 The "metalink:os" element is a Text construct that conveys a human- 736 readable Operating System for a file. The IANA registry named 737 "Operating System Names" defines values for OS types. 739 metalinkOS = 740 element metalink:os { 741 metalinkTextConstruct 742 } 744 4.2.13. The "metalink:published" Element 746 The "metalink:published" element is a Date construct indicating an 747 instant in time associated with an event early in the life cycle of 748 the entry. 750 metalinkPublished = 751 element metalink:published { 752 metalinkDateConstruct 753 } 755 Typically, metalink:published will be associated with the initial 756 creation or first availability of the resource. 758 4.2.14. The "metalink:publisher" Element 760 The "metalink:publisher" element indicates a group or other entity 761 which has published the file described in the Metalink Document. 763 metalinkPublisher = 764 element metalink:publisher { 765 metalinkCommonAttributes, 766 attribute url { metalinkUri }?, 767 attribute name { text }? 768 } 770 The metalink:publisher element MAY have a "url" attribute whose value 771 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 772 URI (mapped from an IRI, if necessary) SHOULD produce a 773 representation that is relevant to that agent. 775 The metalink:publisher element MAY have a "name" attribute that 776 indicates the name of the publisher. 778 4.2.15. The "metalink:signature" Element 780 The "metalink:signature" element is a Text construct that conveys a 781 digital signature for a file described in a Metalink Document. 782 Digital signatures verify that a file is from the entity that has 783 signed it. 785 metalinkSignature = 786 element metalink:signature { 787 attribute type { "pgp" }, 788 metalinkTextConstruct 789 } 791 4.2.15.1. The "type" Attribute 793 metalink:signature elements MUST have a "type" attribute. The 794 initial value of "type" is the string that is non-empty and matches 795 "pgp". It may be useful to extend Metalink documents with new types 796 of digital signatures, so unknown types are allowed. 798 4.2.16. The "metalink:size" Element 800 The "metalink:size" element indicates the length of the linked 801 content in octets; it is a hint about the content length of the 802 representation returned when the IRI is mapped to a URI and 803 dereferenced. 805 metalinkSize = 806 element metalink:size { 807 metalinkTextConstruct 808 } 810 4.2.17. The "metalink:updated" Element 812 The "metalink:updated" element is a Date construct indicating the 813 most recent instant in time when a Metalink was modified in a way the 814 publisher considers significant. Therefore, not all modifications 815 necessarily result in a changed metalink:updated value. 817 metalinkUpdated = 818 element metalink:updated { 819 metalinkDateConstruct 820 } 822 Publishers MAY change the value of this element over time. 824 4.2.18. The "metalink:url" Element 826 The "metalink:url" element contains the IRI of a file. Most Metalink 827 Documents will contain multiple metalink:url elements, and each one 828 SHOULD be a valid alternative to download the same file. 830 metalinkURL = 831 element metalink:url { 832 metalinkCommonAttributes, 833 attribute location { xsd:string { 834 minLength = "2" maxLength="2"} 835 }?, 836 attribute preference { xsd:integer }?, 837 metalinkUri 838 } 840 4.2.18.1. The "preference" Attribute 842 metalink:url elements MAY have a preference attribute, whose value 843 MUST be a number from 1 to 100 for priority, with 100 used first and 844 1 used last. Multiple metalink:url elements can have the same 845 preference, i.e. ten mirrors could have preference="100". 847 4.2.18.2. The "location" Attribute 849 metalink:url elements MAY have a "location" attribute, which is a 850 [ISO3166-1] alpha-2 two letter country code for the geographical 851 location of the physical server an IRI is used to access. 853 4.2.19. The "metalink:version" Element 855 The "metalink:version" element is a Text construct that conveys a 856 human-readable version for a file. The version of OpenOffice.org 3.0 857 would be "3.0". 859 metalinkVersion = 860 element metalink:version { 861 metalinkTextConstruct 862 } 864 5. Securing Metalink Documents 866 Because Metalink is an XML-based format, existing XML security 867 mechanisms can be used to secure its content. 869 Producers of Metalink Documents may have sound reasons for signing 870 otherwise-unprotected content. For example, a merchant might 871 digitally sign a Metalink that lists a file download to verify its 872 origin. Other merchants may wish to sign and encrypt Metalink 873 Documents that list digital songs that have been purchased. Of 874 course, many other examples are conceivable as well. 876 The algorithm requirements in this section pertain to the Metalink 877 Processor. They require that a recipient, at a minimum, be able to 878 handle messages that use the specified cryptographic algorithms. 879 These requirements do not limit the algorithms that the sender can 880 choose. 882 Metalink Processors that verify signed Metalink Documents MUST at 883 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 885 6. Extending Metalink 887 6.1. Extensions from Non-Metalink Vocabularies 889 This specification describes Metalink's XML markup vocabulary. 890 Markup from other vocabularies ("foreign markup") can be used in an 891 Metalink Document. 893 6.2. Extensions to the Metalink Vocabulary 895 The Metalink namespace is reserved for future forward-compatible 896 revisions of Metalink. Future versions of this specification could 897 add new elements and attributes to the Metalink markup vocabulary. 898 Software written to conform to this version of the specification will 899 not be able to process such markup correctly and, in fact, will not 900 be able to distinguish it from markup error. For the purposes of 901 this discussion, unrecognized markup from the Metalink vocabulary 902 will be considered "foreign markup". 904 6.3. Processing Foreign Markup 906 Metalink Processors that encounter foreign markup in a location that 907 is legal according to this specification MUST NOT stop processing or 908 signal an error. It might be the case that the Metalink Processor is 909 able to process the foreign markup correctly and does so. Otherwise, 910 such markup is termed "unknown foreign markup". 912 When unknown foreign markup is encountered as a child of metalink: 913 file, metalink:metalink, Metalink Processors MAY bypass the markup 914 and any textual content and MUST NOT change their behavior as a 915 result of the markup's presence. 917 When unknown foreign markup is encountered in a Text Construct, 918 software SHOULD ignore the markup and process any text content of 919 foreign elements as though the surrounding markup were not present. 921 6.4. Extension Elements 923 Metalink allows foreign markup anywhere in an Metalink document, 924 except where it is explicitly forbidden. Child elements of metalink: 925 file and metalink:metalink are considered Metadata elements and are 926 described below. Child elements of Person constructs are considered 927 to apply to the construct. The role of other foreign markup is 928 undefined by this specification. 930 6.4.1. Simple Extension Elements 932 A Simple Extension element MUST NOT have any attributes or child 933 elements. The element MAY contain character data or be empty. 934 Simple Extension elements are not Language-Sensitive. 936 simpleExtensionElement = 937 element * - metalink:* { 938 text 939 } 941 The element can be interpreted as a simple property (or name/value 942 pair) of the parent element that encloses it. The pair consisting of 943 the namespace-URI of the element and the local name of the element 944 can be interpreted as the name of the property. The character data 945 content of the element can be interpreted as the value of the 946 property. If the element is empty, then the property value can be 947 interpreted as an empty string. 949 6.4.2. Structured Extension Elements 951 The root element of a Structured Extension element MUST have at least 952 one attribute or child element. It MAY have attributes, it MAY 953 contain well-formed XML content (including character data), or it MAY 954 be empty. Structured Extension elements are Language-Sensitive. 956 structuredExtensionElement = 957 element * - metalink:* { 958 (attribute * { text }+, 959 (text|anyElement)*) 960 | (attribute * { text }*, 961 (text?, anyElement+, (text|anyElement)*)) 962 } 964 The structure of a Structured Extension element, including the order 965 of its child elements, could be significant. 967 This specification does not provide an interpretation of a Structured 968 Extension element. The syntax of the XML contained in the element 969 (and an interpretation of how the element relates to its containing 970 element) is defined by the specification of the Metalink extension. 972 7. IANA Considerations 974 7.1. XML Namespace Registration 976 This document makes use of the XML registry specified in [RFC3688]. 977 Accordingly, IANA has made the following registration: 979 Registration request for the Metalink namespace: 981 URI: urn:ietf:params:xml:ns:metalink 983 Registrant Contact: See the "Author's Address" section of this 984 document. 986 XML: None. Namespace URIs do not represent an XML specification. 988 7.2. application/metalink+xml MIME type 990 A Metalink Document, when serialized as XML 1.0, can be identified 991 with the following media type: 993 MIME media type name: application 994 MIME subtype name: metalink4+xml 995 Mandatory parameters: None. 996 Optional parameters: 997 "charset": This parameter has semantics identical to the charset 998 parameter of the "application/xml" media type as specified in 999 [RFC3023]. 1000 Encoding considerations: Identical to those of "application/xml" as 1001 described in [RFC3023], Section 3.2. 1002 Security considerations: As defined in this specification. 1003 In addition, as this media type uses the "+xml" convention, it 1004 shares the same security considerations as described in [RFC3023], 1005 Section 10. 1006 Interoperability considerations: There are no known interoperability 1007 issues. 1008 Published specification: This specification. 1009 Applications that use this media type: No known applications 1010 currently use this media type. 1012 Additional information: 1014 Magic number(s): As specified for "application/xml" in [RFC3023], 1015 Section 3.2. 1016 File extension: .metalink 1017 Fragment identifiers: As specified for "application/xml" in 1018 [RFC3023], Section 5. 1019 Base URI: As specified in [RFC3023], Section 6. 1020 Macintosh File Type code: TEXT 1021 Person and email address to contact for further information: Anthony 1022 Bryan 1023 Intended usage: COMMON 1024 Author/Change controller: IESG 1026 8. Security Considerations 1028 Publishers are encouraged to offer Metalink documents via 1029 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1030 are also encouraged to include digital signatures of the files within 1031 the Metalink Documents if they are available. 1033 8.1. URIs and IRIs 1035 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1036 and Section 8 of [RFC3987] for security considerations related to 1037 their handling and use. 1039 8.2. Spoofing 1041 There is potential for spoofing attacks where the attacker publishes 1042 Metalink Documents with false information. Malicious publishers 1043 might create Metalink Documents containing inaccurate information 1044 anywhere in the document. At best, this could deceive unaware 1045 downloaders that they are downloading a malicious or worthless file. 1046 At worst, malicious publishers could attempt a distributed denial of 1047 service attack by inserting unrelated IRIs into Metalink Documents. 1049 8.3. Cryptographic Hashes 1051 Currently, some of the hash types defined in the IANA registry named 1052 "Hash Function Textual Names" are considered insecure. These include 1053 the whole Message Digest family of algorithms which are not suitable 1054 for cryptographically strong verification. Malicious people could 1055 provide files that appear to be identical to another file because of 1056 a collision, i.e. the weak cryptographic hashes of the intended file 1057 and a substituted malicious file could match. 1059 If a Metalink Document contains hashes, it SHOULD include "sha-1" 1060 which is SHA-1, as specified in [RFC3174]. It MAY also include other 1061 hashes. 1063 8.4. Signing 1065 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1066 subject to the security considerations implied by its use. This 1067 addresses the issue of spoofing. 1069 Digital signatures provide authentication, message integrity, and 1070 non-repudiation with proof of origin. 1072 9. References 1074 9.1. Normative References 1076 [BITTORRENT] 1077 Cohen, B., "The BitTorrent Protocol Specification", 1078 BITTORRENT 11031, February 2008, 1079 . 1081 [ISO3166-1] 1082 International Organization for Standardization, "ISO 3166- 1083 1:2006. Codes for the representation of names of 1084 countries and their subdivisions -- Part 1: Country 1085 codes", November 2006. 1087 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1088 and E. Maler, "Extensible Markup Language (XML) 1.0 1089 (Fourth Edition)", World Wide Web Consortium 1090 Recommendation REC-xml-20060816, August 2006, 1091 . 1093 [REC-xml-infoset] 1094 Cowan, J. and R. Tobin, "XML Information Set (Second 1095 Edition)", World Wide Web Consortium Recommendation REC- 1096 xml-infoset-20040204, February 2004, 1097 . 1099 [REC-xml-names] 1100 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1101 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1102 Consortium Recommendation REC-xml-names-20060816, 1103 August 2006, 1104 . 1106 [REC-xmlbase] 1107 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1108 June 2001, 1109 . 1111 [REC-xmldsig-core] 1112 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1113 Syntax and Processing (Second Edition)", World Wide Web 1114 Consortium Recommendation REC-xmldsig-core-20080610, 1115 June 2008, 1116 . 1118 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1119 Requirement Levels", BCP 14, RFC 2119, March 1997. 1121 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1123 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1124 Types", RFC 3023, January 2001. 1126 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1127 (SHA1)", RFC 3174, September 2001. 1129 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1130 Timestamps", RFC 3339, July 2002. 1132 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1133 January 2004. 1135 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1136 Resource Identifier (URI): Generic Syntax", STD 66, 1137 RFC 3986, January 2005. 1139 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1140 Identifiers (IRIs)", RFC 3987, January 2005. 1142 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 1143 Languages", BCP 47, RFC 4646, September 2006. 1145 9.2. Informative References 1147 [ISO.8601.1988] 1148 International Organization for Standardization, "Data 1149 elements and interchange formats - Information interchange 1150 - Representation of dates and times", ISO Standard 8601, 1151 June 1988. 1153 [RELAX-NG] 1154 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1158 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1159 Format", RFC 4287, December 2005. 1161 [W3C.NOTE-datetime-19980827] 1162 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1163 NOTE NOTE-datetime-19980827, August 1998, 1164 . 1166 [W3C.REC-xmlschema-2-20041028] 1167 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1168 Second Edition", W3C REC REC-xmlschema-2-20041028, 1169 October 2004, 1170 . 1172 Appendix A. Acknowledgements and Contributors 1174 The layout and content of this document relies heavily on work 1175 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1177 The following people contributed to preliminary versions of this 1178 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1179 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1180 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1181 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1182 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1183 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1184 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1185 Hoffman, Felix Sasaki, Matthias Fuchs, Eran Hammer-Lahav, and Mark 1186 Nottingham. The content and concepts within are a product of the 1187 Metalink community. 1189 The Metalink community has dozens of contributors who proposed ideas 1190 and wording for this document, or contributed to the evolution of 1191 Metalink, including: 1193 Nicolas Alvarez, Patrick Ruckstuhl, Sebastien Willemijns, Micah 1194 Cowan, Yazsoft, KGet developers, FDM Team, Orbit Team, Arne 1195 Babenhauserheide, Mathias Berchtold, Xienzhenyu and TheWorld Browser 1196 Team, Xi Software, Bridget and Ethan Fletcher, Ruben Kerkhof, 1197 Agostino Russo, Salvatore and Robin Musumeci, Steve and Rachel 1198 Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave Winquist, Bob 1199 Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve Kleisath, Chad 1200 Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, Derick Cordoba, 1201 Ryan Alexander, John Sowder, Sandra Amisano, Tom Mainville, Janie 1202 Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus Hofmann, Dan 1203 Connolly, Tim Berners-Lee, Louis Suarez-Potts, Ross Smith, Jeff 1204 Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan Svedberg, Dedric 1205 Carter, James Antill, Debi Goulding, the Anthony Family, the Bryan 1206 Family, Juanita Anthony and Zimmy Bryan. 1208 Appendix B. RELAX NG Compact Schema 1210 This appendix is informative. 1212 The Relax NG schema explicitly excludes elements in the Metalink 1213 namespace that are not defined in this revision of the specification. 1214 Requirements for Metalink Processors encountering such markup are 1215 given in Sections 6.2 and 6.3. 1217 # -*- rnc -*- 1218 # RELAX NG Compact Syntax Grammar for the 1219 # Metalink Format Specification Version 4 1221 namespace local = "" 1222 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1223 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1225 # Common attributes 1227 metalinkCommonAttributes = 1228 attribute xml:base { metalinkUri }?, 1229 attribute xml:lang { metalinkLanguageTag }?, 1230 undefinedAttribute* 1232 # Text Constructs 1234 metalinkTextConstruct = 1235 metalinkCommonAttributes, 1236 text 1238 # Date Construct 1240 metalinkDateConstruct = 1241 metalinkCommonAttributes, 1242 xsd:dateTime 1244 start = metalinkMetalink 1246 metalinkMetalink = 1247 element metalink:metalink { 1248 metalinkCommonAttributes, 1249 (metalinkDynamic? 1250 & metalinkFile+ 1251 & metalinkGenerator? 1252 & metalinkOrigin? 1253 & metalinkPublished? 1254 & metalinkUpdated? 1255 & extensionElement*) 1256 } 1258 metalinkFile = 1259 element metalink:file { 1260 metalinkCommonAttributes, 1261 attribute name { text }, 1262 (metalinkCopyright? 1263 & metalinkDescription? 1264 & metalinkIdentity? 1265 & metalinkHash* 1266 & metalinkLanguage? 1267 & metalinkLicense? 1268 & metalinkLogo? 1269 & metalinkMetaURL* 1270 & metalinkURL* 1271 & metalinkOS? 1272 & metalinkPieces* 1273 & metalinkPublisher? 1274 & metalinkSignature? 1275 & metalinkSize? 1276 & metalinkVersion? 1277 & extensionElement*) 1278 } 1280 metalinkPieces = 1281 element metalink:pieces { 1282 attribute length { xsd:integer }, 1283 attribute type { text }, 1284 metalinkHash+ 1285 } 1287 metalinkCopyright = 1288 element metalink:copyright { 1289 metalinkTextConstruct 1290 } 1292 metalinkDescription = 1293 element metalink:description { 1294 metalinkTextConstruct 1295 } 1297 metalinkDynamic = 1298 element metalink:dynamic { 1299 "true" | "false" 1300 } 1302 metalinkGenerator = 1303 element metalink:generator { 1304 metalinkTextConstruct 1305 } 1307 metalinkHash = 1308 element metalink:hash { 1309 attribute type { text }?, 1310 text 1311 } 1313 metalinkIdentity = 1314 element metalink:identity { 1315 metalinkTextConstruct 1316 } 1318 metalinkLanguage = 1319 element metalink:language { 1320 metalinkTextConstruct 1321 } 1323 metalinkLicense = 1324 element metalink:license { 1325 metalinkCommonAttributes, 1326 attribute url { metalinkUri }?, 1327 attribute name { text }? 1328 } 1330 metalinkLogo = 1331 element metalink:logo { 1332 metalinkCommonAttributes, 1333 (metalinkUri) 1334 } 1336 metalinkMetaURL = 1337 element metalink:metaurl { 1338 metalinkCommonAttributes, 1339 attribute preference { xsd:integer }?, 1340 attribute type { text }, 1341 attribute name { text }?, 1342 metalinkUri 1343 } 1345 metalinkOrigin = 1346 element metalink:origin { 1347 metalinkCommonAttributes, 1348 (metalinkUri) 1349 } 1351 metalinkOS = 1352 element metalink:os { 1353 metalinkTextConstruct 1354 } 1356 metalinkPublished = 1357 element metalink:published { 1358 metalinkDateConstruct 1359 } 1361 metalinkPublisher = 1362 element metalink:publisher { 1363 metalinkCommonAttributes, 1364 attribute url { metalinkUri }?, 1365 attribute name { text }? 1366 } 1368 metalinkSignature = 1369 element metalink:signature { 1370 attribute type { "pgp" }, 1371 metalinkTextConstruct 1372 } 1374 metalinkSize = 1375 element metalink:size { 1376 metalinkTextConstruct 1377 } 1379 metalinkUpdated = 1380 element metalink:updated { 1381 metalinkDateConstruct 1382 } 1384 metalinkURL = 1385 element metalink:url { 1386 metalinkCommonAttributes, 1387 attribute location { xsd:string { 1388 minLength = "2" maxLength="2"} 1389 }?, 1390 attribute preference { xsd:integer }?, 1391 metalinkUri 1392 } 1394 metalinkVersion = 1395 element metalink:version { 1396 metalinkTextConstruct 1397 } 1399 # As defined in RFC 3066 and compatible with RFC 4646 1400 metalinkLanguageTag = xsd:string { 1401 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1402 } 1404 # Unconstrained; it's not entirely clear how IRI fit into 1405 # xsd:anyURI so let's not try to constrain it here 1406 metalinkUri = text 1408 # Simple Extension 1410 simpleExtensionElement = 1411 element * - metalink:* { 1412 text 1413 } 1415 # Structured Extension 1417 structuredExtensionElement = 1418 element * - metalink:* { 1419 (attribute * { text }+, 1420 (text|anyElement)*) 1421 | (attribute * { text }*, 1422 (text?, anyElement+, (text|anyElement)*)) 1423 } 1425 # Other Extensibility 1427 extensionElement = 1428 simpleExtensionElement | structuredExtensionElement 1430 undefinedAttribute = 1431 attribute * - (xml:base | xml:lang | local:*) { text } 1433 undefinedContent = (text|anyForeignElement)* 1435 anyElement = 1436 element * { 1437 (attribute * { text } 1438 | text 1439 | anyElement)* 1440 } 1442 anyForeignElement = 1443 element * - metalink:* { 1444 (attribute * { text } 1445 | text 1446 | anyElement)* 1447 } 1449 # EOF 1451 Appendix C. Document History (to be removed by RFC Editor before 1452 publication) 1454 [[ to be removed by the RFC editor before publication as an RFC. ]] 1456 Updated versions can be found at 1457 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1458 in Subversion at 1459 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1461 Known issues concerning this draft: 1462 o None. 1464 -13 : August 21, 2009. 1465 o Remove files, resources, verification container elements. 1466 o MIME type: application/metalink4+xml 1468 -12 : August 18, 2009. 1469 o Remove "piece" attribute from hash elements in pieces container 1470 elements. 1471 o Rename "uri" attribute of license and publisher elements to "url". 1473 -11 : August 08, 2009. 1474 o Renamed type element (static or dynamic values) to dynamic element 1475 (true or false values). 1476 o Removed metadata inheritance and most other elements from files 1477 element. 1479 -10 : July 28, 2009. 1480 o Schema fixes. 1481 o Rename metadata element to metaurl, add name attribute to it 1482 similar to file element's name attribute. 1483 o Update REC-xmldsig-core reference to second edition. 1485 -09 : July 11, 2009. 1486 o Replace ISO639-2 references with RFC 4646. 1488 o Add ISO3166-1. 1490 -08 : July 04, 2009. 1491 o Clarifications. 1492 o Remove "uri" and "version" attributes from generator element. 1494 -07 : June 18, 2009. 1495 o This ID describes the Metalink document format/schema. 1496 o Remove "Client Implementation Considerations" section. 1497 o Expand "Known issues" section of Document History. 1499 -06 : March 3, 2009. 1500 o Add authors and this Document History section. 1502 -05 : January 13, 2009. 1503 o Clarifications. 1505 -04 : December 31, 2008. 1506 o New IPR notice as required by IETF. 1507 o Correct "metalink:pieces" Element text. 1508 o Add hash examples. 1509 o Slim down "Securing Metalink Documents" section. 1510 o Recommend at least SHA-1. 1512 -03 : September 19, 2008. 1513 o New namespace - urn:ietf:params:xml:ns:metalink 1514 o Use the IANA registry named "Operating System Names" to define 1515 values for OS types. 1516 o Add "Client Implementation Considerations" section, which includes 1517 Content Negotiation. 1519 -02 : September 4, 2008. 1520 o Use the IANA registry named "Hash Function Textual Names" for hash 1521 types. 1522 o metadata Element for listing .torrent, .metalink, etc. 1523 o Remove type attribute for url Element. 1525 -01 : August 28, 2008. 1526 o Clarify directory info in name attribute, hash types, add text for 1527 preference attribute. 1529 -00 : August 23, 2008. 1530 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1531 3.0 specification. 1533 Index 1534 A 1535 application/metalink+xml Media Type 22 1537 C 1538 copyright XML element 12 1540 D 1541 description XML element 12 1543 F 1544 file XML element 9 1546 G 1547 generator XML element 13 1548 Grammar 1549 metalinkCommonAttributes 7 1550 metalinkCopyright 12 1551 metalinkDateConstruct 8 1552 metalinkDescription 12 1553 metalinkFile 10 1554 metalinkGenerator 13 1555 metalinkHash 13 1556 metalinkIdentity 14 1557 metalinkLanguage 15 1558 metalinkLicense 15 1559 metalinkLogo 15 1560 metalinkMetalink 9 1561 metalinkOrigin 17 1562 metalinkOS 17 1563 metalinkPieces 11 1564 metalinkPublished 17 1565 metalinkPublisher 17 1566 metalinkSignature 18 1567 metalinkSize 18 1568 metalinkTextConstruct 7 1569 metalinkType 13 1570 metalinkUpdated 18 1571 metalinkURL 16, 19 1572 metalinkVersion 19 1573 simpleExtensionElement 21 1574 structuredExtensionElement 21 1576 H 1577 hash XML element 13 1579 I 1580 identity XML element 14 1582 L 1583 language XML element 14 1584 license XML element 15 1585 logo XML element 15 1587 M 1588 Media Type 1589 application/metalink+xml 22 1590 metadata XML element 15 1591 metalink XML element 8 1592 metalinkCommonAttributes grammar production 7 1593 metalinkCopyright grammar production 12 1594 metalinkDateConstruct grammar production 8 1595 metalinkDescription grammar production 12 1596 metalinkFile grammar production 10 1597 metalinkGenerator grammar production 13 1598 metalinkHash grammar production 13 1599 metalinkIdentity grammar production 14 1600 metalinkLanguage grammar production 15 1601 metalinkLicense grammar production 15 1602 metalinkLogo grammar production 15 1603 metalinkMetalink grammar production 9 1604 metalinkOrigin grammar production 17 1605 metalinkOS grammar production 17 1606 metalinkPieces grammar production 11 1607 metalinkPublished grammar production 17 1608 metalinkPublisher grammar production 17 1609 metalinkSignature grammar production 18 1610 metalinkSize grammar production 18 1611 metalinkTextConstruct grammar production 7 1612 metalinkType grammar production 13 1613 metalinkUpdated grammar production 18 1614 metalinkURL grammar production 16, 19 1615 metalinkVersion grammar production 19 1617 O 1618 origin XML element 16 1619 os XML element 17 1621 P 1622 pieces XML element 11 1623 published XML element 17 1624 publisher XML element 17 1626 S 1627 signature XML element 18 1628 simpleExtensionElement grammar production 21 1629 size XML element 18 1630 structuredExtensionElement grammar production 21 1632 T 1633 type XML element 12 1635 U 1636 updated XML element 18 1637 url XML element 19 1639 V 1640 version XML element 19 1642 X 1643 XML Elements 1644 copyright 12 1645 description 12 1646 entry 9 1647 generator 13 1648 hash 13 1649 identity 14 1650 language 14 1651 license 15 1652 logo 15 1653 metadata 15 1654 metalink 8 1655 origin 16 1656 os 17 1657 pieces 11 1658 published 17 1659 publisher 17 1660 signature 18 1661 size 18 1662 type 12 1663 updated 18 1664 url 19 1665 version 19 1667 Authors' Addresses 1669 Anthony Bryan (editor) 1670 Metalinker Project 1672 Email: anthonybryan@gmail.com 1673 URI: http://www.metalinker.org 1674 Tatsuhiro Tsujikawa 1675 Metalinker Project 1677 Email: tatsuhiro.t@gmail.com 1678 URI: http://aria2.sourceforge.net 1680 Neil McNab 1681 Metalinker Project 1683 Email: nabber00@gmail.com 1684 URI: http://www.nabber.org 1686 Peter Poeml 1687 Novell, Inc. 1689 Email: info@mirrorbrain.org 1690 URI: http://www.mirrorbrain.org/