idnits 2.17.1 draft-bryan-metalink-07.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 (June 18, 2009) is 5425 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' ** 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: 4 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: December 20, 2009 Metalinker Project 6 P. Poeml, Ed. 7 Novell, Inc. 8 June 18, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-07 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 December 20, 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 . . . . . . . . . . . . . . 20 100 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 21 101 5. Securing Metalink Documents . . . . . . . . . . . . . . . . . 21 102 6. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 22 103 6.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 22 104 6.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 22 105 6.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 22 106 6.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 23 107 6.4.1. Simple Extension Elements . . . . . . . . . . . . . . 23 108 6.4.2. Structured Extension Elements . . . . . . . . . . . . 23 109 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 110 7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 24 111 7.2. application/metalink+xml MIME type . . . . . . . . . . . . 24 112 8. Security Considerations . . . . . . . . . . . . . . . . . . . 25 113 8.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 25 114 8.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 25 115 8.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 25 116 8.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 26 117 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 26 118 9.1. Normative References . . . . . . . . . . . . . . . . . . . 26 119 9.2. Informative References . . . . . . . . . . . . . . . . . . 27 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) . . . . . . . . . . . . . . . . . 32 124 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 125 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 36 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 6 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, white space could be collapsed (including line 313 breaks) and text could be displayed using typographic techniques such 314 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 NOT contain any directory traversal directives or 518 information. The path MUST be relative. The path MUST NOT begin 519 with a "/", "./" or "../", contain "/../", or end with "/..". 521 4.1.4. The "metalink:resources" Element 523 The "metalink:resources" element acts as a container for metadata and 524 data associated with the listed files. It contains one or more 525 metalink:url child elements. It can also contain one or more 526 metalink:metadata child elements. 528 metalinkResources = 529 element metalink:resources { 530 metalinkCommonAttributes, 531 extensionElement* 532 metalinkURL* 533 metalinkMetadata* 534 } 536 This specification assigns no significance to the order of metalink: 537 url elements. Significance is determined by the value of the 538 "preference" attribute of the metalink:url elements. 540 The following child elements are defined by this specification (note 541 that the presence of some of these elements is required): 543 o metalink:resources element MUST contain at least one metalink:url 544 element or at least one metalink:metadata element. Typically, 545 metalink:resources element contains more than one metalink:url 546 element to provide multiple download sources. 548 4.1.5. The "metalink:verification" Element 550 The "metalink:verification" element acts as a container for metadata 551 and data associated with verifying the listed files. This 552 information is in the form of checksums and digital signatures. 553 Checksums are used to verify the integrity of a complete file or 554 portion of a file to determine if the files have been transferred 555 without any errors. Digital signatures verify that a file is from 556 the entity that has signed it. 558 metalinkVerification = 559 element metalink:verification { 560 metalinkCommonAttributes, 561 (metalinkHash* 562 & metalinkPieces* 563 & metalinkSignature? 564 & extensionElement*) 565 } 567 The following child elements are defined by this specification: 569 o metalink:verification element MAY contain one or more metalink: 570 hash elements. 571 o metalink:verification element MAY contain one or more metalink: 572 pieces elements. 573 o metalink:verification element MAY contain one or more metalink: 574 signature elements. 576 4.1.6. The "metalink:pieces" Element 578 The "metalink:pieces" element acts as a container for metadata and 579 data associated with verifying the listed files. This information is 580 in the form of checksums for a portion of a file. 582 metalinkPieces = 583 element metalink:pieces { 584 attribute length { metalinkTextConstruct }, 585 attribute type { metalinkTextConstruct }, 586 hash+ 587 }+, 589 4.1.6.1. The "type" Attribute 591 metalink:pieces elements MUST have a "type" attribute. 593 The IANA registry named "Hash Function Textual Names" defines values 594 for hash types. If a Metalink Document contains verification 595 information, it SHOULD implement "sha-1" which is SHA1, as specified 596 in [RFC3174]. It MAY also include other verification algorithms. 598 4.1.6.2. The "length" Attribute 600 metalink:pieces elements MUST have a "length" attribute, which is an 601 integer that describes the length of the piece of the file in octets. 603 4.2. Metadata Elements 605 4.2.1. The "metalink:copyright" Element 607 The "metalink:copyright" element is a Text construct that conveys a 608 human-readable copyright for a file. 610 metalinkCopyright = 611 element metalink:copyright { 612 metalinkTextConstruct 613 } 615 4.2.2. The "metalink:description" Element 617 The "metalink:description" element is a Text construct that conveys a 618 human-readable description for a file. 620 metalinkDescription = 621 element metalink:description { 622 metalinkTextConstruct 623 } 625 4.2.3. The "metalink:generator" Element 627 The "metalink:generator" element's content identifies the agent used 628 to generate a Metalink Document, for debugging and other purposes. 630 metalinkGenerator = element metalink:generator { 631 metalinkCommonAttributes, 632 attribute uri { metalinkUri }?, 633 attribute version { text }?, 634 text 635 } 636 The content of this element, when present, MUST be a string that is a 637 human-readable name for the generating agent. Entities such as 638 "&" and "<" represent their corresponding characters ("&" and 639 "<" respectively), not markup. 641 The metalink:generator element MAY have a "uri" attribute whose value 642 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 643 URI (mapped from an IRI, if necessary) SHOULD produce a 644 representation that is relevant to that agent. 646 The metalink:generator element MAY have a "version" attribute that 647 indicates the version of the generating agent. 649 4.2.4. The "metalink:hash" Element 651 The "metalink:hash" element is a Text construct that conveys a hash 652 for a file. All hashes are encoded in lowercase hexadecimal format. 654 metalinkHash = 655 element metalink:hash { 656 attribute piece { xsd:integer }?, 657 attribute type { metalinkTextConstruct }, 658 text 659 } 661 Metalinks can contain multiples hashes for a complete file, for 662 example both SHA-1 and SHA-256. 664 ... 665 666 a97fcf6ba9358f8a6f62beee4421863d3e52b080 667 fc87941af7fd7f03e53b34af393f4c14923d74 668 825f51116ff591336af4880227 669 670 ... 672 Metalinks can also contain hashes for individual pieces of a file. 674 ... 675 676 a97fcf6ba9358f8a6f62beee4421863d3e52b080 677 fc87941af7fd7f03e53b34af393f4c14923d74 678 825f51116ff591336af4880227 679 680 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 681 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 682 3e84219096435c34e092b17b70a011771c52d87a 683 67183e4c3ab892d3ebe8326b7d79eb62d077f487 684 685 686 ... 688 metalink:hash elements MUST have a "type" attribute or a "piece" 689 attribute. metalink:hash elements with a "type" attribute contain a 690 hash of the whole file. metalink:hash elements with a "piece" 691 attribute contain a hash for that specific piece or chunk of the 692 file. 694 4.2.4.1. The "type" Attribute 696 The IANA registry named "Hash Function Textual Names" defines values 697 for hash types. If a Metalink Document contains verification 698 information, it SHOULD implement "sha-1" which is SHA1, as specified 699 in [RFC3174]. It MAY also include other verification algorithms. 701 4.2.4.2. The "piece" Attribute 703 metalink:hash elements MAY have a "piece" attribute, only when they 704 are a sub element of metalink:pieces. The value of "piece" starts at 705 "0" and increases, depending on the "length" attribute of metalink: 706 pieces and the size of the file. Depending on the size of a file, 707 the last piece may not be the same size as the others. 709 4.2.5. The "metalink:identity" Element 711 The "metalink:identity" element is a Text construct that conveys a 712 human-readable identity for a file. The identity of OpenOffice.org 713 3.0 would be "OpenOffice.org". 715 metalinkIdentity = 716 element metalink:identity { 717 metalinkTextConstruct 718 } 720 4.2.6. The "metalink:language" Element 722 The "metalink:language" element is a Text construct that conveys a 723 code for the language of a file, per [ISO639-2]. 725 metalinkLanguage = 726 element metalink:language { 727 metalinkTextConstruct 728 } 730 4.2.7. The "metalink:license" Element 732 The "metalink:license" element is a Text construct that conveys a 733 human-readable license name for a file. 735 metalinkLicense = 736 element metalink:license { 737 metalinkCommonAttributes, 738 attribute uri { metalinkUri }?, 739 attribute name { metalinkTextConstruct }?, 740 } 742 The metalink:license element MAY have a "uri" attribute whose value 743 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 744 URI (mapped from an IRI, if necessary) SHOULD produce a 745 representation that is relevant to that agent. 747 The metalink:license element MAY have a "name" attribute that 748 indicates the name of the license. 750 4.2.8. The "metalink:logo" Element 752 The "metalink:logo" element's content is an IRI reference [RFC3987] 753 that identifies an image that provides visual identification for a 754 file. 756 metalinkLogo = element metalink:logo { 757 metalinkCommonAttributes, 758 (metalinkUri) 759 } 761 The image SHOULD have an aspect ratio of one (horizontal) to one 762 (vertical) and SHOULD be suitable for presentation at a small size. 764 4.2.9. The "metalink:metadata" Element 766 The "metalink:metadata" element contains the IRI of metadata about a 767 resource to download. For example, this could be the IRI of a 768 BitTorrent .torrent file or a Metalink Document. 770 metalinkMetadata = 771 element metalink:metadata { 772 metalinkCommonAttributes, 773 attribute preference { xsd:integer }?, 774 attribute type { metalinkTextConstruct }, 775 metalinkUri 776 }+ 778 4.2.9.1. The "preference" Attribute 780 metalink:metadata elements MAY have a preference attribute, whose 781 value MUST be a number from 1 to 100 for priority, with 100 used 782 first and 1 used last. See the "preference" attribute of the 783 metalink:url element for more information. 785 4.2.9.2. The "type" Attribute 787 metalink:metadata elements MUST have a "type" attribute that 788 indicates the MIME type of the metadata available at the IRI. In the 789 case of BitTorrent as specified in [BITTORRENT], the value "torrent" 790 is required. Types without "/" are reserved. Currently, "torrent" 791 is the only reserved value. 793 4.2.10. The "metalink:origin" Element 795 The "metalink:origin" element is an IRI where the Metalink Document 796 was originally published. If metalink:type is "dynamic", then 797 updated versions of the Metalink can be found at this IRI. 799 metalinkOrigin = element metalink:origin { 800 metalinkCommonAttributes, 801 (metalinkUri) 802 } 804 4.2.11. The "metalink:os" Element 806 The "metalink:os" element is a Text construct that conveys a human- 807 readable Operating System for a file. The IANA registry named 808 "Operating System Names" defines values for OS types. 810 metalinkOS = 811 element metalink:os { 812 metalinkTextConstruct 813 } 815 4.2.12. The "metalink:published" Element 817 The "metalink:published" element is a Date construct indicating an 818 instant in time associated with an event early in the life cycle of 819 the entry. 821 metalinkPublished = 822 element metalink:published { 823 metalinkDateConstruct 824 } 826 Typically, metalink:published will be associated with the initial 827 creation or first availability of the resource. 829 4.2.13. The "metalink:publisher" Element 831 The "metalink:publisher" element indicates a group or other entity 832 which has published the file. 834 metalinkPublisher = 835 element metalink:publisher { 836 metalinkCommonAttributes, 837 attribute uri { metalinkUri }?, 838 attribute name { metalinkTextConstruct }?, 839 } 841 The metalink:publisher element MAY have a "uri" attribute whose value 842 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 843 URI (mapped from an IRI, if necessary) SHOULD produce a 844 representation that is relevant to that agent. 846 The metalink:publisher element MAY have a "name" attribute that 847 indicates the name of the publisher. 849 4.2.14. The "metalink:signature" Element 851 The "metalink:signature" element is a Text construct that conveys a 852 digital signature for a file described in a Metalink Document. 854 metalinkSignature = 855 element metalink:signature { 856 attribute type { "pgp" }, 857 metalinkTextConstruct 858 } 860 4.2.14.1. The "type" Attribute 862 metalink:signature elements MUST have a "type" attribute. The inital 863 value of "type" is the string that is non-empty and matches "pgp". 864 It may be useful to extend Metalink documents with new types of 865 digital signatures, so unknown types are allowed. 867 4.2.15. The "metalink:size" Element 869 The "metalink:size" element indicates the length of the linked 870 content in octets; it is a hint about the content length of the 871 representation returned when the IRI is mapped to a URI and 872 dereferenced. 874 metalinkSize = 875 element metalink:size { 876 metalinkTextConstruct 877 } 879 4.2.16. The "metalink:type" Element 881 The "metalink:type" element is a Text construct that describes 882 whether the IRI from "metalink:origin" in a Metalink will contain 883 dynamic updated Metalinks or static content that is not updated. 885 metalinkType = 886 element metalink:type { 887 "static" | "dynamic" 888 } 890 4.2.17. The "metalink:updated" Element 892 The "metalink:updated" element is a Date construct indicating the 893 most recent instant in time when a Metalink was modified in a way the 894 publisher considers significant. Therefore, not all modifications 895 necessarily result in a changed metalink:updated value. 897 metalinkUpdated = 898 element metalink:updated { 899 metalinkDateConstruct 900 } 902 Publishers MAY change the value of this element over time. 904 4.2.18. The "metalink:url" Element 906 The "metalink:url" element contains the IRI of a file. All IRIs MUST 907 lead to identical files. 909 metalinkURL = 910 element metalink:url { 911 metalinkCommonAttributes, 912 attribute location { xsd:string { 913 minLength = "2" maxLength="2"} 914 }?, 915 attribute preference { xsd:integer }?, 916 metalinkUri 917 }+ 919 4.2.18.1. The "preference" Attribute 921 metalink:url elements MAY have a preference attribute, whose value 922 MUST be a number from 1 to 100 for priority, with 100 used first and 923 1 used last. Multiple metalink:url elements can have the same 924 preference, i.e. ten mirrors could have preference="100". 926 4.2.18.2. The "location" Attribute 928 metalink:url elements MAY have a "location" attribute, which is a 929 [ISO3166] alpha-2 two letter country code for the geographical 930 location of the physical server an IRI is used to access. 932 4.2.19. The "metalink:version" Element 934 The "metalink:version" element is a Text construct that conveys a 935 human-readable version for a file. The version of OpenOffice.org 3.0 936 would be "3.0". 938 metalinkVersion = 939 element metalink:version { 940 metalinkTextConstruct 941 } 943 5. Securing Metalink Documents 945 Because Metalink is an XML-based format, existing XML security 946 mechanisms can be used to secure its content. 948 Producers of Metalinks may have sound reasons for signing otherwise- 949 unprotected content. For example, a merchant might digitally sign a 950 Metalink that lists a file download to verify its origin. Other 951 merchants may wish to sign and encypt Metalinks that list digital 952 songs that have been purchased. Of course, many other examples exist 953 as well. 955 The algorithm requirements in this section pertain to the Metalink 956 Processor. They require that a recipient, at a minimum, be able to 957 handle messages that use the specified cryptographic algorithms. 958 These requirements do not limit the algorithms that the sender can 959 choose. 961 Metalink Processors that verify signed Metalink Documents MUST at 962 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 964 6. Extending Metalink 966 6.1. Extensions from Non-Metalink Vocabularies 968 This specification describes Metalink's XML markup vocabulary. 969 Markup from other vocabularies ("foreign markup") can be used in an 970 Metalink Document. 972 6.2. Extensions to the Metalink Vocabulary 974 The Metalink namespace is reserved for future forward-compatible 975 revisions of Metalink. Future versions of this specification could 976 add new elements and attributes to the Metalink markup vocabulary. 977 Software written to conform to this version of the specification will 978 not be able to process such markup correctly and, in fact, will not 979 be able to distinguish it from markup error. For the purposes of 980 this discussion, unrecognized markup from the Metalink vocabulary 981 will be considered "foreign markup". 983 6.3. Processing Foreign Markup 985 Metalink Processors that encounter foreign markup in a location that 986 is legal according to this specification MUST NOT stop processing or 987 signal an error. It might be the case that the Metalink Processor is 988 able to process the foreign markup correctly and does so. Otherwise, 989 such markup is termed "unknown foreign markup". 991 When unknown foreign markup is encountered as a child of metalink: 992 file, metalink:metalink, Metalink Processors MAY bypass the markup 993 and any textual content and MUST NOT change their behavior as a 994 result of the markup's presence. 996 When unknown foreign markup is encountered in a Text Construct, 997 software SHOULD ignore the markup and process any text content of 998 foreign elements as though the surrounding markup were not present. 1000 6.4. Extension Elements 1002 Metalink allows foreign markup anywhere in an Metalink document, 1003 except where it is explicitly forbidden. Child elements of metalink: 1004 file and metalink:metalink are considered Metadata elements and are 1005 described below. Child elements of Person constructs are considered 1006 to apply to the construct. The role of other foreign markup is 1007 undefined by this specification. 1009 6.4.1. Simple Extension Elements 1011 A Simple Extension element MUST NOT have any attributes or child 1012 elements. The element MAY contain character data or be empty. 1013 Simple Extension elements are not Language-Sensitive. 1015 simpleExtensionElement = 1016 element * - metalink:* { 1017 text 1018 } 1020 The element can be interpreted as a simple property (or name/value 1021 pair) of the parent element that encloses it. The pair consisting of 1022 the namespace-URI of the element and the local name of the element 1023 can be interpreted as the name of the property. The character data 1024 content of the element can be interpreted as the value of the 1025 property. If the element is empty, then the property value can be 1026 interpreted as an empty string. 1028 6.4.2. Structured Extension Elements 1030 The root element of a Structured Extension element MUST have at least 1031 one attribute or child element. It MAY have attributes, it MAY 1032 contain well-formed XML content (including character data), or it MAY 1033 be empty. Structured Extension elements are Language-Sensitive. 1035 structuredExtensionElement = 1036 element * - metalink:* { 1037 (attribute * { text }+, 1038 (text|anyElement)*) 1039 | (attribute * { text }*, 1040 (text?, anyElement+, (text|anyElement)*)) 1041 } 1043 The structure of a Structured Extension element, including the order 1044 of its child elements, could be significant. 1046 This specification does not provide an interpretation of a Structured 1047 Extension element. The syntax of the XML contained in the element 1048 (and an interpretation of how the element relates to its containing 1049 element) is defined by the specification of the Metalink extension. 1051 7. IANA Considerations 1053 7.1. XML Namespace Registration 1055 This document makes use of the XML registry specified in [RFC3688]. 1056 Accordingly, IANA has made the following registration: 1058 Registration request for the Metalink namespace: 1060 URI: urn:ietf:params:xml:ns:metalink 1062 Registrant Contact: See the "Author's Address" section of this 1063 document. 1065 XML: None. Namespace URIs do not represent an XML specification. 1067 7.2. application/metalink+xml MIME type 1069 A Metalink Document, when serialized as XML 1.0, can be identified 1070 with the following media type: 1072 MIME media type name: application 1073 MIME subtype name: metalink+xml 1074 Mandatory parameters: None. 1075 Optional parameters: 1076 "charset": This parameter has semantics identical to the charset 1077 parameter of the "application/xml" media type as specified in 1078 [RFC3023]. 1079 Encoding considerations: Identical to those of "application/xml" as 1080 described in [RFC3023], Section 3.2. 1081 Security considerations: As defined in this specification. 1082 In addition, as this media type uses the "+xml" convention, it 1083 shares the same security considerations as described in [RFC3023], 1084 Section 10. 1085 Interoperability considerations: There are no known interoperability 1086 issues. 1087 Published specification: This specification. 1088 Applications that use this media type: No known applications 1089 currently use this media type. 1091 Additional information: 1093 Magic number(s): As specified for "application/xml" in [RFC3023], 1094 Section 3.2. 1095 File extension: .metalink 1096 Fragment identifiers: As specified for "application/xml" in 1097 [RFC3023], Section 5. 1098 Base URI: As specified in [RFC3023], Section 6. 1099 Macintosh File Type code: TEXT 1100 Person and email address to contact for further information: Anthony 1101 Bryan 1102 Intended usage: COMMON 1103 Author/Change controller: IESG 1105 8. Security Considerations 1107 Publishers are encouraged to offer Metalink documents via 1108 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1109 are also encouraged to include digital signatures of the files within 1110 the Metalink Documents if they are available. 1112 8.1. URIs and IRIs 1114 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1115 and Section 8 of [RFC3987] for security considerations related to 1116 their handling and use. 1118 8.2. Spoofing 1120 There is potential for spoofing attacks where the attacker publishes 1121 Metalinks with false information. Malicious publishers might create 1122 Metalink Documents containing inaccurate information anywhere in the 1123 document. At best, this could deceive unaware downloaders that they 1124 are downloading a malicious or worthless file. At worst, malicious 1125 publishers could attempt a distributed denial of service attack by 1126 inserting unrelated IRIs into Metalink Documents. 1128 8.3. Cryptographic Hashes 1130 Currently, some of the hash types defined in the IANA registry named 1131 "Hash Function Textual Names" are considered insecure. These include 1132 the whole Message Digest family of algorithms which are not suitable 1133 for cryptographically strong verification. Malicious people could 1134 provide files that appear to be identical to another file because of 1135 a collision, i.e. the weak cryptographic hashes of the intended file 1136 and a substituted malicious file could match. 1138 If a Metalink Document contains verification information, it SHOULD 1139 implement "sha-1" which is SHA1, as specified in [RFC3174]. It MAY 1140 also include other verification algorithms. 1142 8.4. Signing 1144 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1145 subject to the security considerations implied by its use. This 1146 addresses the issue of spoofing. 1148 Digital signatures provide authentication, message integrity, and 1149 non-repudiation with proof of origin. 1151 9. References 1153 9.1. Normative References 1155 [BITTORRENT] 1156 Cohen, B., "The BitTorrent Protocol Specification", 1157 BITTORRENT 11031, February 2008, 1158 . 1160 [ISO3166] International Organization for Standardization, "ISO 3166: 1161 1988 (E/F) - Codes for the representation of names of 1162 countries - The International Organization for 1163 Standardization, 3rd edition, 1988-08-15.", ISO Standard 1164 3166, 1988. 1166 [ISO639-2] 1167 International Organization for Standardization, "ISO 639- 1168 2:1998 - Codes for the representation of names of 1169 languages -- Part 2: Alpha-3 code - edition 1, 1170 1998-11-01, 66 pages, prepared by a Joint Working Group of 1171 ISO TC46/SC4 and ISO TC37/SC2.", ISO Standard 639-2, 1998. 1173 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1174 and E. Maler, "Extensible Markup Language (XML) 1.0 1175 (Fourth Edition)", World Wide Web Consortium 1176 Recommendation REC-xml-20060816, August 2006, 1177 . 1179 [REC-xml-infoset] 1180 Cowan, J. and R. Tobin, "XML Information Set (Second 1181 Edition)", World Wide Web Consortium Recommendation REC- 1182 xml-infoset-20040204, February 2004, 1183 . 1185 [REC-xml-names] 1186 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1187 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1188 Consortium Recommendation REC-xml-names-20060816, 1189 August 2006, 1190 . 1192 [REC-xmlbase] 1193 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1194 June 2001, 1195 . 1197 [REC-xmldsig-core] 1198 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1199 Syntax and Processing", World Wide Web Consortium 1200 Recommendation REC-xmldsig-core-20020212, February 2002, 1201 . 1203 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1204 Requirement Levels", BCP 14, RFC 2119, March 1997. 1206 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1208 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1209 Types", RFC 3023, January 2001. 1211 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1212 (SHA1)", RFC 3174, September 2001. 1214 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1215 Timestamps", RFC 3339, July 2002. 1217 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1218 January 2004. 1220 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1221 Resource Identifier (URI): Generic Syntax", STD 66, 1222 RFC 3986, January 2005. 1224 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1225 Identifiers (IRIs)", RFC 3987, January 2005. 1227 9.2. Informative References 1229 [ISO.8601.1988] 1230 International Organization for Standardization, "Data 1231 elements and interchange formats - Information interchange 1232 - Representation of dates and times", ISO Standard 8601, 1233 June 1988. 1235 [RELAX-NG] 1236 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1240 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1241 Format", RFC 4287, December 2005. 1243 [W3C.NOTE-datetime-19980827] 1244 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1245 NOTE NOTE-datetime-19980827, August 1998, 1246 . 1248 [W3C.REC-xmlschema-2-20041028] 1249 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1250 Second Edition", W3C REC REC-xmlschema-2-20041028, 1251 October 2004, 1252 . 1254 Appendix A. Acknowledgements and Contributors 1256 The layout and content of this document relies heavily on work 1257 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1259 The following people contributed to preliminary versions of this 1260 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1261 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1262 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1263 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1264 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1265 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1266 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1267 Hoffman, Eran Hammer-Lahav, and Mark Nottingham. The content and 1268 concepts within are a product of the Metalink community. 1270 The Metalink community has dozens of contributors who proposed ideas 1271 and wording for this document, or contributed to the evolution of 1272 Metalink, including: 1274 Nicolas Alvarez, Patrick Ruckstuhl, Sebastien Willemijns, Micah 1275 Cowan, Yazsoft, Lukas Appelhans, KGet developers, FDM Team, Orbit 1276 Team, Arne Babenhauserheide, Mathias Berchtold, Xienzhenyu and 1277 TheWorld Browser Team, Xi Software, Bridget and Ethan Fletcher, Ruben 1278 Kerkhof, Agostino Russo, Salvatore and Robin Musumeci, Steve and 1279 Rachel Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave Winquist, 1280 Bob Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve Kleisath, 1281 Chad Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, Derick 1282 Cordoba, Ryan Alexander, John Sowder, Sandra Amisano, Tom Mainville, 1283 Janie Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus Hofmann, 1284 Dan Connolly, Tim Berners-Lee, Louis Suarez-Potts, Ross Smith, Jeff 1285 Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan Svedberg, Dedric 1286 Carter, James Antill, Debi Goulding, the Anthony Family, the Bryan 1287 Family, Juanita Anthony and Zimmy Bryan. 1289 Appendix B. RELAX NG Compact Schema 1291 This appendix is informative. 1293 The Relax NG schema explicitly excludes elements in the Metalink 1294 namespace that are not defined in this revision of the specification. 1295 Requirements for Metalink Processors encountering such markup are 1296 given in Sections 6.2 and 6.3. 1298 # -*- rnc -*- 1299 # RELAX NG Compact Syntax Grammar for the 1300 # Metalink Format Specification Version 2 1302 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1303 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1305 # Common attributes 1307 metalinkCommonAttributes = 1308 attribute xml:base { metalinkUri }?, 1309 attribute xml:lang { metalinkLanguageTag }?, 1310 undefinedAttribute* 1312 # Text Constructs 1314 metalinkTextConstruct = 1315 metalinkCommonAttributes, 1316 text 1318 # Date Construct 1320 metalinkDateConstruct = 1321 metalinkCommonAttributes, 1322 xsd:dateTime 1324 start = 1325 element metalink:metalink { 1326 element metalink:generator { 1327 attribute uri { metalinkUri }?, 1328 attribute version { text }?, 1329 metalinkTextConstruct 1330 } 1331 element metalink:origin { metalinkUri }?, 1332 element metalink:type { "static" | "dynamic" }?, 1333 element metalink:published { metalinkDateConstruct }?, 1334 element metalink:updated { metalinkDateConstruct }?, 1335 element metalink:files { 1336 element metalink:file { 1337 attribute name { metalinkTextConstruct }, 1338 element metalink:identity { metalinkTextConstruct }?, 1339 element metalink:version { metalinkTextConstruct }?, 1340 element metalink:size { xsd:integer }?, 1341 element metalink:description { metalinkTextConstruct }?, 1342 element metalink:license { 1343 attribute uri { metalinkUri }?, 1344 attribute name { metalinkTextConstruct }?, 1345 }?, 1346 element metalink:logo { metalinkUri }?, 1347 element metalink:publisher { 1348 attribute uri { metalinkUri }?, 1349 attribute name { metalinkTextConstruct }?, 1350 }?, 1351 element metalink:language { metalinkTextConstruct }?, 1352 element metalink:copyright { metalinkTextConstruct }?, 1353 element metalink:license { metalinkTextConstruct }?, 1354 element metalink:os { metalinkTextConstruct }?, 1355 element metalink:verification { 1356 hash+, 1357 element metalink:pieces { 1358 attribute length { metalinkTextConstruct }, 1359 attribute type { metalinkTextConstruct }, 1360 hash+ 1361 }+, 1362 element metalink:signature { 1363 attribute type { "pgp" }, 1364 text 1365 }+ 1366 }?, 1367 element metalink:resources { 1368 element metalink:metadata { 1369 attribute preference { xsd:integer }?, 1370 attribute type { metalinkTextConstruct }, 1371 metalinkUri 1372 element metalink:url { 1373 attribute location { xsd:string { 1374 minLength = "2" maxLength="2"} 1375 }?, 1376 attribute preference { xsd:integer }?, 1377 metalinkUri 1378 }+ 1379 } 1380 }+ 1381 } 1382 } 1383 hash = 1384 element metalink:hash { 1385 attribute piece { metalinkTextConstruct }?, 1386 attribute type { metalinkTextConstruct }, 1387 text 1388 } 1390 # As defined in RFC 3066 1391 metalinkLanguageTag = xsd:string { 1392 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1393 } 1395 # Unconstrained; it's not entirely clear how IRI fit into 1396 # xsd:anyURI so let's not try to constrain it here 1397 metalinkUri = text 1399 # Simple Extension 1401 simpleExtensionElement = 1402 element * - metalink:* { 1403 text 1404 } 1406 # Structured Extension 1408 structuredExtensionElement = 1409 element * - metalink:* { 1410 (attribute * { text }+, 1411 (text|anyElement)*) 1412 | (attribute * { text }*, 1413 (text?, anyElement+, (text|anyElement)*)) 1414 } 1416 # Other Extensibility 1418 extensionElement = 1419 simpleExtensionElement | structuredExtensionElement 1421 undefinedAttribute = 1422 attribute * - (xml:base | xml:lang | local:*) { text } 1424 undefinedContent = (text|anyForeignElement)* 1426 anyElement = 1427 element * { 1428 (attribute * { text } 1429 | text 1430 | anyElement)* 1431 } 1433 anyForeignElement = 1434 element * - metalink:* { 1435 (attribute * { text } 1436 | text 1437 | anyElement)* 1438 } 1440 # EOF 1442 Appendix C. Document History (to be removed by RFC Editor before 1443 publication) 1445 [[ to be removed by the RFC editor before publication as an RFC. ]] 1447 Updated versions can be found at 1448 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1449 in Subversion at 1450 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1452 Known issues concerning this draft: 1453 o Section 4.2.14 - Current Metalinks are limited to including PGP 1454 signatures of files listed inside the Metalinks, but not other 1455 types of digital signatures. (This does not concern signing of 1456 Metalinks themselves, that is covered in Section 5: Securing 1457 Metalink Documents and Section 8.4: Security Considerations: 1458 Signing). We need to allow other types of file signatures, 1459 besides PGP, to be referenced in Metalinks. 1461 -07 : June 18, 2009. 1462 o This ID describes the Metalink document format/schema. 1463 o Remove "Client Implementation Considerations" section. 1464 o Expand "Known issues" section of Document History. 1466 -06 : March 3, 2009. 1467 o Add authors and this Document History section. 1469 -05 : January 13, 2009. 1471 o Clarifications. 1473 -04 : December 31, 2008. 1474 o New IPR notice as required by IETF. 1475 o Correct "metalink:pieces" Element text. 1476 o Add hash examples. 1477 o Slim down "Securing Metalink Documents" section. 1478 o Recommend at least SHA1. 1480 -03 : September 19, 2008. 1481 o New namespace - urn:ietf:params:xml:ns:metalink 1482 o Use the IANA registry named "Operating System Names" to define 1483 values for OS types. 1484 o Add "Client Implementation Considerations" section, which includes 1485 Content Negotiation. 1487 -02 : September 4, 2008. 1488 o Use the IANA registry named "Hash Function Textual Names" for hash 1489 types. 1490 o metadata Element for listing .torrent, .metalink, etc. 1491 o Remove type attribute for url Element. 1493 -01 : August 28, 2008. 1494 o Clarify directory info in name attribute, hash types, add text for 1495 preference attribute. 1497 -00 : August 23, 2008. 1498 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1499 3.0 specification. 1501 Index 1503 A 1504 application/metalink+xml Media Type 24 1506 C 1507 copyright XML element 14 1509 D 1510 description XML element 14 1512 F 1513 file XML element 11 1514 files XML element 10 1516 G 1517 generator XML element 14 1518 Grammar 1519 metalinkCommonAttributes 7 1520 metalinkCopyright 14 1521 metalinkDateConstruct 8 1522 metalinkDescription 14 1523 metalinkFile 11 1524 metalinkFiles 10 1525 metalinkGenerator 14 1526 metalinkHash 15 1527 metalinkIdentity 16 1528 metalinkLanguage 17 1529 metalinkLicense 17 1530 metalinkLogo 17 1531 metalinkMetalink 9 1532 metalinkOrigin 18 1533 metalinkOS 18 1534 metalinkPieces 13 1535 metalinkPublished 19 1536 metalinkPublisher 19 1537 metalinkResources 12 1538 metalinkSignature 19 1539 metalinkSize 20 1540 metalinkTextConstruct 7 1541 metalinkType 20 1542 metalinkUpdated 20 1543 metalinkURL 18, 21 1544 metalinkVerification 13 1545 metalinkVersion 21 1546 simpleExtensionElement 23 1547 structuredExtensionElement 23 1549 H 1550 hash XML element 15 1552 I 1553 identity XML element 16 1555 L 1556 language XML element 17 1557 license XML element 17 1558 logo XML element 17 1560 M 1561 Media Type 1562 application/metalink+xml 24 1563 metadata XML element 17 1564 metalink XML element 9 1565 metalinkCommonAttributes grammar production 7 1566 metalinkCopyright grammar production 14 1567 metalinkDateConstruct grammar production 8 1568 metalinkDescription grammar production 14 1569 metalinkFile grammar production 11 1570 metalinkFiles grammar production 10 1571 metalinkGenerator grammar production 14 1572 metalinkHash grammar production 15 1573 metalinkIdentity grammar production 16 1574 metalinkLanguage grammar production 17 1575 metalinkLicense grammar production 17 1576 metalinkLogo grammar production 17 1577 metalinkMetalink grammar production 9 1578 metalinkOrigin grammar production 18 1579 metalinkOS grammar production 18 1580 metalinkPieces grammar production 13 1581 metalinkPublished grammar production 19 1582 metalinkPublisher grammar production 19 1583 metalinkResources grammar production 12 1584 metalinkSignature grammar production 19 1585 metalinkSize grammar production 20 1586 metalinkTextConstruct grammar production 7 1587 metalinkType grammar production 20 1588 metalinkUpdated grammar production 20 1589 metalinkURL grammar production 18, 21 1590 metalinkVerification grammar production 13 1591 metalinkVersion grammar production 21 1593 O 1594 origin XML element 18 1595 os XML element 18 1597 P 1598 pieces XML element 13 1599 published XML element 19 1600 publisher XML element 19 1602 R 1603 resources XML element 12 1605 S 1606 signature XML element 19 1607 simpleExtensionElement grammar production 23 1608 size XML element 20 1609 structuredExtensionElement grammar production 23 1611 T 1612 type XML element 20 1614 U 1615 updated XML element 20 1616 url XML element 20 1618 V 1619 verification XML element 13 1620 version XML element 21 1622 X 1623 XML Elements 1624 copyright 14 1625 description 14 1626 entry 11 1627 files 10 1628 generator 14 1629 hash 15 1630 identity 16 1631 language 17 1632 license 17 1633 logo 17 1634 metadata 17 1635 metalink 9 1636 origin 18 1637 os 18 1638 pieces 13 1639 published 19 1640 publisher 19 1641 resources 12 1642 signature 19 1643 size 20 1644 type 20 1645 updated 20 1646 url 20 1647 verification 13 1648 version 21 1650 Authors' Addresses 1652 Anthony Bryan (editor) 1653 Metalinker Project 1655 Email: anthonybryan@gmail.com 1656 URI: http://www.metalinker.org 1657 Tatsuhiro Tsujikawa (editor) 1658 Metalinker Project 1660 Email: tatsuhiro.t@gmail.com 1661 URI: http://aria2.sourceforge.net 1663 Neil McNab (editor) 1664 Metalinker Project 1666 Email: nabber00@gmail.com 1667 URI: http://www.nabber.org 1669 Peter Poeml (editor) 1670 Novell, Inc. 1672 Email: info@mirrorbrain.org 1673 URI: http://www.mirrorbrain.org/