idnits 2.17.1 draft-bryan-metalink-10.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 (July 28, 2009) is 5376 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, Ed. 4 Intended status: Standards Track N. McNab, Ed. 5 Expires: January 29, 2010 Metalinker Project 6 P. Poeml, Ed. 7 Novell, Inc. 8 July 28, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-10 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 January 29, 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 . . . . . . . . . . . . . . . . . . . . . . . . . 8 72 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 8 73 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 8 74 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 9 75 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 9 76 4.1.2. The "metalink:files" Element . . . . . . . . . . . . . 10 77 4.1.3. The "metalink:file" Element . . . . . . . . . . . . . 11 78 4.1.4. The "metalink:resources" Element . . . . . . . . . . . 12 79 4.1.5. The "metalink:verification" Element . . . . . . . . . 13 80 4.1.6. The "metalink:pieces" Element . . . . . . . . . . . . 14 81 4.2. Metadata Elements . . . . . . . . . . . . . . . . . . . . 14 82 4.2.1. The "metalink:copyright" Element . . . . . . . . . . . 14 83 4.2.2. The "metalink:description" Element . . . . . . . . . . 14 84 4.2.3. The "metalink:generator" Element . . . . . . . . . . . 15 85 4.2.4. The "metalink:hash" Element . . . . . . . . . . . . . 15 86 4.2.5. The "metalink:identity" Element . . . . . . . . . . . 16 87 4.2.6. The "metalink:language" Element . . . . . . . . . . . 17 88 4.2.7. The "metalink:license" Element . . . . . . . . . . . . 17 89 4.2.8. The "metalink:logo" Element . . . . . . . . . . . . . 17 90 4.2.9. The "metalink:metaurl" Element . . . . . . . . . . . . 18 91 4.2.10. The "metalink:origin" Element . . . . . . . . . . . . 19 92 4.2.11. The "metalink:os" Element . . . . . . . . . . . . . . 19 93 4.2.12. The "metalink:published" Element . . . . . . . . . . . 19 94 4.2.13. The "metalink:publisher" Element . . . . . . . . . . . 19 95 4.2.14. The "metalink:signature" Element . . . . . . . . . . . 20 96 4.2.15. The "metalink:size" Element . . . . . . . . . . . . . 20 97 4.2.16. The "metalink:type" Element . . . . . . . . . . . . . 21 98 4.2.17. The "metalink:updated" Element . . . . . . . . . . . . 21 99 4.2.18. The "metalink:url" Element . . . . . . . . . . . . . . 21 100 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 22 101 5. Securing Metalink Documents . . . . . . . . . . . . . . . . . 22 102 6. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 22 103 6.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 22 104 6.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 23 105 6.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 23 106 6.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 23 107 6.4.1. Simple Extension Elements . . . . . . . . . . . . . . 23 108 6.4.2. Structured Extension Elements . . . . . . . . . . . . 24 109 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 110 7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 24 111 7.2. application/metalink+xml MIME type . . . . . . . . . . . . 25 112 8. Security Considerations . . . . . . . . . . . . . . . . . . . 25 113 8.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 26 114 8.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 26 115 8.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 26 116 8.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 26 117 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 118 9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 119 9.2. Informative References . . . . . . . . . . . . . . . . . . 28 120 Appendix A. Acknowledgements and Contributors . . . . . . . . . . 28 121 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 29 122 Appendix C. Document History (to be removed by RFC Editor 123 before publication) . . . . . . . . . . . . . . . . . 35 124 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 125 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 39 127 1. Introduction 129 Metalink is an XML-based document format that describes a file or 130 lists of files to be added to a download queue. Lists are composed 131 of a number of files, each with an extensible set of attached 132 metadata. For example, each file can have a description, checksum, 133 and list of URIs that it is available from. 135 The primary use case that Metalink addresses is the description of 136 downloadable content in a format so download agents can act 137 intelligently and recover from common errors with little or no user 138 interaction necessary. These errors can include multiple servers 139 going down and data corrupted in transmission. 141 [[ Discussion of this draft should take place on 142 discuss@apps.ietf.org or the Metalink discussion mailing list located 143 at metalink-discussion@googlegroups.com. To join the list, visit 144 http://groups.google.com/group/metalink-discussion . ]] 146 1.1. Examples 148 A brief, single file Metalink Document: 150 151 152 153 154 155 ftp://ftp.example.com/example.ext 156 http://example.com/example.ext 157 158 http://example.com/example.ext.torrent 159 160 161 162 163 164 A more extensive, single file Metalink Document: 166 167 168 2008-05-15T12:23:23Z 169 170 171 Example 172 1.0 173 en 174 A description of the example file for 175 download. 176 177 80bc95fd391772fa61c91ed68567f0980bb45fd9 178 179 180 181 182 ftp://ftp.example.com/example.ext 183 184 http://example.com/example.ext 185 186 http://example.com/example.ext.torrent 187 188 189 190 191 193 1.2. Namespace and Version 195 The XML Namespaces URI [REC-xml-names] for the XML data format 196 described in this specification is: 198 urn:ietf:params:xml:ns:metalink 200 For convenience, this data format may be referred to as "Metalink", 201 which this specification uses internally. 203 1.3. Notational Conventions 205 This specification describes conformance of Metalink Documents. 206 Additionally, it places some requirements on Metalink Processors. 208 This specification uses the namespace prefix "metalink:" for the 209 Namespace URI identified in Section 1.2, above. Note that the choice 210 of namespace prefix is arbitrary and not semantically significant. 212 Metalink is specified using terms from the XML Infoset 213 [REC-xml-infoset]. However, this specification uses a shorthand for 214 two common terms: the phrase "Information Item" is omitted when 215 naming Element Information Items and Attribute Information Items. 216 Therefore, when this specification uses the term "element," it is 217 referring to an Element Information Item in Infoset terms. Likewise, 218 when it uses the term "attribute," it is referring to an Attribute 219 Information Item. 221 Some sections of this specification are illustrated with fragments of 222 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 223 text of this specification provides the definition of conformance. A 224 complete schema appears in Appendix B. 226 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 227 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 228 document are to be interpreted as described in BCP 14, [RFC2119], as 229 scoped to those conformance targets. 231 2. Metalink Documents 233 This specification describes Metalink Documents. 235 A Metalink Document describes a file or group of files, how to access 236 them, and metadata that identifies them. Its root is the metalink: 237 metalink element. 239 namespace metalink = "urn:ietf:params:xml:ns:metalink" 240 start = metalinkMetalink 242 Metalink Documents are specified in terms of the XML Information Set, 243 serialized as XML 1.0 [REC-xml] and identified with the "application/ 244 metalink+xml" media type. 246 Metalink Documents MUST be well-formed XML. This specification does 247 not define a DTD for Metalink Documents, and hence does not require 248 them to be valid (in the sense used by XML). 250 Metalink allows the use of IRIs [RFC3987]. Every URI [RFC3986] is 251 also an IRI, so a URI may be used wherever below an IRI is named. 252 There is one special consideration: when an IRI that is not also a 253 URI is given for dereferencing, it MUST be mapped to a URI using the 254 steps in Section 3.1 of [RFC3987]. 256 Any element defined by this specification MAY have an xml:base 257 attribute [REC-xmlbase]. When xml:base is used in an Metalink 258 Document, it serves the function described in Section 5.1.1 of 260 [RFC3986], establishing the base URI (or IRI) for resolving any 261 relative references found within the effective scope of the xml:base 262 attribute. 264 Any element defined by this specification MAY have an xml:lang 265 attribute, whose content indicates the natural language for the 266 element and its descendents. The language context is only 267 significant for elements and attributes declared to be "Language- 268 Sensitive" by this specification. Requirements regarding the content 269 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 270 Section 2.12. 272 metalinkCommonAttributes = 273 attribute xml:base { metalinkUri }?, 274 attribute xml:lang { metalinkLanguageTag }?, 275 undefinedAttribute* 277 Metalink is an extensible format. See Section 6 of this document for 278 a full description of how Metalink Documents can be extended. 280 3. Common Metalink Constructs 282 Many of Metalink's elements share a few common structures. This 283 section defines those structures and their requirements for 284 convenient reference by the appropriate element definitions. 286 When an element is identified as being a particular kind of 287 construct, it inherits the corresponding requirements from that 288 construct's definition in this section. 290 Note that there MUST NOT be any white space in a Date construct or in 291 any IRI. Some XML-emitting implementations erroneously insert white 292 space around values by default, and such implementations will emit 293 invalid Metalink Documents. 295 3.1. Text Constructs 297 A Text construct contains human-readable text, usually in small 298 quantities. The content of Text constructs is Language-Sensitive. 300 metalinkTextConstruct = 301 metalinkCommonAttributes, 302 text 304 3.1.1. Text 306 Example metalink:description with text content: 308 ... 309 310 A description of the example file for download. 311 312 ... 314 The content of the Text construct MUST NOT contain child elements. 315 Such text is intended to be presented to humans in a readable 316 fashion. Thus, white space could be collapsed (including line 317 breaks) and text could be displayed using typographic techniques such 318 as justification and proportional fonts. 320 3.2. Date Constructs 322 A Date construct is an element whose content MUST conform to the 323 "date-time" production in [RFC3339]. In addition, an uppercase "T" 324 character MUST be used to separate date and time, and an uppercase 325 "Z" character MUST be present in the absence of a numeric time zone 326 offset. 328 metalinkDateConstruct = 329 metalinkCommonAttributes, 330 xsd:dateTime 332 Such date values happen to be compatible with the following 333 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 334 [W3C.REC-xmlschema-2-20041028]. 336 Example Date constructs: 338 2008-12-13T18:30:02Z 339 2008-12-13T18:30:02.25Z 340 2008-12-13T18:30:02+01:00 341 2008-12-13T18:30:02.25+01:00 343 Date values SHOULD be as accurate as possible. For example, it would 344 be generally inappropriate for a publishing system to apply the same 345 timestamp to several Metalink Documents that were published during 346 the course of a single day. 348 4. Metalink Element Definitions 349 4.1. Container Elements 351 4.1.1. The "metalink:metalink" Element 353 The "metalink:metalink" element is the document (i.e., top-level) 354 element of a Metalink Document, acting as a container for metadata 355 and data associated with the listed files. It contains one 356 "metalink:files" element whose element children consist of metadata 357 elements followed by one or more metalink:file child elements. 359 metalinkMetalink = 360 element metalink:metalink { 361 metalinkCommonAttributes, 362 (metalinkFiles 363 & metalinkGenerator? 364 & metalinkOrigin? 365 & metalinkPublished? 366 & metalinkType? 367 & metalinkUpdated? 368 & extensionElement*) 369 } 371 The following child elements are defined by this specification (note 372 that the presence of some of these elements is required): 374 o metalink:metalink elements MUST contain exactly one metalink:files 375 element. 376 o metalink:metalink elements MAY contain exactly one metalink: 377 generator element. 378 o metalink:metalink elements SHOULD contain exactly one metalink: 379 origin element. 380 o metalink:metalink elements MAY contain exactly one metalink: 381 published element. 382 o metalink:metalink elements MAY contain exactly one metalink:type 383 element. 384 o If metalink:type is "dynamic", metalink:metalink elements MAY 385 contain exactly one metalink:updated element. 387 4.1.1.1. Providing Textual Content 389 Experience teaches that downloads providing textual content are in 390 general more useful than those that do not. Some applications (one 391 example is full-text indexers) require a minimum amount of text to 392 function reliably and predictably. Metalink publishers should be 393 aware of these issues. It is advisable that each metalink:file 394 element contain a non-empty metalink:description element, a non-empty 395 metalink:identity element when that element is present, and a non- 396 empty metalink:version element, and a non-empty metalink:publisher 397 element. However, the absence of metalink:description is not an 398 error, and Metalink Processors MUST NOT fail to function correctly as 399 a consequence of such an absence. 401 4.1.2. The "metalink:files" Element 403 The "metalink:files" element acts as a container for metadata and 404 data associated with the listed files. It contains one or more 405 metalink:file child elements. Certain elements can be listed either 406 under metalink:files or metalink:file. If under metalink:files, they 407 apply to all files listed in each metalink:file. If under metalink: 408 file, then they apply to just that specific file. If an element is 409 listed both under metalink:files and metalink:file, then the element 410 under metalink:file has precedence and the metalink:files element 411 does not apply to that particular file. 413 metalinkFiles = 414 element metalink:files { 415 metalinkCommonAttributes, 416 (metalinkCopyright? 417 & metalinkDescription? 418 & metalinkFile+ 419 & metalinkIdentity? 420 & metalinkLanguage? 421 & metalinkLicense? 422 & metalinkLogo? 423 & metalinkOS? 424 & metalinkPublisher? 425 & metalinkVersion? 426 & extensionElement*) 427 } 429 The following child elements are defined by this specification (note 430 that the presence of some of these elements is required): 432 o metalink:files elements MAY contain exactly one metalink:copyright 433 element. 434 o metalink:files elements MAY contain exactly one metalink: 435 description element. 436 o metalink:files elements MUST contain one or more metalink:file 437 elements. 438 o metalink:files elements MAY contain exactly one metalink:identity 439 element. 440 o metalink:files elements MAY contain exactly one metalink:language 441 element. 442 o metalink:files elements MAY contain exactly one metalink:license 443 element. 445 o metalink:files elements MAY contain exactly one metalink:logo 446 element. 447 o metalink:files elements MAY contain exactly one metalink:os 448 element. 449 o metalink:files elements MAY contain exactly one metalink:publisher 450 element. 451 o metalink:files elements MAY contain exactly one metalink:version 452 element. 454 4.1.3. The "metalink:file" Element 456 The "metalink:file" element represents an individual file, acting as 457 a container for metadata and data associated with the file. 459 metalinkFile = 460 element metalink:file { 461 metalinkCommonAttributes, 462 attribute name { text }, 463 (metalinkCopyright? 464 & metalinkDescription? 465 & metalinkIdentity? 466 & metalinkLanguage? 467 & metalinkLicense? 468 & metalinkLogo? 469 & metalinkOS? 470 & metalinkPublisher? 471 & metalinkResources 472 & metalinkSize? 473 & metalinkVerification? 474 & metalinkVersion? 475 & extensionElement*) 476 } 478 This specification assigns no significance to the order of metalink: 479 file elements. 481 The following child elements are defined by this specification (note 482 that it requires the presence of some of these elements): 484 o metalink:file elements MAY contain exactly one metalink:copyright 485 element. 486 o metalink:file elements MAY contain exactly one metalink: 487 description element. 488 o metalink:file elements MAY contain exactly one metalink:identity 489 element. 490 o metalink:file elements MAY contain exactly one metalink:language 491 element. 493 o metalink:file elements MAY contain exactly one metalink:license 494 element. 495 o metalink:file elements MAY contain exactly one metalink:logo 496 element. 497 o metalink:file elements MAY contain exactly one metalink:os 498 element. 499 o metalink:file elements MAY contain exactly one metalink:publisher 500 element. 501 o metalink:file elements MUST contain exactly one metalink:resources 502 element. 503 o metalink:file elements SHOULD contain exactly one metalink:size 504 element. 505 o metalink:file elements SHOULD contain exactly one metalink: 506 verification element. 507 o metalink:file elements MAY contain exactly one metalink:version 508 element. 510 4.1.3.1. The "name" Attribute 512 metalink:file elements MUST have a "name" attribute, which contains 513 the filename of the file to be downloaded. 515 Directory information can also be contained in a "path/file" format 516 only, as in: 518 520 In this example, a subdirectory "debian-amd64/sarge/" will be created 521 and a file named "Contents-amd64.gz" will be created inside it. The 522 path MUST NOT contain any directory traversal directives or 523 information. The path MUST be relative. The path MUST NOT begin 524 with a "/", "./" or "../", contain "/../", or end with "/..". 526 4.1.4. The "metalink:resources" Element 528 The "metalink:resources" element acts as a container for metadata and 529 data associated with the listed files. It contains one or more 530 metalink:url child elements. It can also contain one or more 531 metalink:metaurl child elements. 533 All elements contained in each metalink:resources element SHOULD lead 534 to identical files. That is, each metalink:url element should be an 535 alternative location for the same file and each metalink:metaurl 536 element should provide metadata to retrieve the same file in another 537 way, such as a peer to peer network. 539 metalinkResources = 540 element metalink:resources { 541 metalinkCommonAttributes, 542 (metalinkMetaURL* 543 & metalinkURL* 544 & extensionElement*) 545 } 547 This specification assigns no significance to the order of metalink: 548 url or metalink:metaurl elements. Significance is determined by the 549 value of the "preference" attribute of the metalink:url or metalink: 550 metaurl elements. 552 The following child elements are defined by this specification (note 553 that the presence of some of these elements is required): 555 o metalink:resources elements MUST contain at least one metalink:url 556 element or at least one metalink:metaurl element. Typically, 557 metalink:resources element contains more than one metalink:url 558 element to provide multiple download sources. 560 4.1.5. The "metalink:verification" Element 562 The "metalink:verification" element acts as a container for metadata 563 and data associated with verifying the listed files. This 564 information is in the form of checksums and digital signatures. 565 Checksums are used to verify the integrity of a complete file or 566 portion of a file to determine if the files have been transferred 567 without any errors. Digital signatures verify that a file is from 568 the entity that has signed it. 570 metalinkVerification = 571 element metalink:verification { 572 metalinkCommonAttributes, 573 (metalinkHash* 574 & metalinkPieces* 575 & metalinkSignature? 576 & extensionElement*) 577 } 579 The following child elements are defined by this specification: 581 o metalink:verification elements MAY contain one or more metalink: 582 hash elements. 583 o metalink:verification elements MAY contain one or more metalink: 584 pieces elements. 586 o metalink:verification elements MAY contain one or more metalink: 587 signature elements. 589 4.1.6. The "metalink:pieces" Element 591 The "metalink:pieces" element acts as a container for metadata and 592 data associated with verifying the listed files. This information is 593 in the form of checksums for a portion of a file. 595 metalinkPieces = 596 element metalink:pieces { 597 attribute length { xsd:integer }, 598 attribute type { text }, 599 metalinkHash+ 600 } 602 4.1.6.1. The "type" Attribute 604 metalink:pieces elements MUST have a "type" attribute. 606 The IANA registry named "Hash Function Textual Names" defines values 607 for hash types. If a Metalink Document contains verification 608 information, it SHOULD include "sha-1" which is SHA1, as specified in 609 [RFC3174]. It MAY also include other verification algorithms. 611 4.1.6.2. The "length" Attribute 613 metalink:pieces elements MUST have a "length" attribute, which is an 614 integer that describes the length of the piece of the file in octets. 616 4.2. Metadata Elements 618 4.2.1. The "metalink:copyright" Element 620 The "metalink:copyright" element is a Text construct that conveys a 621 human-readable copyright for a file. 623 metalinkCopyright = 624 element metalink:copyright { 625 metalinkTextConstruct 626 } 628 4.2.2. The "metalink:description" Element 630 The "metalink:description" element is a Text construct that conveys a 631 human-readable description for a file. 633 metalinkDescription = 634 element metalink:description { 635 metalinkTextConstruct 636 } 638 4.2.3. The "metalink:generator" Element 640 The "metalink:generator" element's content identifies the generating 641 agent name and version, separated by a "/", used to generate a 642 Metalink Document, for debugging and other purposes. 644 metalinkGenerator = 645 element metalink:generator { 646 metalinkTextConstruct 647 } 649 The content of this element, when present, MUST be a string that is a 650 human-readable name and version, separated by a "/", for the 651 generating agent. For example, "MirrorBrain/2.8.1", where 652 "MirrorBrain" is the name and "2.8.1" is the version. Entities such 653 as "&" and "<" represent their corresponding characters ("&" 654 and "<" respectively), not markup. 656 4.2.4. The "metalink:hash" Element 658 The "metalink:hash" element is a Text construct that conveys a hash 659 for a file. All hashes are encoded in lowercase hexadecimal format. 660 metalink:hash elements MUST have a "type" attribute or a "piece" 661 attribute. 663 metalinkHash = 664 element metalink:hash { 665 attribute piece { xsd:integer }?, 666 attribute type { text }?, 667 text 668 } 670 Metalinks can contain one or multiples hashes of a complete file, for 671 example both SHA-1 and SHA-256. metalink:hash elements with a "type" 672 attribute contain a hash of the whole file. 674 ... 675 676 a97fcf6ba9358f8a6f62beee4421863d3e52b080 677 fc87941af7fd7f03e53b34af393f4c14923d74 678 825f51116ff591336af4880227 679 680 ... 682 Metalinks can also contain hashes for individual pieces of a file. 683 metalink:hash elements with a "piece" attribute contain a hash for 684 that specific piece or chunk of the file, and are of the same hash 685 type as the metalink:pieces element they are contained in. 687 ... 688 689 a97fcf6ba9358f8a6f62beee4421863d3e52b080 690 fc87941af7fd7f03e53b34af393f4c14923d74 691 825f51116ff591336af4880227 692 693 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 694 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 695 3e84219096435c34e092b17b70a011771c52d87a 696 67183e4c3ab892d3ebe8326b7d79eb62d077f487 697 698 699 ... 701 4.2.4.1. The "type" Attribute 703 metalink:hash elements MUST have a "type" attribute, but only when 704 they are a sub element of metalink:verification. The IANA registry 705 named "Hash Function Textual Names" defines values for hash types. 706 If a Metalink Document contains verification information, it SHOULD 707 include "sha-1" which is SHA1, as specified in [RFC3174]. It MAY 708 also include other verification algorithms. 710 4.2.4.2. The "piece" Attribute 712 metalink:hash elements MUST have a "piece" attribute, but only when 713 they are a sub element of metalink:pieces. The value of "piece" 714 starts at "0" and increases, depending on the "length" attribute of 715 metalink:pieces and the size of the file. Depending on the size of a 716 file, the last piece may not be the same size as the others. 718 4.2.5. The "metalink:identity" Element 720 The "metalink:identity" element is a Text construct that conveys a 721 human-readable identity for a file. The identity of OpenOffice.org 722 3.0 would be "OpenOffice.org". 724 metalinkIdentity = 725 element metalink:identity { 726 metalinkTextConstruct 727 } 729 4.2.6. The "metalink:language" Element 731 The "metalink:language" element is a Text construct that conveys a 732 code for the language of a file, per [RFC4646]. 734 metalinkLanguage = 735 element metalink:language { 736 metalinkTextConstruct 737 } 739 4.2.7. The "metalink:license" Element 741 The "metalink:license" element is a Text construct that conveys a 742 human-readable license name for a file. 744 metalinkLicense = 745 element metalink:license { 746 metalinkCommonAttributes, 747 attribute uri { metalinkUri }?, 748 attribute name { text }? 749 } 751 The metalink:license element MAY have a "uri" attribute whose value 752 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 753 URI (mapped from an IRI, if necessary) SHOULD produce a 754 representation that is relevant to that agent. 756 The metalink:license element MAY have a "name" attribute that 757 indicates the name of the license. 759 4.2.8. The "metalink:logo" Element 761 The "metalink:logo" element's content is an IRI reference [RFC3987] 762 that identifies an image that provides visual identification for a 763 file. 765 metalinkLogo = 766 element metalink:logo { 767 metalinkCommonAttributes, 768 (metalinkUri) 769 } 771 The image SHOULD have an aspect ratio of one (horizontal) to one 772 (vertical) and SHOULD be suitable for presentation at a small size. 774 4.2.9. The "metalink:metaurl" Element 776 The "metalink:metaurl" element contains the IRI of metadata about a 777 resource to download. For example, this could be the IRI of a 778 BitTorrent .torrent file or a Metalink Document. Note that the 779 information in the metalink:verification element does not apply to 780 these files, but to the files that are described by them. 782 metalinkMetaURL = 783 element metalink:metaurl { 784 metalinkCommonAttributes, 785 attribute preference { xsd:integer }?, 786 attribute type { text }, 787 attribute name { text }?, 788 metalinkUri 789 } 791 4.2.9.1. The "preference" Attribute 793 metalink:metaurl elements MAY have a preference attribute, whose 794 value MUST be a number from 1 to 100 for priority, with 100 used 795 first and 1 used last. Multiple metalink:metaurl elements can have 796 the same preference, i.e. three BitTorrent .torrent files could have 797 preference="100". See also the "preference" attribute of the 798 metalink:url element. 800 4.2.9.2. The "type" Attribute 802 metalink:metaurl elements MUST have a "type" attribute that indicates 803 the MIME type of the metadata available at the IRI. In the case of 804 BitTorrent as specified in [BITTORRENT], the value "torrent" is 805 required. Types without "/" are reserved. Currently, "torrent" is 806 the only reserved value. 808 4.2.9.3. The "name" Attribute 810 metalink:metaurl elements MAY have a "name" attribute that indicates 811 a specific file in a BitTorrent .torrent file or a Metalink Document 812 that describes multiple files. 814 Directory information can also be contained in a "path/file" format 815 only, as in: 817 819 In this example, a file named "Contents-amd64.gz" is indicated, in a 820 "debian-amd64/sarge/" subdirectory. The path MUST NOT contain any 821 directory traversal directives or information. The path MUST be 822 relative. The path MUST NOT begin with a "/", "./" or "../", contain 823 "/../", or end with "/..". 825 4.2.10. The "metalink:origin" Element 827 The "metalink:origin" element is an IRI where the Metalink Document 828 was originally published. If metalink:type is "dynamic", then 829 updated versions of the Metalink can be found at this IRI. 831 metalinkOrigin = 832 element metalink:origin { 833 metalinkCommonAttributes, 834 (metalinkUri) 835 } 837 4.2.11. The "metalink:os" Element 839 The "metalink:os" element is a Text construct that conveys a human- 840 readable Operating System for a file. The IANA registry named 841 "Operating System Names" defines values for OS types. 843 metalinkOS = 844 element metalink:os { 845 metalinkTextConstruct 846 } 848 4.2.12. The "metalink:published" Element 850 The "metalink:published" element is a Date construct indicating an 851 instant in time associated with an event early in the life cycle of 852 the entry. 854 metalinkPublished = 855 element metalink:published { 856 metalinkDateConstruct 857 } 859 Typically, metalink:published will be associated with the initial 860 creation or first availability of the resource. 862 4.2.13. The "metalink:publisher" Element 864 The "metalink:publisher" element indicates a group or other entity 865 which has published the file described in the Metalink Document. 867 metalinkPublisher = 868 element metalink:publisher { 869 metalinkCommonAttributes, 870 attribute uri { metalinkUri }?, 871 attribute name { text }? 872 } 874 The metalink:publisher element MAY have a "uri" attribute whose value 875 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 876 URI (mapped from an IRI, if necessary) SHOULD produce a 877 representation that is relevant to that agent. 879 The metalink:publisher element MAY have a "name" attribute that 880 indicates the name of the publisher. 882 4.2.14. The "metalink:signature" Element 884 The "metalink:signature" element is a Text construct that conveys a 885 digital signature for a file described in a Metalink Document. 887 metalinkSignature = 888 element metalink:signature { 889 attribute type { "pgp" }, 890 metalinkTextConstruct 891 } 893 4.2.14.1. The "type" Attribute 895 metalink:signature elements MUST have a "type" attribute. The 896 initial value of "type" is the string that is non-empty and matches 897 "pgp". It may be useful to extend Metalink documents with new types 898 of digital signatures, so unknown types are allowed. 900 4.2.15. The "metalink:size" Element 902 The "metalink:size" element indicates the length of the linked 903 content in octets; it is a hint about the content length of the 904 representation returned when the IRI is mapped to a URI and 905 dereferenced. 907 metalinkSize = 908 element metalink:size { 909 metalinkTextConstruct 910 } 912 4.2.16. The "metalink:type" Element 914 The "metalink:type" element is a Text construct that describes 915 whether the IRI from "metalink:origin" in a Metalink will contain 916 dynamic updated Metalinks or static content that is not updated. 918 metalinkType = 919 element metalink:type { 920 "static" | "dynamic" 921 } 923 4.2.17. The "metalink:updated" Element 925 The "metalink:updated" element is a Date construct indicating the 926 most recent instant in time when a Metalink was modified in a way the 927 publisher considers significant. Therefore, not all modifications 928 necessarily result in a changed metalink:updated value. 930 metalinkUpdated = 931 element metalink:updated { 932 metalinkDateConstruct 933 } 935 Publishers MAY change the value of this element over time. 937 4.2.18. The "metalink:url" Element 939 The "metalink:url" element contains the IRI of a file. Most Metalink 940 Documents will contain multiple metalink:url elements, and each one 941 SHOULD be a valid alternative to download the same file. 943 metalinkURL = 944 element metalink:url { 945 metalinkCommonAttributes, 946 attribute location { xsd:string { 947 minLength = "2" maxLength="2"} 948 }?, 949 attribute preference { xsd:integer }?, 950 metalinkUri 951 } 953 4.2.18.1. The "preference" Attribute 955 metalink:url elements MAY have a preference attribute, whose value 956 MUST be a number from 1 to 100 for priority, with 100 used first and 957 1 used last. Multiple metalink:url elements can have the same 958 preference, i.e. ten mirrors could have preference="100". 960 4.2.18.2. The "location" Attribute 962 metalink:url elements MAY have a "location" attribute, which is a 963 [ISO3166-1] alpha-2 two letter country code for the geographical 964 location of the physical server an IRI is used to access. 966 4.2.19. The "metalink:version" Element 968 The "metalink:version" element is a Text construct that conveys a 969 human-readable version for a file. The version of OpenOffice.org 3.0 970 would be "3.0". 972 metalinkVersion = 973 element metalink:version { 974 metalinkTextConstruct 975 } 977 5. Securing Metalink Documents 979 Because Metalink is an XML-based format, existing XML security 980 mechanisms can be used to secure its content. 982 Producers of Metalinks may have sound reasons for signing otherwise- 983 unprotected content. For example, a merchant might digitally sign a 984 Metalink that lists a file download to verify its origin. Other 985 merchants may wish to sign and encrypt Metalinks that list digital 986 songs that have been purchased. Of course, many other examples are 987 conceivable as well. 989 The algorithm requirements in this section pertain to the Metalink 990 Processor. They require that a recipient, at a minimum, be able to 991 handle messages that use the specified cryptographic algorithms. 992 These requirements do not limit the algorithms that the sender can 993 choose. 995 Metalink Processors that verify signed Metalink Documents MUST at 996 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 998 6. Extending Metalink 1000 6.1. Extensions from Non-Metalink Vocabularies 1002 This specification describes Metalink's XML markup vocabulary. 1003 Markup from other vocabularies ("foreign markup") can be used in an 1004 Metalink Document. 1006 6.2. Extensions to the Metalink Vocabulary 1008 The Metalink namespace is reserved for future forward-compatible 1009 revisions of Metalink. Future versions of this specification could 1010 add new elements and attributes to the Metalink markup vocabulary. 1011 Software written to conform to this version of the specification will 1012 not be able to process such markup correctly and, in fact, will not 1013 be able to distinguish it from markup error. For the purposes of 1014 this discussion, unrecognized markup from the Metalink vocabulary 1015 will be considered "foreign markup". 1017 6.3. Processing Foreign Markup 1019 Metalink Processors that encounter foreign markup in a location that 1020 is legal according to this specification MUST NOT stop processing or 1021 signal an error. It might be the case that the Metalink Processor is 1022 able to process the foreign markup correctly and does so. Otherwise, 1023 such markup is termed "unknown foreign markup". 1025 When unknown foreign markup is encountered as a child of metalink: 1026 file, metalink:metalink, Metalink Processors MAY bypass the markup 1027 and any textual content and MUST NOT change their behavior as a 1028 result of the markup's presence. 1030 When unknown foreign markup is encountered in a Text Construct, 1031 software SHOULD ignore the markup and process any text content of 1032 foreign elements as though the surrounding markup were not present. 1034 6.4. Extension Elements 1036 Metalink allows foreign markup anywhere in an Metalink document, 1037 except where it is explicitly forbidden. Child elements of metalink: 1038 file and metalink:metalink are considered Metadata elements and are 1039 described below. Child elements of Person constructs are considered 1040 to apply to the construct. The role of other foreign markup is 1041 undefined by this specification. 1043 6.4.1. Simple Extension Elements 1045 A Simple Extension element MUST NOT have any attributes or child 1046 elements. The element MAY contain character data or be empty. 1047 Simple Extension elements are not Language-Sensitive. 1049 simpleExtensionElement = 1050 element * - metalink:* { 1051 text 1052 } 1054 The element can be interpreted as a simple property (or name/value 1055 pair) of the parent element that encloses it. The pair consisting of 1056 the namespace-URI of the element and the local name of the element 1057 can be interpreted as the name of the property. The character data 1058 content of the element can be interpreted as the value of the 1059 property. If the element is empty, then the property value can be 1060 interpreted as an empty string. 1062 6.4.2. Structured Extension Elements 1064 The root element of a Structured Extension element MUST have at least 1065 one attribute or child element. It MAY have attributes, it MAY 1066 contain well-formed XML content (including character data), or it MAY 1067 be empty. Structured Extension elements are Language-Sensitive. 1069 structuredExtensionElement = 1070 element * - metalink:* { 1071 (attribute * { text }+, 1072 (text|anyElement)*) 1073 | (attribute * { text }*, 1074 (text?, anyElement+, (text|anyElement)*)) 1075 } 1077 The structure of a Structured Extension element, including the order 1078 of its child elements, could be significant. 1080 This specification does not provide an interpretation of a Structured 1081 Extension element. The syntax of the XML contained in the element 1082 (and an interpretation of how the element relates to its containing 1083 element) is defined by the specification of the Metalink extension. 1085 7. IANA Considerations 1087 7.1. XML Namespace Registration 1089 This document makes use of the XML registry specified in [RFC3688]. 1090 Accordingly, IANA has made the following registration: 1092 Registration request for the Metalink namespace: 1094 URI: urn:ietf:params:xml:ns:metalink 1096 Registrant Contact: See the "Author's Address" section of this 1097 document. 1099 XML: None. Namespace URIs do not represent an XML specification. 1101 7.2. application/metalink+xml MIME type 1103 A Metalink Document, when serialized as XML 1.0, can be identified 1104 with the following media type: 1106 MIME media type name: application 1107 MIME subtype name: metalink+xml 1108 Mandatory parameters: None. 1109 Optional parameters: 1110 "charset": This parameter has semantics identical to the charset 1111 parameter of the "application/xml" media type as specified in 1112 [RFC3023]. 1113 Encoding considerations: Identical to those of "application/xml" as 1114 described in [RFC3023], Section 3.2. 1115 Security considerations: As defined in this specification. 1116 In addition, as this media type uses the "+xml" convention, it 1117 shares the same security considerations as described in [RFC3023], 1118 Section 10. 1119 Interoperability considerations: There are no known interoperability 1120 issues. 1121 Published specification: This specification. 1122 Applications that use this media type: No known applications 1123 currently use this media type. 1125 Additional information: 1127 Magic number(s): As specified for "application/xml" in [RFC3023], 1128 Section 3.2. 1129 File extension: .metalink 1130 Fragment identifiers: As specified for "application/xml" in 1131 [RFC3023], Section 5. 1132 Base URI: As specified in [RFC3023], Section 6. 1133 Macintosh File Type code: TEXT 1134 Person and email address to contact for further information: Anthony 1135 Bryan 1136 Intended usage: COMMON 1137 Author/Change controller: IESG 1139 8. Security Considerations 1141 Publishers are encouraged to offer Metalink documents via 1142 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1143 are also encouraged to include digital signatures of the files within 1144 the Metalink Documents if they are available. 1146 8.1. URIs and IRIs 1148 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1149 and Section 8 of [RFC3987] for security considerations related to 1150 their handling and use. 1152 8.2. Spoofing 1154 There is potential for spoofing attacks where the attacker publishes 1155 Metalinks with false information. Malicious publishers might create 1156 Metalink Documents containing inaccurate information anywhere in the 1157 document. At best, this could deceive unaware downloaders that they 1158 are downloading a malicious or worthless file. At worst, malicious 1159 publishers could attempt a distributed denial of service attack by 1160 inserting unrelated IRIs into Metalink Documents. 1162 8.3. Cryptographic Hashes 1164 Currently, some of the hash types defined in the IANA registry named 1165 "Hash Function Textual Names" are considered insecure. These include 1166 the whole Message Digest family of algorithms which are not suitable 1167 for cryptographically strong verification. Malicious people could 1168 provide files that appear to be identical to another file because of 1169 a collision, i.e. the weak cryptographic hashes of the intended file 1170 and a substituted malicious file could match. 1172 If a Metalink Document contains verification information, it SHOULD 1173 implement "sha-1" which is SHA1, as specified in [RFC3174]. It MAY 1174 also include other verification algorithms. 1176 8.4. Signing 1178 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1179 subject to the security considerations implied by its use. This 1180 addresses the issue of spoofing. 1182 Digital signatures provide authentication, message integrity, and 1183 non-repudiation with proof of origin. 1185 9. References 1187 9.1. Normative References 1189 [BITTORRENT] 1190 Cohen, B., "The BitTorrent Protocol Specification", 1191 BITTORRENT 11031, February 2008, 1192 . 1194 [ISO3166-1] 1195 International Organization for Standardization, "ISO 3166- 1196 1:2006. Codes for the representation of names of 1197 countries and their subdivisions -- Part 1: Country 1198 codes", November 2006. 1200 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1201 and E. Maler, "Extensible Markup Language (XML) 1.0 1202 (Fourth Edition)", World Wide Web Consortium 1203 Recommendation REC-xml-20060816, August 2006, 1204 . 1206 [REC-xml-infoset] 1207 Cowan, J. and R. Tobin, "XML Information Set (Second 1208 Edition)", World Wide Web Consortium Recommendation REC- 1209 xml-infoset-20040204, February 2004, 1210 . 1212 [REC-xml-names] 1213 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1214 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1215 Consortium Recommendation REC-xml-names-20060816, 1216 August 2006, 1217 . 1219 [REC-xmlbase] 1220 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1221 June 2001, 1222 . 1224 [REC-xmldsig-core] 1225 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1226 Syntax and Processing (Second Edition)", World Wide Web 1227 Consortium Recommendation REC-xmldsig-core-20080610, 1228 June 2008, 1229 . 1231 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1232 Requirement Levels", BCP 14, RFC 2119, March 1997. 1234 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1236 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1237 Types", RFC 3023, January 2001. 1239 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1240 (SHA1)", RFC 3174, September 2001. 1242 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1243 Timestamps", RFC 3339, July 2002. 1245 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1246 January 2004. 1248 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1249 Resource Identifier (URI): Generic Syntax", STD 66, 1250 RFC 3986, January 2005. 1252 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1253 Identifiers (IRIs)", RFC 3987, January 2005. 1255 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 1256 Languages", BCP 47, RFC 4646, September 2006. 1258 9.2. Informative References 1260 [ISO.8601.1988] 1261 International Organization for Standardization, "Data 1262 elements and interchange formats - Information interchange 1263 - Representation of dates and times", ISO Standard 8601, 1264 June 1988. 1266 [RELAX-NG] 1267 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1271 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1272 Format", RFC 4287, December 2005. 1274 [W3C.NOTE-datetime-19980827] 1275 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1276 NOTE NOTE-datetime-19980827, August 1998, 1277 . 1279 [W3C.REC-xmlschema-2-20041028] 1280 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1281 Second Edition", W3C REC REC-xmlschema-2-20041028, 1282 October 2004, 1283 . 1285 Appendix A. Acknowledgements and Contributors 1287 The layout and content of this document relies heavily on work 1288 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1290 The following people contributed to preliminary versions of this 1291 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1292 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1293 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1294 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1295 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1296 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1297 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1298 Hoffman, Felix Sasaki, Eran Hammer-Lahav, and Mark Nottingham. The 1299 content and concepts within are a product of the Metalink community. 1301 The Metalink community has dozens of contributors who proposed ideas 1302 and wording for this document, or contributed to the evolution of 1303 Metalink, including: 1305 Nicolas Alvarez, Patrick Ruckstuhl, Sebastien Willemijns, Micah 1306 Cowan, Yazsoft, Lukas Appelhans, KGet developers, FDM Team, Orbit 1307 Team, Arne Babenhauserheide, Mathias Berchtold, Xienzhenyu and 1308 TheWorld Browser Team, Xi Software, Bridget and Ethan Fletcher, Ruben 1309 Kerkhof, Agostino Russo, Salvatore and Robin Musumeci, Steve and 1310 Rachel Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave Winquist, 1311 Bob Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve Kleisath, 1312 Chad Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, Derick 1313 Cordoba, Ryan Alexander, John Sowder, Sandra Amisano, Tom Mainville, 1314 Janie Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus Hofmann, 1315 Dan Connolly, Tim Berners-Lee, Louis Suarez-Potts, Ross Smith, Jeff 1316 Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan Svedberg, Dedric 1317 Carter, James Antill, Debi Goulding, the Anthony Family, the Bryan 1318 Family, Juanita Anthony and Zimmy Bryan. 1320 Appendix B. RELAX NG Compact Schema 1322 This appendix is informative. 1324 The Relax NG schema explicitly excludes elements in the Metalink 1325 namespace that are not defined in this revision of the specification. 1326 Requirements for Metalink Processors encountering such markup are 1327 given in Sections 6.2 and 6.3. 1329 # -*- rnc -*- 1330 # RELAX NG Compact Syntax Grammar for the 1331 # Metalink Format Specification Version 3 1333 namespace local = "" 1334 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1335 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1336 # Common attributes 1338 metalinkCommonAttributes = 1339 attribute xml:base { metalinkUri }?, 1340 attribute xml:lang { metalinkLanguageTag }?, 1341 undefinedAttribute* 1343 # Text Constructs 1345 metalinkTextConstruct = 1346 metalinkCommonAttributes, 1347 text 1349 # Date Construct 1351 metalinkDateConstruct = 1352 metalinkCommonAttributes, 1353 xsd:dateTime 1355 start = metalinkMetalink 1357 metalinkMetalink = 1358 element metalink:metalink { 1359 metalinkCommonAttributes, 1360 (metalinkFiles 1361 & metalinkGenerator? 1362 & metalinkOrigin? 1363 & metalinkPublished? 1364 & metalinkType? 1365 & metalinkUpdated? 1366 & extensionElement*) 1367 } 1369 metalinkFiles = 1370 element metalink:files { 1371 metalinkCommonAttributes, 1372 (metalinkCopyright? 1373 & metalinkDescription? 1374 & metalinkFile+ 1375 & metalinkIdentity? 1376 & metalinkLanguage? 1377 & metalinkLicense? 1378 & metalinkLogo? 1379 & metalinkOS? 1380 & metalinkPublisher? 1381 & metalinkVersion? 1382 & extensionElement*) 1383 } 1385 metalinkFile = 1386 element metalink:file { 1387 metalinkCommonAttributes, 1388 attribute name { text }, 1389 (metalinkCopyright? 1390 & metalinkDescription? 1391 & metalinkIdentity? 1392 & metalinkLanguage? 1393 & metalinkLicense? 1394 & metalinkLogo? 1395 & metalinkOS? 1396 & metalinkPublisher? 1397 & metalinkResources 1398 & metalinkSize? 1399 & metalinkVerification? 1400 & metalinkVersion? 1401 & extensionElement*) 1402 } 1404 metalinkResources = 1405 element metalink:resources { 1406 metalinkCommonAttributes, 1407 (metalinkMetaURL* 1408 & metalinkURL* 1409 & extensionElement*) 1410 } 1412 metalinkVerification = 1413 element metalink:verification { 1414 metalinkCommonAttributes, 1415 (metalinkHash* 1416 & metalinkPieces* 1417 & metalinkSignature? 1418 & extensionElement*) 1419 } 1421 metalinkPieces = 1422 element metalink:pieces { 1423 attribute length { xsd:integer }, 1424 attribute type { text }, 1425 metalinkHash+ 1426 } 1428 metalinkCopyright = 1429 element metalink:copyright { 1430 metalinkTextConstruct 1431 } 1433 metalinkDescription = 1434 element metalink:description { 1435 metalinkTextConstruct 1436 } 1438 metalinkGenerator = 1439 element metalink:generator { 1440 metalinkTextConstruct 1441 } 1443 metalinkHash = 1444 element metalink:hash { 1445 attribute piece { xsd:integer }?, 1446 attribute type { text }?, 1447 text 1448 } 1450 metalinkIdentity = 1451 element metalink:identity { 1452 metalinkTextConstruct 1453 } 1455 metalinkLanguage = 1456 element metalink:language { 1457 metalinkTextConstruct 1458 } 1460 metalinkLicense = 1461 element metalink:license { 1462 metalinkCommonAttributes, 1463 attribute uri { metalinkUri }?, 1464 attribute name { text }? 1465 } 1467 metalinkLogo = 1468 element metalink:logo { 1469 metalinkCommonAttributes, 1470 (metalinkUri) 1471 } 1473 metalinkMetaURL = 1474 element metalink:metaurl { 1475 metalinkCommonAttributes, 1476 attribute preference { xsd:integer }?, 1477 attribute type { text }, 1478 attribute name { text }?, 1479 metalinkUri 1480 } 1482 metalinkOrigin = 1483 element metalink:origin { 1484 metalinkCommonAttributes, 1485 (metalinkUri) 1486 } 1488 metalinkOS = 1489 element metalink:os { 1490 metalinkTextConstruct 1491 } 1493 metalinkPublished = 1494 element metalink:published { 1495 metalinkDateConstruct 1496 } 1498 metalinkPublisher = 1499 element metalink:publisher { 1500 metalinkCommonAttributes, 1501 attribute uri { metalinkUri }?, 1502 attribute name { text }? 1503 } 1505 metalinkSignature = 1506 element metalink:signature { 1507 attribute type { "pgp" }, 1508 metalinkTextConstruct 1509 } 1511 metalinkSize = 1512 element metalink:size { 1513 metalinkTextConstruct 1514 } 1516 metalinkType = 1517 element metalink:type { 1518 "static" | "dynamic" 1519 } 1521 metalinkUpdated = 1522 element metalink:updated { 1523 metalinkDateConstruct 1524 } 1526 metalinkURL = 1527 element metalink:url { 1528 metalinkCommonAttributes, 1529 attribute location { xsd:string { 1530 minLength = "2" maxLength="2"} 1531 }?, 1532 attribute preference { xsd:integer }?, 1533 metalinkUri 1534 } 1536 metalinkVersion = 1537 element metalink:version { 1538 metalinkTextConstruct 1539 } 1541 # As defined in RFC 3066 and compatible with RFC 4646 1542 metalinkLanguageTag = xsd:string { 1543 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1544 } 1546 # Unconstrained; it's not entirely clear how IRI fit into 1547 # xsd:anyURI so let's not try to constrain it here 1548 metalinkUri = text 1550 # Simple Extension 1552 simpleExtensionElement = 1553 element * - metalink:* { 1554 text 1555 } 1557 # Structured Extension 1559 structuredExtensionElement = 1560 element * - metalink:* { 1561 (attribute * { text }+, 1562 (text|anyElement)*) 1563 | (attribute * { text }*, 1564 (text?, anyElement+, (text|anyElement)*)) 1565 } 1567 # Other Extensibility 1569 extensionElement = 1570 simpleExtensionElement | structuredExtensionElement 1572 undefinedAttribute = 1573 attribute * - (xml:base | xml:lang | local:*) { text } 1575 undefinedContent = (text|anyForeignElement)* 1577 anyElement = 1578 element * { 1579 (attribute * { text } 1580 | text 1581 | anyElement)* 1582 } 1584 anyForeignElement = 1585 element * - metalink:* { 1586 (attribute * { text } 1587 | text 1588 | anyElement)* 1589 } 1591 # EOF 1593 Appendix C. Document History (to be removed by RFC Editor before 1594 publication) 1596 [[ to be removed by the RFC editor before publication as an RFC. ]] 1598 Updated versions can be found at 1599 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1600 in Subversion at 1601 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1603 Known issues concerning this draft: 1604 o None. 1606 -10 : July 28, 2009. 1607 o Schema fixes. 1608 o Rename metadata element to metaurl, add name attribute to it 1609 similar to file element's name attribute. 1610 o Update REC-xmldsig-core reference to second edition. 1612 -09 : July 11, 2009. 1613 o Replace ISO639-2 references with RFC 4646. 1614 o Add ISO3166-1. 1616 -08 : July 04, 2009. 1617 o Clarifications. 1618 o Remove "uri" and "version" attributes from generator element. 1620 -07 : June 18, 2009. 1621 o This ID describes the Metalink document format/schema. 1622 o Remove "Client Implementation Considerations" section. 1624 o Expand "Known issues" section of Document History. 1626 -06 : March 3, 2009. 1627 o Add authors and this Document History section. 1629 -05 : January 13, 2009. 1630 o Clarifications. 1632 -04 : December 31, 2008. 1633 o New IPR notice as required by IETF. 1634 o Correct "metalink:pieces" Element text. 1635 o Add hash examples. 1636 o Slim down "Securing Metalink Documents" section. 1637 o Recommend at least SHA1. 1639 -03 : September 19, 2008. 1640 o New namespace - urn:ietf:params:xml:ns:metalink 1641 o Use the IANA registry named "Operating System Names" to define 1642 values for OS types. 1643 o Add "Client Implementation Considerations" section, which includes 1644 Content Negotiation. 1646 -02 : September 4, 2008. 1647 o Use the IANA registry named "Hash Function Textual Names" for hash 1648 types. 1649 o metadata Element for listing .torrent, .metalink, etc. 1650 o Remove type attribute for url Element. 1652 -01 : August 28, 2008. 1653 o Clarify directory info in name attribute, hash types, add text for 1654 preference attribute. 1656 -00 : August 23, 2008. 1657 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1658 3.0 specification. 1660 Index 1662 A 1663 application/metalink+xml Media Type 25 1665 C 1666 copyright XML element 14 1668 D 1669 description XML element 14 1671 F 1672 file XML element 11 1673 files XML element 10 1675 G 1676 generator XML element 15 1677 Grammar 1678 metalinkCommonAttributes 7 1679 metalinkCopyright 14 1680 metalinkDateConstruct 8 1681 metalinkDescription 15 1682 metalinkFile 11 1683 metalinkFiles 10 1684 metalinkGenerator 15 1685 metalinkHash 15 1686 metalinkIdentity 16 1687 metalinkLanguage 17 1688 metalinkLicense 17 1689 metalinkLogo 17 1690 metalinkMetalink 9 1691 metalinkOrigin 19 1692 metalinkOS 19 1693 metalinkPieces 14 1694 metalinkPublished 19 1695 metalinkPublisher 20 1696 metalinkResources 13 1697 metalinkSignature 20 1698 metalinkSize 20 1699 metalinkTextConstruct 7 1700 metalinkType 21 1701 metalinkUpdated 21 1702 metalinkURL 18, 21 1703 metalinkVerification 13 1704 metalinkVersion 22 1705 simpleExtensionElement 23 1706 structuredExtensionElement 24 1708 H 1709 hash XML element 15 1711 I 1712 identity XML element 16 1714 L 1715 language XML element 17 1716 license XML element 17 1717 logo XML element 17 1719 M 1720 Media Type 1721 application/metalink+xml 25 1722 metadata XML element 18 1723 metalink XML element 9 1724 metalinkCommonAttributes grammar production 7 1725 metalinkCopyright grammar production 14 1726 metalinkDateConstruct grammar production 8 1727 metalinkDescription grammar production 15 1728 metalinkFile grammar production 11 1729 metalinkFiles grammar production 10 1730 metalinkGenerator grammar production 15 1731 metalinkHash grammar production 15 1732 metalinkIdentity grammar production 16 1733 metalinkLanguage grammar production 17 1734 metalinkLicense grammar production 17 1735 metalinkLogo grammar production 17 1736 metalinkMetalink grammar production 9 1737 metalinkOrigin grammar production 19 1738 metalinkOS grammar production 19 1739 metalinkPieces grammar production 14 1740 metalinkPublished grammar production 19 1741 metalinkPublisher grammar production 20 1742 metalinkResources grammar production 13 1743 metalinkSignature grammar production 20 1744 metalinkSize grammar production 20 1745 metalinkTextConstruct grammar production 7 1746 metalinkType grammar production 21 1747 metalinkUpdated grammar production 21 1748 metalinkURL grammar production 18, 21 1749 metalinkVerification grammar production 13 1750 metalinkVersion grammar production 22 1752 O 1753 origin XML element 19 1754 os XML element 19 1756 P 1757 pieces XML element 14 1758 published XML element 19 1759 publisher XML element 19 1761 R 1762 resources XML element 12 1764 S 1765 signature XML element 20 1766 simpleExtensionElement grammar production 23 1767 size XML element 20 1768 structuredExtensionElement grammar production 24 1770 T 1771 type XML element 21 1773 U 1774 updated XML element 21 1775 url XML element 21 1777 V 1778 verification XML element 13 1779 version XML element 22 1781 X 1782 XML Elements 1783 copyright 14 1784 description 14 1785 entry 11 1786 files 10 1787 generator 15 1788 hash 15 1789 identity 16 1790 language 17 1791 license 17 1792 logo 17 1793 metadata 18 1794 metalink 9 1795 origin 19 1796 os 19 1797 pieces 14 1798 published 19 1799 publisher 19 1800 resources 12 1801 signature 20 1802 size 20 1803 type 21 1804 updated 21 1805 url 21 1806 verification 13 1807 version 22 1809 Authors' Addresses 1811 Anthony Bryan (editor) 1812 Metalinker Project 1814 Email: anthonybryan@gmail.com 1815 URI: http://www.metalinker.org 1817 Tatsuhiro Tsujikawa (editor) 1818 Metalinker Project 1820 Email: tatsuhiro.t@gmail.com 1821 URI: http://aria2.sourceforge.net 1823 Neil McNab (editor) 1824 Metalinker Project 1826 Email: nabber00@gmail.com 1827 URI: http://www.nabber.org 1829 Peter Poeml (editor) 1830 Novell, Inc. 1832 Email: info@mirrorbrain.org 1833 URI: http://www.mirrorbrain.org/