idnits 2.17.1 draft-bryan-metalink-06.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 (March 3, 2009) is 5526 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' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO639-2' -- 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' ** Downref: Normative reference to an Experimental RFC: RFC 2295 ** 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 Summary: 5 errors (**), 0 flaws (~~), 1 warning (==), 11 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: September 4, 2009 Metalinker Project 6 P. Poeml, Ed. 7 Novell, Inc. 8 March 3, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-06 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 September 4, 2009. 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 . . . . . . . . . . . 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 . . . . . . . . . . . . 13 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 . . . . . . . . . . . 14 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:metadata" Element . . . . . . . . . . . 17 91 4.2.10. The "metalink:origin" Element . . . . . . . . . . . . 18 92 4.2.11. The "metalink:os" Element . . . . . . . . . . . . . . 18 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 . . . . . . . . . . . 19 96 4.2.15. The "metalink:size" Element . . . . . . . . . . . . . 20 97 4.2.16. The "metalink:type" Element . . . . . . . . . . . . . 20 98 4.2.17. The "metalink:updated" Element . . . . . . . . . . . . 20 99 4.2.18. The "metalink:url" Element . . . . . . . . . . . . . . 21 100 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 21 101 5. Client Implementation Considerations . . . . . . . . . . . . . 22 102 6. Securing Metalink Documents . . . . . . . . . . . . . . . . . 22 103 7. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 23 104 7.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 23 105 7.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 23 106 7.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 23 107 7.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 23 108 7.4.1. Simple Extension Elements . . . . . . . . . . . . . . 24 109 7.4.2. Structured Extension Elements . . . . . . . . . . . . 24 110 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 111 8.1. XML Namespace Registration . . . . . . . . . . . . . . . . 25 112 8.2. application/metalink+xml MIME type . . . . . . . . . . . . 25 113 9. Security Considerations . . . . . . . . . . . . . . . . . . . 26 114 9.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 26 115 9.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 26 116 9.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 26 117 9.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 26 118 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 119 10.1. Normative References . . . . . . . . . . . . . . . . . . . 27 120 10.2. Informative References . . . . . . . . . . . . . . . . . . 28 121 Appendix A. Acknowledgements and Contributors . . . . . . . . . . 29 122 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 30 123 Appendix C. Document History . . . . . . . . . . . . . . . . . . 33 124 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 125 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 37 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 discuss@apps.ietf.org 142 or the Metalink discussion mailing list located at 143 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 A description of the example file for 174 download. 175 176 80bc95fd391772fa61c91ed68567f0980bb45fd9 177 178 179 180 ftp://ftp.example.com/example.ext 181 http://example.com/example.ext 182 183 http://example.com/example.ext.torrent 184 185 186 187 188 190 1.2. Namespace and Version 192 The XML Namespaces URI [REC-xml-names] for the XML data format 193 described in this specification is: 195 urn:ietf:params:xml:ns:metalink 197 For convenience, this data format may be referred to as "Metalink", 198 which this specification uses internally. 200 1.3. Notational Conventions 202 This specification describes conformance of Metalink Documents. 203 Additionally, it places some requirements on Metalink Processors. 205 This specification uses the namespace prefix "metalink:" for the 206 Namespace URI identified in Section 1.2, above. Note that the choice 207 of namespace prefix is arbitrary and not semantically significant. 209 Metalink is specified using terms from the XML Infoset 210 [REC-xml-infoset]. However, this specification uses a shorthand for 211 two common terms: the phrase "Information Item" is omitted when 212 naming Element Information Items and Attribute Information Items. 213 Therefore, when this specification uses the term "element," it is 214 referring to an Element Information Item in Infoset terms. Likewise, 215 when it uses the term "attribute," it is referring to an Attribute 216 Information Item. 218 Some sections of this specification are illustrated with fragments of 219 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 220 text of this specification provides the definition of conformance. A 221 complete schema appears in Appendix B. 223 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 224 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 225 document are to be interpreted as described in BCP 14, [RFC2119], as 226 scoped to those conformance targets. 228 2. Metalink Documents 230 This specification describes Metalink Documents. 232 A Metalink Document describes a file or group of files, how to access 233 them, and metadata that identifies them. Its root is the metalink: 234 metalink element. 236 namespace metalink = "urn:ietf:params:xml:ns:metalink" 237 start = metalinkMetalink 239 Metalink Documents are specified in terms of the XML Information Set, 240 serialized as XML 1.0 [REC-xml] and identified with the "application/ 241 metalink+xml" media type. 243 Metalink Documents MUST be well-formed XML. This specification does 244 not define a DTD for Metalink Documents, and hence does not require 245 them to be valid (in the sense used by XML). 247 Metalink allows the use of IRIs [RFC3987]. Every URI [RFC3986] is 248 also an IRI, so a URI may be used wherever below an IRI is named. 249 There is one special consideration: when an IRI that is not also a 250 URI is given for dereferencing, it MUST be mapped to a URI using the 251 steps in Section 3.1 of [RFC3987]. 253 Any element defined by this specification MAY have an xml:base 254 attribute [REC-xmlbase]. When xml:base is used in an Metalink 255 Document, it serves the function described in Section 5.1.1 of 256 [RFC3986], establishing the base URI (or IRI) for resolving any 257 relative references found within the effective scope of the xml:base 258 attribute. 260 Any element defined by this specification MAY have an xml:lang 261 attribute, whose content indicates the natural language for the 262 element and its descendents. The language context is only 263 significant for elements and attributes declared to be "Language- 264 Sensitive" by this specification. Requirements regarding the content 265 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 266 Section 2.12. 268 metalinkCommonAttributes = 269 attribute xml:base { metalinkUri }?, 270 attribute xml:lang { metalinkLanguageTag }?, 271 undefinedAttribute* 273 Metalink is an extensible format. See Section 7 of this document for 274 a full description of how Metalink Documents can be extended. 276 3. Common Metalink Constructs 278 Many of Metalink's elements share a few common structures. This 279 section defines those structures and their requirements for 280 convenient reference by the appropriate element definitions. 282 When an element is identified as being a particular kind of 283 construct, it inherits the corresponding requirements from that 284 construct's definition in this section. 286 Note that there MUST NOT be any white space in a Date construct or in 287 any IRI. Some XML-emitting implementations erroneously insert white 288 space around values by default, and such implementations will emit 289 invalid Metalink Documents. 291 3.1. Text Constructs 293 A Text construct contains human-readable text, usually in small 294 quantities. The content of Text constructs is Language-Sensitive. 296 metalinkTextConstruct = 297 metalinkCommonAttributes, 298 text 300 3.1.1. Text 302 Example metalink:description with text content: 304 ... 305 306 A description of the example file for download. 307 308 ... 310 The content of the Text construct MUST NOT contain child elements. 311 Such text is intended to be presented to humans in a readable 312 fashion. Thus, Metalink Processors MAY collapse white space 313 (including line breaks) and display the text using typographic 314 techniques such as justification and proportional fonts. 316 3.2. Date Constructs 318 A Date construct is an element whose content MUST conform to the 319 "date-time" production in [RFC3339]. In addition, an uppercase "T" 320 character MUST be used to separate date and time, and an uppercase 321 "Z" character MUST be present in the absence of a numeric time zone 322 offset. 324 metalinkDateConstruct = 325 metalinkCommonAttributes, 326 xsd:dateTime 328 Such date values happen to be compatible with the following 329 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 330 [W3C.REC-xmlschema-2-20041028]. 332 Example Date constructs: 334 2008-12-13T18:30:02Z 335 2008-12-13T18:30:02.25Z 336 2008-12-13T18:30:02+01:00 337 2008-12-13T18:30:02.25+01:00 339 Date values SHOULD be as accurate as possible. For example, it would 340 be generally inappropriate for a publishing system to apply the same 341 timestamp to several entries that were published during the course of 342 a single day. 344 4. Metalink Element Definitions 346 4.1. Container Elements 347 4.1.1. The "metalink:metalink" Element 349 The "metalink:metalink" element is the document (i.e., top-level) 350 element of a Metalink Document, acting as a container for metadata 351 and data associated with the listed files. It contains one 352 "metalink:files" element whose element children consist of metadata 353 elements followed by one or more metalink:file child elements. 355 metalinkMetalink = 356 element metalink:metalink { 357 metalinkCommonAttributes, 358 (metalinkPublished? 359 & metalinkOrigin? 360 & metalinkGenerator? 361 & metalinkUpdated? 362 & extensionElement*), 363 metalinkFiles 364 } 366 The following child elements are defined by this specification (note 367 that the presence of some of these elements is required): 369 o metalink:metalink elements MUST contain exactly one metalink:files 370 element. 371 o If metalink:type is "dynamic", metalink:metalink elements MAY 372 contain exactly one metalink:origin element. 373 o metalink:metalink elements MAY contain exactly one metalink:type 374 element. 375 o metalink:metalink elements MAY contain exactly one metalink: 376 generator element. 377 o metalink:metalink elements MAY contain exactly one metalink: 378 published element. 379 o If metalink:type is "dynamic", metalink:metalink elements MAY 380 contain exactly one metalink:updated element. 382 4.1.1.1. Providing Textual Content 384 Experience teaches that downloads providing textual content are in 385 general more useful than those that do not. Some applications (one 386 example is full-text indexers) require a minimum amount of text to 387 function reliably and predictably. Metalink publishers should be 388 aware of these issues. It is advisable that each metalink:file 389 element contain a non-empty metalink:description element, a non-empty 390 metalink:identity element when that element is present, and a non- 391 empty metalink:version element, and a non-empty metalink:publisher 392 element. However, the absence of metalink:description is not an 393 error, and Metalink Processors MUST NOT fail to function correctly as 394 a consequence of such an absence. 396 4.1.2. The "metalink:files" Element 398 The "metalink:files" element acts as a container for metadata and 399 data associated with the listed files. It contains one or more 400 metalink:file child elements. Certain elements can be listed either 401 under metalink:files or metalink:file. If under metalink:files, they 402 apply to all files listed in each metalink:file. If under metalink: 403 file, then they apply to just that specific file. If an element is 404 listed both under metalink:files and metalink:file, then the element 405 under metalink:file has precedence and the metalink:files element 406 does not apply to that particular file. 408 metalinkFiles = 409 element metalink:files { 410 metalinkCommonAttributes, 411 (metalinkIdentity? 412 & metalinkVersion? 413 & metalinkDescription? 414 & metalinkOS? 415 & metalinkLogo? 416 & metalinkLanguage? 417 & metalinkPublisher? 418 & metalinkCopyright? 419 & metalinkLicense? 420 & extensionElement*) 421 metalinkFile 422 } 424 The following child elements are defined by this specification (note 425 that the presence of some of these elements is required): 427 o metalink:files element MUST contain one or more metalink:file 428 elements. 429 o metalink:files elements SHOULD contain exactly one metalink: 430 identity element. 431 o metalink:files elements SHOULD contain exactly one metalink: 432 version element. 433 o metalink:files elements MAY contain exactly one metalink: 434 description element. 435 o metalink:files elements MAY contain exactly one metalink:os 436 element. 437 o metalink:files elements MAY contain exactly one metalink:logo 438 element. 439 o metalink:files elements MAY contain exactly one metalink:language 440 element. 441 o metalink:files elements MAY contain exactly one metalink:publisher 442 element. 444 o metalink:files elements MAY contain exactly one metalink:copyright 445 element. 446 o metalink:files elements MAY contain exactly one metalink:license 447 element. 449 4.1.3. The "metalink:file" Element 451 The "metalink:file" element represents an individual file, acting as 452 a container for metadata and data associated with the file. 454 metalinkFile = 455 element metalink:file { 456 metalinkCommonAttributes, 457 attribute name { metalinkTextConstruct }, 458 (metalinkVerification? 459 & metalinkIdentity? 460 & metalinkVersion? 461 & metalinkDescription? 462 & metalinkSize? 463 & metalinkOS? 464 & metalinkLogo? 465 & metalinkLanguage? 466 & metalinkPublisher? 467 & metalinkCopyright? 468 & metalinkLicense? 469 & extensionElement*) 470 metalinkResources 471 } 473 This specification assigns no significance to the order of metalink: 474 file elements. 476 The following child elements are defined by this specification (note 477 that it requires the presence of some of these elements): 479 o metalink:file elements MUST contain exactly one metalink:resources 480 element. 481 o metalink:file elements SHOULD contain exactly one metalink: 482 verification element. 483 o metalink:file elements SHOULD contain exactly one metalink: 484 identity element. 485 o metalink:file elements SHOULD contain exactly one metalink:version 486 element. 487 o metalink:file elements MAY contain exactly one metalink: 488 description element. 489 o metalink:file elements SHOULD contain exactly one metalink:size 490 element. 492 o metalink:file elements MAY contain exactly one metalink:os 493 element. 494 o metalink:file elements MAY contain exactly one metalink:logo 495 element. 496 o metalink:file elements MAY contain exactly one metalink:language 497 element. 498 o metalink:file elements MAY contain exactly one metalink:publisher 499 element. 500 o metalink:file elements MAY contain exactly one metalink:copyright 501 element. 502 o metalink:file elements MAY contain exactly one metalink:license 503 element. 505 4.1.3.1. The "name" Attribute 507 metalink:file elements MUST have a "name" attribute, which contains 508 the filename of the file downloaded. 510 Directory information can also be contained in a "path/file" format 511 only, as in: 513 515 In this example, a subdirectory debian-amd64/sarge/ will be created 516 and a file named Contents-amd64.gz will be created inside it. The 517 path MUST be relative. The path MUST NOT begin with a "/", "./" or 518 "../", contain "/../", or end with "/..". Metalink Processors MUST 519 NOT allow directory traversal. 521 A Metalink Processor MAY alter the name of the subdirectory or file 522 if they contain characters which are invalid in the destination 523 filesystem. 525 4.1.4. The "metalink:resources" Element 527 The "metalink:resources" element acts as a container for metadata and 528 data associated with the listed files. It contains one or more 529 metalink:url child elements. It can also contain one or more 530 metalink:metadata child elements. 532 metalinkResources = 533 element metalink:resources { 534 metalinkCommonAttributes, 535 extensionElement* 536 metalinkURL* 537 metalinkMetadata* 538 } 540 This specification assigns no significance to the order of metalink: 541 url elements. Significance is determined by the value of the 542 "preference" attribute of the metalink:url elements. 544 The following child elements are defined by this specification (note 545 that the presence of some of these elements is required): 547 o metalink:resources element MUST contain at least one metalink: 548 metadata element or at least one metalink:url element. Typically, 549 metalink:resources element contains more than one metalink:url 550 element to provide multiple download sources. 552 4.1.5. The "metalink:verification" Element 554 The "metalink:verification" element acts as a container for metadata 555 and data associated with verifying the listed files. This 556 information is in the form of checksums and digital signatures. 557 Checksums are used to verify the integrity of a complete file or 558 portion of a file to determine if the files have been transferred 559 without any errors. Digital signatures verify that a file is from 560 the entity that has signed it. 562 metalinkVerification = 563 element metalink:verification { 564 metalinkCommonAttributes, 565 (metalinkHash* 566 & metalinkPieces* 567 & metalinkSignature? 568 & extensionElement*) 569 } 571 The following child elements are defined by this specification: 573 o metalink:verification element MAY contain one or more metalink: 574 hash elements. 575 o metalink:verification element MAY contain one or more metalink: 576 pieces elements. 577 o metalink:verification element MAY contain one or more metalink: 578 signature elements. 580 4.1.6. The "metalink:pieces" Element 582 The "metalink:pieces" element acts as a container for metadata and 583 data associated with verifying the listed files. This information is 584 in the form of checksums for a portion of a file. 586 metalinkPieces = 587 element metalink:pieces { 588 attribute length { metalinkTextConstruct }, 589 attribute type { metalinkTextConstruct }, 590 hash+ 591 }+, 593 4.1.6.1. The "type" Attribute 595 metalink:pieces elements MUST have a "type" attribute. 597 The IANA registry named "Hash Function Textual Names" defines values 598 for hash types. Metalink Generators and Processors supporting 599 verification SHOULD at least implement "sha-1" which is SHA1, as 600 specified in [RFC3174]. 602 4.1.6.2. The "length" Attribute 604 metalink:pieces elements MUST have a "length" attribute, which is an 605 integer that describes the length of the piece of the file in octets. 607 4.2. Metadata Elements 609 4.2.1. The "metalink:copyright" Element 611 The "metalink:copyright" element is a Text construct that conveys a 612 human-readable copyright for a file. 614 metalinkCopyright = 615 element metalink:copyright { 616 metalinkTextConstruct 617 } 619 4.2.2. The "metalink:description" Element 621 The "metalink:description" element is a Text construct that conveys a 622 human-readable description for a file. 624 metalinkDescription = 625 element metalink:description { 626 metalinkTextConstruct 627 } 629 4.2.3. The "metalink:generator" Element 631 The "metalink:generator" element's content identifies the agent used 632 to generate a Metalink Document, for debugging and other purposes. 634 metalinkGenerator = element metalink:generator { 635 metalinkCommonAttributes, 636 attribute uri { metalinkUri }?, 637 attribute version { text }?, 638 text 639 } 641 The content of this element, when present, MUST be a string that is a 642 human-readable name for the generating agent. Entities such as 643 "&" and "<" represent their corresponding characters ("&" and 644 "<" respectively), not markup. 646 The metalink:generator element MAY have a "uri" attribute whose value 647 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 648 URI (mapped from an IRI, if necessary) SHOULD produce a 649 representation that is relevant to that agent. 651 The metalink:generator element MAY have a "version" attribute that 652 indicates the version of the generating agent. 654 4.2.4. The "metalink:hash" Element 656 The "metalink:hash" element is a Text construct that conveys a hash 657 for a file. All hashes are encoded in lowercase hexadecimal format. 659 metalinkHash = 660 element metalink:hash { 661 attribute piece { xsd:integer }?, 662 attribute type { metalinkTextConstruct }, 663 text 664 } 666 Metalinks can contain multiples hashes for a complete file, for 667 example both SHA-1 and SHA-256. 669 ... 670 671 a97fcf6ba9358f8a6f62beee4421863d3e52b080 672 fc87941af7fd7f03e53b34af393f4c14923d74 673 825f51116ff591336af4880227 674 675 ... 677 Metalinks can also contain hashes for individual pieces of a file. 679 ... 680 681 a97fcf6ba9358f8a6f62beee4421863d3e52b080 682 fc87941af7fd7f03e53b34af393f4c14923d74 683 825f51116ff591336af4880227 684 685 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 686 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 687 3e84219096435c34e092b17b70a011771c52d87a 688 67183e4c3ab892d3ebe8326b7d79eb62d077f487 689 690 691 ... 693 metalink:hash elements MUST have a "type" attribute or a "piece" 694 attribute. metalink:hash elements with a "type" attribute contain a 695 hash of the whole file. metalink:hash elements with a "piece" 696 attribute contain a hash for that specific piece or chunk of the 697 file. 699 4.2.4.1. The "type" Attribute 701 The IANA registry named "Hash Function Textual Names" defines values 702 for hash types. Metalink Generators and Processors supporting 703 verification SHOULD at least implement "sha-1" which is SHA1, as 704 specified in [RFC3174]. 706 4.2.4.2. The "piece" Attribute 708 metalink:hash elements MAY have a "piece" attribute, only when they 709 are a sub element of metalink:pieces. The value of "piece" starts at 710 "0" and increases, depending on the "length" attribute of metalink: 711 pieces and the size of the file. Depending on the size of a file, 712 the last piece may not be the same size as the others. 714 4.2.5. The "metalink:identity" Element 716 The "metalink:identity" element is a Text construct that conveys a 717 human-readable identity for a file. The identity of OpenOffice.org 718 3.0 would be "OpenOffice.org". 720 metalinkIdentity = 721 element metalink:identity { 722 metalinkTextConstruct 723 } 725 4.2.6. The "metalink:language" Element 727 The "metalink:language" element is a Text construct that conveys a 728 code for the language of a file, per [ISO639-2]. 730 metalinkLanguage = 731 element metalink:language { 732 metalinkTextConstruct 733 } 735 4.2.7. The "metalink:license" Element 737 The "metalink:license" element is a Text construct that conveys a 738 human-readable license name for a file. 740 metalinkLicense = 741 element metalink:license { 742 metalinkCommonAttributes, 743 attribute uri { metalinkUri }?, 744 attribute name { metalinkTextConstruct }?, 745 } 747 The metalink:license element MAY have a "uri" attribute whose value 748 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 749 URI (mapped from an IRI, if necessary) SHOULD produce a 750 representation that is relevant to that agent. 752 The metalink:license element MAY have a "name" attribute that 753 indicates the name of the license. 755 4.2.8. The "metalink:logo" Element 757 The "metalink:logo" element's content is an IRI reference [RFC3987] 758 that identifies an image that provides visual identification for a 759 file. 761 metalinkLogo = element metalink:logo { 762 metalinkCommonAttributes, 763 (metalinkUri) 764 } 766 The image SHOULD have an aspect ratio of one (horizontal) to one 767 (vertical) and SHOULD be suitable for presentation at a small size. 769 4.2.9. The "metalink:metadata" Element 771 The "metalink:metadata" element contains the IRI of metadata about a 772 resource to download. For example, this could be the IRI of a 773 BitTorrent .torrent file or a Metalink Document. 775 metalinkMetadata = 776 element metalink:metadata { 777 metalinkCommonAttributes, 778 attribute preference { xsd:integer }?, 779 attribute type { metalinkTextConstruct }, 780 metalinkUri 781 }+ 783 4.2.9.1. The "preference" Attribute 785 metalink:metadata elements MAY have a preference attribute, whose 786 value MUST be a number from 1 to 100 for priority, with 100 used 787 first and 1 used last. See the "preference" attribute of the 788 metalink:url element for more information. 790 4.2.9.2. The "type" Attribute 792 metalink:metadata elements MUST have a "type" attribute that 793 indicates the MIME type of the metadata available at the IRI. In the 794 case of BitTorrent as specified in [BITTORRENT], the value "torrent" 795 is required. Types without "/" are reserved. Currently, "torrent" 796 is the only reserved value. 798 Metalink Processors that do not support a specified type of metadata 799 about a resource to download MUST ignore that metadata. 801 4.2.10. The "metalink:origin" Element 803 The "metalink:origin" element is an IRI where the Metalink Document 804 was originally published. If metalink:type is "dynamic", then 805 updated versions of the Metalink can be found at this IRI. 807 metalinkOrigin = element metalink:origin { 808 metalinkCommonAttributes, 809 (metalinkUri) 810 } 812 4.2.11. The "metalink:os" Element 814 The "metalink:os" element is a Text construct that conveys a human- 815 readable Operating System for a file. The IANA registry named 816 "Operating System Names" defines values for OS types. 818 metalinkOS = 819 element metalink:os { 820 metalinkTextConstruct 821 } 823 4.2.12. The "metalink:published" Element 825 The "metalink:published" element is a Date construct indicating an 826 instant in time associated with an event early in the life cycle of 827 the entry. 829 metalinkPublished = 830 element metalink:published { 831 metalinkDateConstruct 832 } 834 Typically, metalink:published will be associated with the initial 835 creation or first availability of the resource. 837 4.2.13. The "metalink:publisher" Element 839 The "metalink:publisher" element indicates a group or other entity 840 which has published the file. 842 metalinkPublisher = 843 element metalink:publisher { 844 metalinkCommonAttributes, 845 attribute uri { metalinkUri }?, 846 attribute name { metalinkTextConstruct }?, 847 } 849 The metalink:publisher element MAY have a "uri" attribute whose value 850 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 851 URI (mapped from an IRI, if necessary) SHOULD produce a 852 representation that is relevant to that agent. 854 The metalink:publisher element MAY have a "name" attribute that 855 indicates the name of the publisher. 857 4.2.14. The "metalink:signature" Element 859 The "metalink:signature" element is a Text construct that conveys a 860 digital signature for a file described in a Metalink Document. 862 metalinkSignature = 863 element metalink:signature { 864 attribute type { "pgp" }, 865 metalinkTextConstruct 866 } 868 4.2.14.1. The "type" Attribute 870 metalink:signature elements MUST have a "type" attribute. The inital 871 value of "type" is the string that is non-empty and matches "pgp". 872 It may be useful to extend Metalink documents with new types of 873 digital signatures, so unknown types are allowed. 875 4.2.15. The "metalink:size" Element 877 The "metalink:size" element indicates the length of the linked 878 content in octets; it is a hint about the content length of the 879 representation returned when the IRI is mapped to a URI and 880 dereferenced. Note that the "metalink:size" element MUST override 881 the actual content length of the representation as reported by the 882 underlying protocol, i.e. files with different sizes should be 883 discarded. 885 metalinkSize = 886 element metalink:size { 887 metalinkTextConstruct 888 } 890 4.2.16. The "metalink:type" Element 892 The "metalink:type" element is a Text construct that describes 893 whether the IRI from "metalink:origin" a Metalink will contain 894 dynamic updated Metalinks or static content that is not updated. 896 metalinkType = 897 element metalink:type { 898 "static" | "dynamic" 899 } 901 4.2.17. The "metalink:updated" Element 903 The "metalink:updated" element is a Date construct indicating the 904 most recent instant in time when a Metalink was modified in a way the 905 publisher considers significant. Therefore, not all modifications 906 necessarily result in a changed metalink:updated value. 908 metalinkUpdated = 909 element metalink:updated { 910 metalinkDateConstruct 911 } 913 Publishers MAY change the value of this element over time. 915 4.2.18. The "metalink:url" Element 917 The "metalink:url" element contains the IRI of a file. All IRIs MUST 918 lead to identical files. 920 metalinkURL = 921 element metalink:url { 922 metalinkCommonAttributes, 923 attribute location { xsd:string { 924 minLength = "2" maxLength="2"} 925 }?, 926 attribute preference { xsd:integer }?, 927 metalinkUri 928 }+ 930 4.2.18.1. The "preference" Attribute 932 metalink:url elements MAY have a preference attribute, whose value 933 MUST be a number from 1 to 100 for priority, with 100 used first and 934 1 used last. Multiple metalink:url elements can have the same 935 preference, i.e. ten mirrors could have preference="100". A Metalink 936 Processor MAY download different segments of a file from more than 937 one IRI simultaneously, and when doing so SHOULD first use the 938 highest priority IRIs and then use lower ones. 940 When one or more metalink:url elements have a preference attribute 941 value of "100", other metalink:url elements SHOULD NOT be used, 942 unless the elements with a preference of 100 cannot be processed 943 (e.g. if they are of a metalink:metadata element type which is not 944 supported by the Metalink Processor, such as BitTorrent, or if the 945 servers are unavailable). 947 Any metalink:url elements with a preference attribute value of "1" 948 SHOULD NOT be used unless all other metalink:url elements cannot be 949 processed (e.g. if they are of a metalink:metadata element type which 950 is not supported by the Metalink Processor, such as BitTorrent, or if 951 the servers are unavailable). 953 4.2.18.2. The "location" Attribute 955 metalink:url elements MAY have a "location" attribute, which is a 956 [ISO3166] alpha-2 two letter country code for the geographical 957 location of the physical server an IRI is used to access. 959 4.2.19. The "metalink:version" Element 961 The "metalink:version" element is a Text construct that conveys a 962 human-readable version for a file. The version of OpenOffice.org 3.0 963 would be "3.0". 965 metalinkVersion = 966 element metalink:version { 967 metalinkTextConstruct 968 } 970 5. Client Implementation Considerations 972 Metalink Processors that support HTTP MUST support transparent 973 content negotiation with HTTP [RFC2295]. Transparent content 974 negotiation is accomplished by adding the Metalink media type to the 975 Accept request header. Metalink Processors MUST check the returned 976 content type, and if the Metalink media type is used, it MUST process 977 the Metalink. If the content type does not match the Metalink media 978 type, then Metalink Processors SHOULD handle the response as a normal 979 response. Metalink Processors MUST NOT add the Metalink media type 980 to Accept when requesting a URI from a metalink:url element, thus 981 avoiding loops. Metalink Processors SHOULD handle external redirects 982 that might lead to a Metalink. 984 When multiple hash types methods are provided, a Metalink Processor 985 MAY verify using more than one of these hash types. Metalink 986 Processors are encouraged to check all hash types given which they 987 are able to verify. 989 6. Securing Metalink Documents 991 Because Metalink is an XML-based format, existing XML security 992 mechanisms can be used to secure its content. 994 Producers of Metalinks may have sound reasons for signing otherwise- 995 unprotected content. For example, a merchant might digitally sign a 996 Metalink that lists a file download to verify its origin. Other 997 merchants may wish to sign and encypt Metalinks that list digital 998 songs that have been purchased. Of course, many other examples exist 999 as well. 1001 The algorithm requirements in this section pertain to the Metalink 1002 Processor. They require that a recipient, at a minimum, be able to 1003 handle messages that use the specified cryptographic algorithms. 1004 These requirements do not limit the algorithms that the sender can 1005 choose. 1007 Metalink Processors that verify signed Metalink Documents MUST at 1008 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 1010 7. Extending Metalink 1012 7.1. Extensions from Non-Metalink Vocabularies 1014 This specification describes Metalink's XML markup vocabulary. 1015 Markup from other vocabularies ("foreign markup") can be used in an 1016 Metalink Document. 1018 7.2. Extensions to the Metalink Vocabulary 1020 The Metalink namespace is reserved for future forward-compatible 1021 revisions of Metalink. Future versions of this specification could 1022 add new elements and attributes to the Metalink markup vocabulary. 1023 Software written to conform to this version of the specification will 1024 not be able to process such markup correctly and, in fact, will not 1025 be able to distinguish it from markup error. For the purposes of 1026 this discussion, unrecognized markup from the Metalink vocabulary 1027 will be considered "foreign markup". 1029 7.3. Processing Foreign Markup 1031 Metalink Processors that encounter foreign markup in a location that 1032 is legal according to this specification MUST NOT stop processing or 1033 signal an error. It might be the case that the Metalink Processor is 1034 able to process the foreign markup correctly and does so. Otherwise, 1035 such markup is termed "unknown foreign markup". 1037 When unknown foreign markup is encountered as a child of metalink: 1038 file, metalink:metalink, Metalink Processors MAY bypass the markup 1039 and any textual content and MUST NOT change their behavior as a 1040 result of the markup's presence. 1042 When unknown foreign markup is encountered in a Text Construct, 1043 software SHOULD ignore the markup and process any text content of 1044 foreign elements as though the surrounding markup were not present. 1046 7.4. Extension Elements 1048 Metalink allows foreign markup anywhere in an Metalink document, 1049 except where it is explicitly forbidden. Child elements of metalink: 1050 file and metalink:metalink are considered Metadata elements and are 1051 described below. Child elements of Person constructs are considered 1052 to apply to the construct. The role of other foreign markup is 1053 undefined by this specification. 1055 7.4.1. Simple Extension Elements 1057 A Simple Extension element MUST NOT have any attributes or child 1058 elements. The element MAY contain character data or be empty. 1059 Simple Extension elements are not Language-Sensitive. 1061 simpleExtensionElement = 1062 element * - metalink:* { 1063 text 1064 } 1066 The element can be interpreted as a simple property (or name/value 1067 pair) of the parent element that encloses it. The pair consisting of 1068 the namespace-URI of the element and the local name of the element 1069 can be interpreted as the name of the property. The character data 1070 content of the element can be interpreted as the value of the 1071 property. If the element is empty, then the property value can be 1072 interpreted as an empty string. 1074 7.4.2. Structured Extension Elements 1076 The root element of a Structured Extension element MUST have at least 1077 one attribute or child element. It MAY have attributes, it MAY 1078 contain well-formed XML content (including character data), or it MAY 1079 be empty. Structured Extension elements are Language-Sensitive. 1081 structuredExtensionElement = 1082 element * - metalink:* { 1083 (attribute * { text }+, 1084 (text|anyElement)*) 1085 | (attribute * { text }*, 1086 (text?, anyElement+, (text|anyElement)*)) 1087 } 1089 The structure of a Structured Extension element, including the order 1090 of its child elements, could be significant. 1092 This specification does not provide an interpretation of a Structured 1093 Extension element. The syntax of the XML contained in the element 1094 (and an interpretation of how the element relates to its containing 1095 element) is defined by the specification of the Metalink extension. 1097 8. IANA Considerations 1098 8.1. XML Namespace Registration 1100 This document makes use of the XML registry specified in [RFC3688]. 1101 Accordingly, IANA has made the following registration: 1103 Registration request for the Metalink namespace: 1105 URI: urn:ietf:params:xml:ns:metalink 1107 Registrant Contact: See the "Author's Address" section of this 1108 document. 1110 XML: None. Namespace URIs do not represent an XML specification. 1112 8.2. application/metalink+xml MIME type 1114 A Metalink Document, when serialized as XML 1.0, can be identified 1115 with the following media type: 1117 MIME media type name: application 1118 MIME subtype name: metalink+xml 1119 Mandatory parameters: None. 1120 Optional parameters: 1121 "charset": This parameter has semantics identical to the charset 1122 parameter of the "application/xml" media type as specified in 1123 [RFC3023]. 1124 Encoding considerations: Identical to those of "application/xml" as 1125 described in [RFC3023], Section 3.2. 1126 Security considerations: As defined in this specification. 1127 In addition, as this media type uses the "+xml" convention, it 1128 shares the same security considerations as described in [RFC3023], 1129 Section 10. 1130 Interoperability considerations: There are no known interoperability 1131 issues. 1132 Published specification: This specification. 1133 Applications that use this media type: No known applications 1134 currently use this media type. 1136 Additional information: 1138 Magic number(s): As specified for "application/xml" in [RFC3023], 1139 Section 3.2. 1140 File extension: .metalink 1141 Fragment identifiers: As specified for "application/xml" in 1142 [RFC3023], Section 5. 1144 Base URI: As specified in [RFC3023], Section 6. 1145 Macintosh File Type code: TEXT 1146 Person and email address to contact for further information: Anthony 1147 Bryan 1148 Intended usage: COMMON 1149 Author/Change controller: IESG 1151 9. Security Considerations 1153 Publishers are encouraged to offer Metalink documents via 1154 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1155 are also encouraged to include digital signatures of the files within 1156 the Metalink Documents if they are available. 1158 9.1. URIs and IRIs 1160 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1161 and Section 8 of [RFC3987] for security considerations related to 1162 their handling and use. 1164 9.2. Spoofing 1166 Metalink Processors should be aware of the potential for spoofing 1167 attacks where the attacker publishes Metalinks with false 1168 information. Malicious publishers might create Metalink Documents 1169 containing inaccurate information anywhere in the document. At best, 1170 this could deceive unaware downloaders that they are downloading a 1171 malicious or worthless file. At worst, malicious publishers could 1172 attempt a distributed denial of service attack by inserting unrelated 1173 IRIs into Metalink Documents. 1175 9.3. Cryptographic Hashes 1177 Currently, some of the hash types defined in the IANA registry named 1178 "Hash Function Textual Names" are considered insecure. These include 1179 the whole Message Digest family of algorithms which are not suitable 1180 for cryptographically strong verification. Malicious people could 1181 provide files that appear to be identical to another file because of 1182 a collision, i.e. the weak cryptographic hashes match. 1184 Metalink Generators and Processors supporting verification SHOULD at 1185 least implement "sha-1" which is SHA1, as specified in [RFC3174]. 1187 9.4. Signing 1189 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1190 subject to the security considerations implied by its use. This 1191 addresses the issue of spoofing. 1193 Digital signatures provide authentication, message integrity, and 1194 non-repudiation with proof of origin. 1196 10. References 1198 10.1. Normative References 1200 [BITTORRENT] 1201 Cohen, B., "The BitTorrent Protocol Specification", 1202 BITTORRENT 11031, February 2008, 1203 . 1205 [ISO3166] International Organization for Standardization, "ISO 3166: 1206 1988 (E/F) - Codes for the representation of names of 1207 countries - The International Organization for 1208 Standardization, 3rd edition, 1988-08-15.", ISO Standard 1209 3166, 1988. 1211 [ISO639-2] 1212 International Organization for Standardization, "ISO 639- 1213 2:1998 - Codes for the representation of names of 1214 languages -- Part 2: Alpha-3 code - edition 1, 1215 1998-11-01, 66 pages, prepared by a Joint Working Group of 1216 ISO TC46/SC4 and ISO TC37/SC2.", ISO Standard 639-2, 1998. 1218 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1219 and E. Maler, "Extensible Markup Language (XML) 1.0 1220 (Fourth Edition)", World Wide Web Consortium 1221 Recommendation REC-xml-20060816, August 2006, 1222 . 1224 [REC-xml-infoset] 1225 Cowan, J. and R. Tobin, "XML Information Set (Second 1226 Edition)", World Wide Web Consortium Recommendation REC- 1227 xml-infoset-20040204, February 2004, 1228 . 1230 [REC-xml-names] 1231 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1232 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1233 Consortium Recommendation REC-xml-names-20060816, 1234 August 2006, 1235 . 1237 [REC-xmlbase] 1238 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1239 June 2001, 1240 . 1242 [REC-xmldsig-core] 1243 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1244 Syntax and Processing", World Wide Web Consortium 1245 Recommendation REC-xmldsig-core-20020212, February 2002, 1246 . 1248 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1249 Requirement Levels", BCP 14, RFC 2119, March 1997. 1251 [RFC2295] Holtman, K. and A. Mutz, "Transparent Content Negotiation 1252 in HTTP", RFC 2295, March 1998. 1254 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1256 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1257 Types", RFC 3023, January 2001. 1259 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1260 (SHA1)", RFC 3174, September 2001. 1262 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1263 Timestamps", RFC 3339, July 2002. 1265 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1266 January 2004. 1268 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1269 Resource Identifier (URI): Generic Syntax", STD 66, 1270 RFC 3986, January 2005. 1272 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1273 Identifiers (IRIs)", RFC 3987, January 2005. 1275 10.2. Informative References 1277 [ISO.8601.1988] 1278 International Organization for Standardization, "Data 1279 elements and interchange formats - Information interchange 1280 - Representation of dates and times", ISO Standard 8601, 1281 June 1988. 1283 [RELAX-NG] 1284 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1288 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1289 Format", RFC 4287, December 2005. 1291 [W3C.NOTE-datetime-19980827] 1292 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1293 NOTE NOTE-datetime-19980827, August 1998, 1294 . 1296 [W3C.REC-xmlschema-2-20041028] 1297 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1298 Second Edition", W3C REC REC-xmlschema-2-20041028, 1299 October 2004, 1300 . 1302 Appendix A. Acknowledgements and Contributors 1304 The layout and content of this document relies heavily on work 1305 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1307 The following people contributed to preliminary versions of this 1308 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1309 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1310 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1311 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1312 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1313 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1314 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1315 Hoffman, Eran Hammer-Lahav, and Mark Nottingham. The content and 1316 concepts within are a product of the Metalink community. 1318 The Metalink community has dozens of contributors who proposed ideas 1319 and wording for this document, or contributed to the evolution of 1320 Metalink, including: 1322 Nicolas Alvarez, Patrick Ruckstuhl, Mike Wells, Sebastien Willemijns, 1323 Micah Cowan, Dan Fandrich, Francis Giannaros, Yazsoft, Lukas 1324 Appelhans, KGet developers, FDM Team, Orbit Team, Arne 1325 Babenhauserheide, Mathias Berchtold, Xienzhenyu and TheWorld Browser 1326 Team, Xi Software, Bridget and Ethan Fletcher, Ruben Kerkhof, 1327 Agostino Russo, Gervase Markham, Salvatore and Robin Musumeci, Steve 1328 and Rachel Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave 1329 Winquist, Bob Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve 1330 Kleisath, Chad Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, 1331 Derick Cordoba, Ryan Alexander, John Sowder, Sandra Amisano, Tom 1332 Mainville, Janie Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus 1333 Hofmann, Dan Connolly, Tim Berners-Lee, Harry Chen, Adrien Macneil, 1334 Louis Suarez-Potts, Ross Smith, Rahul Sundaram, Jesse Keating, Michal 1335 Bentkowski, Andrew Pantyukhin, Judd Vinet, Charles Landemaine, Pascal 1336 Bleser, Jeff@BLAG, Yuichiro Nakada, Jereme Hancock, Marcel Hauser, 1337 Jeff Covey, Doug Lang, Seth Brown, Alexander Lazic, Mayank Sharma, 1338 Robin Heggelund Hansen, Steve Langasek, Federico Parodi, Stefano 1339 Verna, Jason Green, James Linden, Matt Nederlanden, Aren Olsen, Dag 1340 Odenhall, Troy Sobotka, Corey Farwell, Ed Lee, Shawn Wilsher, Mike 1341 Connor, Anand Muttagi, Johan Svedberg, Dedric Carter, James Antill, 1342 Debi Goulding, the Anthony Family, the Bryan Family, Juanita Anthony 1343 and Zimmy Bryan. 1345 Appendix B. RELAX NG Compact Schema 1347 This appendix is informative. 1349 The Relax NG schema explicitly excludes elements in the Metalink 1350 namespace that are not defined in this revision of the specification. 1351 Requirements for Metalink Processors encountering such markup are 1352 given in Sections 7.2 and 7.3. 1354 # -*- rnc -*- 1355 # RELAX NG Compact Syntax Grammar for the 1356 # Metalink Format Specification Version 2 1358 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1359 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1361 # Common attributes 1363 metalinkCommonAttributes = 1364 attribute xml:base { metalinkUri }?, 1365 attribute xml:lang { metalinkLanguageTag }?, 1366 undefinedAttribute* 1368 # Text Constructs 1370 metalinkTextConstruct = 1371 metalinkCommonAttributes, 1372 text 1374 # Date Construct 1376 metalinkDateConstruct = 1377 metalinkCommonAttributes, 1378 xsd:dateTime 1380 start = 1381 element metalink:metalink { 1382 element metalink:generator { 1383 attribute uri { metalinkUri }?, 1384 attribute version { text }?, 1385 metalinkTextConstruct 1386 } 1387 element metalink:origin { metalinkUri }?, 1388 element metalink:type { "static" | "dynamic" }?, 1389 element metalink:published { metalinkDateConstruct }?, 1390 element metalink:updated { metalinkDateConstruct }?, 1391 element metalink:files { 1392 element metalink:file { 1393 attribute name { metalinkTextConstruct }, 1394 element metalink:identity { metalinkTextConstruct }?, 1395 element metalink:version { metalinkTextConstruct }?, 1396 element metalink:size { xsd:integer }?, 1397 element metalink:description { metalinkTextConstruct }?, 1398 element metalink:license { 1399 attribute uri { metalinkUri }?, 1400 attribute name { metalinkTextConstruct }?, 1401 }?, 1402 element metalink:logo { metalinkUri }?, 1403 element metalink:publisher { 1404 attribute uri { metalinkUri }?, 1405 attribute name { metalinkTextConstruct }?, 1406 }?, 1407 element metalink:language { metalinkTextConstruct }?, 1408 element metalink:copyright { metalinkTextConstruct }?, 1409 element metalink:license { metalinkTextConstruct }?, 1410 element metalink:os { metalinkTextConstruct }?, 1411 element metalink:verification { 1412 hash+, 1413 element metalink:pieces { 1414 attribute length { metalinkTextConstruct }, 1415 attribute type { metalinkTextConstruct }, 1416 hash+ 1417 }+, 1418 element metalink:signature { 1419 attribute type { "pgp" }, 1420 text 1421 }+ 1422 }?, 1423 element metalink:resources { 1424 element metalink:metadata { 1425 attribute preference { xsd:integer }?, 1426 attribute type { metalinkTextConstruct }, 1427 metalinkUri 1429 element metalink:url { 1430 attribute location { xsd:string { 1431 minLength = "2" maxLength="2"} 1432 }?, 1433 attribute preference { xsd:integer }?, 1434 metalinkUri 1435 }+ 1436 } 1437 }+ 1438 } 1439 } 1440 hash = 1441 element metalink:hash { 1442 attribute piece { metalinkTextConstruct }?, 1443 attribute type { metalinkTextConstruct }, 1444 text 1445 } 1447 # As defined in RFC 3066 1448 metalinkLanguageTag = xsd:string { 1449 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1450 } 1452 # Unconstrained; it's not entirely clear how IRI fit into 1453 # xsd:anyURI so let's not try to constrain it here 1454 metalinkUri = text 1456 # Simple Extension 1458 simpleExtensionElement = 1459 element * - metalink:* { 1460 text 1461 } 1463 # Structured Extension 1465 structuredExtensionElement = 1466 element * - metalink:* { 1467 (attribute * { text }+, 1468 (text|anyElement)*) 1469 | (attribute * { text }*, 1470 (text?, anyElement+, (text|anyElement)*)) 1471 } 1473 # Other Extensibility 1475 extensionElement = 1476 simpleExtensionElement | structuredExtensionElement 1478 undefinedAttribute = 1479 attribute * - (xml:base | xml:lang | local:*) { text } 1481 undefinedContent = (text|anyForeignElement)* 1483 anyElement = 1484 element * { 1485 (attribute * { text } 1486 | text 1487 | anyElement)* 1488 } 1490 anyForeignElement = 1491 element * - metalink:* { 1492 (attribute * { text } 1493 | text 1494 | anyElement)* 1495 } 1497 # EOF 1499 Appendix C. Document History 1501 [[ to be removed by the RFC editor before publication as an RFC. ]] 1503 Updated versions are kept in Subversion at 1504 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1505 and http://tools.ietf.org/html/draft-bryan-metalink 1507 Remaining issues: Section 5 - Content negotiation vs HTTP Link 1508 header. Section 4.2.14 - Need to allow signatures other than PGP. 1510 -06 1511 o Add authors and this Document History section. 1513 -05 1514 o Clarifications. 1516 -04 1517 o New IPR notice as required by IETF. 1518 o Correct "metalink:pieces" Element text. 1519 o Add hash examples. 1520 o Slim down "Securing Metalink Documents" section. 1521 o Recommend at least SHA1. 1523 -03 1524 o New namespace - urn:ietf:params:xml:ns:metalink 1525 o Use the IANA registry named "Operating System Names" to define 1526 values for OS types. 1527 o Add "Client Implementation Considerations" section, which includes 1528 Content Negotiation. 1530 -02 1531 o Use the IANA registry named "Hash Function Textual Names" for hash 1532 types. 1533 o metadata Element for listing .torrent, .metalink, etc. 1534 o Remove type attribute for url Element. 1536 -01 1537 o Clarify directory info in name attribute, hash types, add text for 1538 preference attribute. 1540 -00 1541 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1542 3.0 specification. 1544 Index 1546 A 1547 application/metalink+xml Media Type 25 1549 C 1550 copyright XML element 14 1552 D 1553 description XML element 14 1555 F 1556 file XML element 11 1557 files XML element 10 1559 G 1560 generator XML element 14 1561 Grammar 1562 metalinkCommonAttributes 7 1563 metalinkCopyright 14 1564 metalinkDateConstruct 8 1565 metalinkDescription 14 1566 metalinkFile 11 1567 metalinkFiles 10 1568 metalinkGenerator 15 1569 metalinkHash 15 1570 metalinkIdentity 16 1571 metalinkLanguage 17 1572 metalinkLicense 17 1573 metalinkLogo 17 1574 metalinkMetalink 9 1575 metalinkOrigin 18 1576 metalinkOS 18 1577 metalinkPieces 14 1578 metalinkPublished 19 1579 metalinkPublisher 19 1580 metalinkResources 12 1581 metalinkSignature 19 1582 metalinkSize 20 1583 metalinkTextConstruct 7 1584 metalinkType 20 1585 metalinkUpdated 20 1586 metalinkURL 18, 21 1587 metalinkVerification 13 1588 metalinkVersion 22 1589 simpleExtensionElement 24 1590 structuredExtensionElement 24 1592 H 1593 hash XML element 15 1595 I 1596 identity XML element 16 1598 L 1599 language XML element 17 1600 license XML element 17 1601 logo XML element 17 1603 M 1604 Media Type 1605 application/metalink+xml 25 1606 metadata XML element 17 1607 metalink XML element 9 1608 metalinkCommonAttributes grammar production 7 1609 metalinkCopyright grammar production 14 1610 metalinkDateConstruct grammar production 8 1611 metalinkDescription grammar production 14 1612 metalinkFile grammar production 11 1613 metalinkFiles grammar production 10 1614 metalinkGenerator grammar production 15 1615 metalinkHash grammar production 15 1616 metalinkIdentity grammar production 16 1617 metalinkLanguage grammar production 17 1618 metalinkLicense grammar production 17 1619 metalinkLogo grammar production 17 1620 metalinkMetalink grammar production 9 1621 metalinkOrigin grammar production 18 1622 metalinkOS grammar production 18 1623 metalinkPieces grammar production 14 1624 metalinkPublished grammar production 19 1625 metalinkPublisher grammar production 19 1626 metalinkResources grammar production 12 1627 metalinkSignature grammar production 19 1628 metalinkSize grammar production 20 1629 metalinkTextConstruct grammar production 7 1630 metalinkType grammar production 20 1631 metalinkUpdated grammar production 20 1632 metalinkURL grammar production 18, 21 1633 metalinkVerification grammar production 13 1634 metalinkVersion grammar production 22 1636 O 1637 origin XML element 18 1638 os XML element 18 1640 P 1641 pieces XML element 13 1642 published XML element 19 1643 publisher XML element 19 1645 R 1646 resources XML element 12 1648 S 1649 signature XML element 19 1650 simpleExtensionElement grammar production 24 1651 size XML element 20 1652 structuredExtensionElement grammar production 24 1654 T 1655 type XML element 20 1657 U 1658 updated XML element 20 1659 url XML element 21 1661 V 1662 verification XML element 13 1663 version XML element 21 1665 X 1666 XML Elements 1667 copyright 14 1668 description 14 1669 entry 11 1670 files 10 1671 generator 14 1672 hash 15 1673 identity 16 1674 language 17 1675 license 17 1676 logo 17 1677 metadata 17 1678 metalink 9 1679 origin 18 1680 os 18 1681 pieces 13 1682 published 19 1683 publisher 19 1684 resources 12 1685 signature 19 1686 size 20 1687 type 20 1688 updated 20 1689 url 21 1690 verification 13 1691 version 21 1693 Authors' Addresses 1695 Anthony Bryan (editor) 1696 Metalinker Project 1698 Email: anthonybryan@gmail.com 1699 URI: http://www.metalinker.org 1701 Tatsuhiro Tsujikawa (editor) 1702 Metalinker Project 1704 Email: tatsuhiro.t@gmail.com 1705 URI: http://aria2.sourceforge.net 1706 Neil McNab (editor) 1707 Metalinker Project 1709 Email: nabber00@gmail.com 1710 URI: http://www.nabber.org 1712 Peter Poeml (editor) 1713 Novell, Inc. 1715 Email: info@mirrorbrain.org 1716 URI: http://www.mirrorbrain.org/