idnits 2.17.1 draft-bryan-metalink-08.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.ii or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 4, 2009) is 5403 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: January 5, 2010 Metalinker Project 6 P. Poeml, Ed. 7 Novell, Inc. 8 July 4, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-08 13 Status of this Memo 15 This Internet-Draft is submitted to IETF in full conformance with the 16 provisions of BCP 78 and BCP 79. This document may contain material 17 from IETF Documents or IETF Contributions published or made publicly 18 available before November 10, 2008. The person(s) controlling the 19 copyright in some of this material may not have granted the IETF 20 Trust the right to allow modifications of such material outside the 21 IETF Standards Process. Without obtaining an adequate license from 22 the person(s) controlling the copyright in such materials, this 23 document may not be modified outside the IETF Standards Process, and 24 derivative works of it may not be created outside the IETF Standards 25 Process, except to format it for publication as an RFC or to 26 translate it into languages other than English. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/ietf/1id-abstracts.txt. 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html. 44 This Internet-Draft will expire on January 5, 2010. 46 Copyright Notice 48 Copyright (c) 2009 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents in effect on the date of 53 publication of this document (http://trustee.ietf.org/license-info). 54 Please review these documents carefully, as they describe your rights 55 and restrictions with respect to this document. 57 Abstract 59 This document specifies Metalink Documents, an XML-based download 60 description format. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 65 1.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 5 67 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 5 68 2. Metalink Documents . . . . . . . . . . . . . . . . . . . . . . 6 69 3. Common Metalink Constructs . . . . . . . . . . . . . . . . . . 7 70 3.1. Text Constructs . . . . . . . . . . . . . . . . . . . . . 7 71 3.1.1. Text . . . . . . . . . . . . . . . . . . . . . . . . . 7 72 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 8 73 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 8 74 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 8 75 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 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 . . . . . . . . . . . 16 88 4.2.7. The "metalink:license" Element . . . . . . . . . . . . 16 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 . . . . . . . . . . . 18 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 . . . . . . . . . . . . . 19 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 . . . . . . . . . . . . . . . . . . . . 22 107 6.4.1. Simple Extension Elements . . . . . . . . . . . . . . 23 108 6.4.2. Structured Extension Elements . . . . . . . . . . . . 23 109 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 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 metalink:metalink elements SHOULD contain exactly one metalink: 372 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 generating 628 agent name and version, separated by a "/", used to generate a 629 Metalink Document, for debugging and other purposes. 631 metalinkGenerator = element metalink:generator { 632 metalinkCommonAttributes, 633 text 634 } 636 The content of this element, when present, MUST be a string that is a 637 human-readable name and version, separated by a "/", for the 638 generating agent. For example, "MirrorBrain/2.8.1", where 639 "MirrorBrain" is the name and "2.8.1" is the version. Entities such 640 as "&" and "<" represent their corresponding characters ("&" 641 and "<" respectively), not markup. 643 4.2.4. The "metalink:hash" Element 645 The "metalink:hash" element is a Text construct that conveys a hash 646 for a file. All hashes are encoded in lowercase hexadecimal format. 648 metalinkHash = 649 element metalink:hash { 650 attribute piece { xsd:integer }?, 651 attribute type { metalinkTextConstruct }, 652 text 653 } 655 Metalinks can contain multiples hashes for a complete file, for 656 example both SHA-1 and SHA-256. 658 ... 659 660 a97fcf6ba9358f8a6f62beee4421863d3e52b080 661 fc87941af7fd7f03e53b34af393f4c14923d74 662 825f51116ff591336af4880227 663 664 ... 666 Metalinks can also contain hashes for individual pieces of a file. 668 ... 669 670 a97fcf6ba9358f8a6f62beee4421863d3e52b080 671 fc87941af7fd7f03e53b34af393f4c14923d74 672 825f51116ff591336af4880227 673 674 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 675 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 676 3e84219096435c34e092b17b70a011771c52d87a 677 67183e4c3ab892d3ebe8326b7d79eb62d077f487 678 679 680 ... 682 metalink:hash elements MUST have a "type" attribute or a "piece" 683 attribute. metalink:hash elements with a "type" attribute contain a 684 hash of the whole file. metalink:hash elements with a "piece" 685 attribute contain a hash for that specific piece or chunk of the 686 file. 688 4.2.4.1. The "type" Attribute 690 The IANA registry named "Hash Function Textual Names" defines values 691 for hash types. If a Metalink Document contains verification 692 information, it SHOULD implement "sha-1" which is SHA1, as specified 693 in [RFC3174]. It MAY also include other verification algorithms. 695 4.2.4.2. The "piece" Attribute 697 metalink:hash elements MAY have a "piece" attribute, only when they 698 are a sub element of metalink:pieces. The value of "piece" starts at 699 "0" and increases, depending on the "length" attribute of metalink: 700 pieces and the size of the file. Depending on the size of a file, 701 the last piece may not be the same size as the others. 703 4.2.5. The "metalink:identity" Element 705 The "metalink:identity" element is a Text construct that conveys a 706 human-readable identity for a file. The identity of OpenOffice.org 707 3.0 would be "OpenOffice.org". 709 metalinkIdentity = 710 element metalink:identity { 711 metalinkTextConstruct 712 } 714 4.2.6. The "metalink:language" Element 716 The "metalink:language" element is a Text construct that conveys a 717 code for the language of a file, per [ISO639-2]. 719 metalinkLanguage = 720 element metalink:language { 721 metalinkTextConstruct 722 } 724 4.2.7. The "metalink:license" Element 726 The "metalink:license" element is a Text construct that conveys a 727 human-readable license name for a file. 729 metalinkLicense = 730 element metalink:license { 731 metalinkCommonAttributes, 732 attribute uri { metalinkUri }?, 733 attribute name { metalinkTextConstruct }?, 734 } 736 The metalink:license element MAY have a "uri" attribute whose value 737 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 738 URI (mapped from an IRI, if necessary) SHOULD produce a 739 representation that is relevant to that agent. 741 The metalink:license element MAY have a "name" attribute that 742 indicates the name of the license. 744 4.2.8. The "metalink:logo" Element 746 The "metalink:logo" element's content is an IRI reference [RFC3987] 747 that identifies an image that provides visual identification for a 748 file. 750 metalinkLogo = element metalink:logo { 751 metalinkCommonAttributes, 752 (metalinkUri) 753 } 755 The image SHOULD have an aspect ratio of one (horizontal) to one 756 (vertical) and SHOULD be suitable for presentation at a small size. 758 4.2.9. The "metalink:metadata" Element 760 The "metalink:metadata" element contains the IRI of metadata about a 761 resource to download. For example, this could be the IRI of a 762 BitTorrent .torrent file or a Metalink Document. Note that the 763 information in the metalink:verification element does not apply to 764 these files. 766 metalinkMetadata = 767 element metalink:metadata { 768 metalinkCommonAttributes, 769 attribute preference { xsd:integer }?, 770 attribute type { metalinkTextConstruct }, 771 metalinkUri 772 }+ 774 4.2.9.1. The "preference" Attribute 776 metalink:metadata elements MAY have a preference attribute, whose 777 value MUST be a number from 1 to 100 for priority, with 100 used 778 first and 1 used last. See the "preference" attribute of the 779 metalink:url element for more information. 781 4.2.9.2. The "type" Attribute 783 metalink:metadata elements MUST have a "type" attribute that 784 indicates the MIME type of the metadata available at the IRI. In the 785 case of BitTorrent as specified in [BITTORRENT], the value "torrent" 786 is required. Types without "/" are reserved. Currently, "torrent" 787 is the only reserved value. 789 4.2.10. The "metalink:origin" Element 791 The "metalink:origin" element is an IRI where the Metalink Document 792 was originally published. If metalink:type is "dynamic", then 793 updated versions of the Metalink can be found at this IRI. 795 metalinkOrigin = element metalink:origin { 796 metalinkCommonAttributes, 797 (metalinkUri) 798 } 800 4.2.11. The "metalink:os" Element 802 The "metalink:os" element is a Text construct that conveys a human- 803 readable Operating System for a file. The IANA registry named 804 "Operating System Names" defines values for OS types. 806 metalinkOS = 807 element metalink:os { 808 metalinkTextConstruct 809 } 811 4.2.12. The "metalink:published" Element 813 The "metalink:published" element is a Date construct indicating an 814 instant in time associated with an event early in the life cycle of 815 the entry. 817 metalinkPublished = 818 element metalink:published { 819 metalinkDateConstruct 820 } 822 Typically, metalink:published will be associated with the initial 823 creation or first availability of the resource. 825 4.2.13. The "metalink:publisher" Element 827 The "metalink:publisher" element indicates a group or other entity 828 which has published the file. 830 metalinkPublisher = 831 element metalink:publisher { 832 metalinkCommonAttributes, 833 attribute uri { metalinkUri }?, 834 attribute name { metalinkTextConstruct }?, 835 } 837 The metalink:publisher element MAY have a "uri" attribute whose value 838 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 839 URI (mapped from an IRI, if necessary) SHOULD produce a 840 representation that is relevant to that agent. 842 The metalink:publisher element MAY have a "name" attribute that 843 indicates the name of the publisher. 845 4.2.14. The "metalink:signature" Element 847 The "metalink:signature" element is a Text construct that conveys a 848 digital signature for a file described in a Metalink Document. 850 metalinkSignature = 851 element metalink:signature { 852 attribute type { "pgp" }, 853 metalinkTextConstruct 854 } 856 4.2.14.1. The "type" Attribute 858 metalink:signature elements MUST have a "type" attribute. The 859 initial value of "type" is the string that is non-empty and matches 860 "pgp". It may be useful to extend Metalink documents with new types 861 of digital signatures, so unknown types are allowed. 863 4.2.15. The "metalink:size" Element 865 The "metalink:size" element indicates the length of the linked 866 content in octets; it is a hint about the content length of the 867 representation returned when the IRI is mapped to a URI and 868 dereferenced. 870 metalinkSize = 871 element metalink:size { 872 metalinkTextConstruct 873 } 875 4.2.16. The "metalink:type" Element 877 The "metalink:type" element is a Text construct that describes 878 whether the IRI from "metalink:origin" in a Metalink will contain 879 dynamic updated Metalinks or static content that is not updated. 881 metalinkType = 882 element metalink:type { 883 "static" | "dynamic" 884 } 886 4.2.17. The "metalink:updated" Element 888 The "metalink:updated" element is a Date construct indicating the 889 most recent instant in time when a Metalink was modified in a way the 890 publisher considers significant. Therefore, not all modifications 891 necessarily result in a changed metalink:updated value. 893 metalinkUpdated = 894 element metalink:updated { 895 metalinkDateConstruct 896 } 898 Publishers MAY change the value of this element over time. 900 4.2.18. The "metalink:url" Element 902 The "metalink:url" element contains the IRI of a file. All IRIs 903 contained in each metalink:resources element SHOULD lead to identical 904 files. 906 metalinkURL = 907 element metalink:url { 908 metalinkCommonAttributes, 909 attribute location { xsd:string { 910 minLength = "2" maxLength="2"} 911 }?, 912 attribute preference { xsd:integer }?, 913 metalinkUri 914 }+ 916 4.2.18.1. The "preference" Attribute 918 metalink:url elements MAY have a preference attribute, whose value 919 MUST be a number from 1 to 100 for priority, with 100 used first and 920 1 used last. Multiple metalink:url elements can have the same 921 preference, i.e. ten mirrors could have preference="100". 923 4.2.18.2. The "location" Attribute 925 metalink:url elements MAY have a "location" attribute, which is a 926 [ISO3166] alpha-2 two letter country code for the geographical 927 location of the physical server an IRI is used to access. 929 4.2.19. The "metalink:version" Element 931 The "metalink:version" element is a Text construct that conveys a 932 human-readable version for a file. The version of OpenOffice.org 3.0 933 would be "3.0". 935 metalinkVersion = 936 element metalink:version { 937 metalinkTextConstruct 938 } 940 5. Securing Metalink Documents 942 Because Metalink is an XML-based format, existing XML security 943 mechanisms can be used to secure its content. 945 Producers of Metalinks may have sound reasons for signing otherwise- 946 unprotected content. For example, a merchant might digitally sign a 947 Metalink that lists a file download to verify its origin. Other 948 merchants may wish to sign and encrypt Metalinks that list digital 949 songs that have been purchased. Of course, many other examples are 950 conceivable as well. 952 The algorithm requirements in this section pertain to the Metalink 953 Processor. They require that a recipient, at a minimum, be able to 954 handle messages that use the specified cryptographic algorithms. 955 These requirements do not limit the algorithms that the sender can 956 choose. 958 Metalink Processors that verify signed Metalink Documents MUST at 959 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 961 6. Extending Metalink 963 6.1. Extensions from Non-Metalink Vocabularies 965 This specification describes Metalink's XML markup vocabulary. 966 Markup from other vocabularies ("foreign markup") can be used in an 967 Metalink Document. 969 6.2. Extensions to the Metalink Vocabulary 971 The Metalink namespace is reserved for future forward-compatible 972 revisions of Metalink. Future versions of this specification could 973 add new elements and attributes to the Metalink markup vocabulary. 974 Software written to conform to this version of the specification will 975 not be able to process such markup correctly and, in fact, will not 976 be able to distinguish it from markup error. For the purposes of 977 this discussion, unrecognized markup from the Metalink vocabulary 978 will be considered "foreign markup". 980 6.3. Processing Foreign Markup 982 Metalink Processors that encounter foreign markup in a location that 983 is legal according to this specification MUST NOT stop processing or 984 signal an error. It might be the case that the Metalink Processor is 985 able to process the foreign markup correctly and does so. Otherwise, 986 such markup is termed "unknown foreign markup". 988 When unknown foreign markup is encountered as a child of metalink: 989 file, metalink:metalink, Metalink Processors MAY bypass the markup 990 and any textual content and MUST NOT change their behavior as a 991 result of the markup's presence. 993 When unknown foreign markup is encountered in a Text Construct, 994 software SHOULD ignore the markup and process any text content of 995 foreign elements as though the surrounding markup were not present. 997 6.4. Extension Elements 999 Metalink allows foreign markup anywhere in an Metalink document, 1000 except where it is explicitly forbidden. Child elements of metalink: 1001 file and metalink:metalink are considered Metadata elements and are 1002 described below. Child elements of Person constructs are considered 1003 to apply to the construct. The role of other foreign markup is 1004 undefined by this specification. 1006 6.4.1. Simple Extension Elements 1008 A Simple Extension element MUST NOT have any attributes or child 1009 elements. The element MAY contain character data or be empty. 1010 Simple Extension elements are not Language-Sensitive. 1012 simpleExtensionElement = 1013 element * - metalink:* { 1014 text 1015 } 1017 The element can be interpreted as a simple property (or name/value 1018 pair) of the parent element that encloses it. The pair consisting of 1019 the namespace-URI of the element and the local name of the element 1020 can be interpreted as the name of the property. The character data 1021 content of the element can be interpreted as the value of the 1022 property. If the element is empty, then the property value can be 1023 interpreted as an empty string. 1025 6.4.2. Structured Extension Elements 1027 The root element of a Structured Extension element MUST have at least 1028 one attribute or child element. It MAY have attributes, it MAY 1029 contain well-formed XML content (including character data), or it MAY 1030 be empty. Structured Extension elements are Language-Sensitive. 1032 structuredExtensionElement = 1033 element * - metalink:* { 1034 (attribute * { text }+, 1035 (text|anyElement)*) 1036 | (attribute * { text }*, 1037 (text?, anyElement+, (text|anyElement)*)) 1038 } 1040 The structure of a Structured Extension element, including the order 1041 of its child elements, could be significant. 1043 This specification does not provide an interpretation of a Structured 1044 Extension element. The syntax of the XML contained in the element 1045 (and an interpretation of how the element relates to its containing 1046 element) is defined by the specification of the Metalink extension. 1048 7. IANA Considerations 1049 7.1. XML Namespace Registration 1051 This document makes use of the XML registry specified in [RFC3688]. 1052 Accordingly, IANA has made the following registration: 1054 Registration request for the Metalink namespace: 1056 URI: urn:ietf:params:xml:ns:metalink 1058 Registrant Contact: See the "Author's Address" section of this 1059 document. 1061 XML: None. Namespace URIs do not represent an XML specification. 1063 7.2. application/metalink+xml MIME type 1065 A Metalink Document, when serialized as XML 1.0, can be identified 1066 with the following media type: 1068 MIME media type name: application 1069 MIME subtype name: metalink+xml 1070 Mandatory parameters: None. 1071 Optional parameters: 1072 "charset": This parameter has semantics identical to the charset 1073 parameter of the "application/xml" media type as specified in 1074 [RFC3023]. 1075 Encoding considerations: Identical to those of "application/xml" as 1076 described in [RFC3023], Section 3.2. 1077 Security considerations: As defined in this specification. 1078 In addition, as this media type uses the "+xml" convention, it 1079 shares the same security considerations as described in [RFC3023], 1080 Section 10. 1081 Interoperability considerations: There are no known interoperability 1082 issues. 1083 Published specification: This specification. 1084 Applications that use this media type: No known applications 1085 currently use this media type. 1087 Additional information: 1089 Magic number(s): As specified for "application/xml" in [RFC3023], 1090 Section 3.2. 1091 File extension: .metalink 1092 Fragment identifiers: As specified for "application/xml" in 1093 [RFC3023], Section 5. 1095 Base URI: As specified in [RFC3023], Section 6. 1096 Macintosh File Type code: TEXT 1097 Person and email address to contact for further information: Anthony 1098 Bryan 1099 Intended usage: COMMON 1100 Author/Change controller: IESG 1102 8. Security Considerations 1104 Publishers are encouraged to offer Metalink documents via 1105 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1106 are also encouraged to include digital signatures of the files within 1107 the Metalink Documents if they are available. 1109 8.1. URIs and IRIs 1111 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1112 and Section 8 of [RFC3987] for security considerations related to 1113 their handling and use. 1115 8.2. Spoofing 1117 There is potential for spoofing attacks where the attacker publishes 1118 Metalinks with false information. Malicious publishers might create 1119 Metalink Documents containing inaccurate information anywhere in the 1120 document. At best, this could deceive unaware downloaders that they 1121 are downloading a malicious or worthless file. At worst, malicious 1122 publishers could attempt a distributed denial of service attack by 1123 inserting unrelated IRIs into Metalink Documents. 1125 8.3. Cryptographic Hashes 1127 Currently, some of the hash types defined in the IANA registry named 1128 "Hash Function Textual Names" are considered insecure. These include 1129 the whole Message Digest family of algorithms which are not suitable 1130 for cryptographically strong verification. Malicious people could 1131 provide files that appear to be identical to another file because of 1132 a collision, i.e. the weak cryptographic hashes of the intended file 1133 and a substituted malicious file could match. 1135 If a Metalink Document contains verification information, it SHOULD 1136 implement "sha-1" which is SHA1, as specified in [RFC3174]. It MAY 1137 also include other verification algorithms. 1139 8.4. Signing 1141 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1142 subject to the security considerations implied by its use. This 1143 addresses the issue of spoofing. 1145 Digital signatures provide authentication, message integrity, and 1146 non-repudiation with proof of origin. 1148 9. References 1150 9.1. Normative References 1152 [BITTORRENT] 1153 Cohen, B., "The BitTorrent Protocol Specification", 1154 BITTORRENT 11031, February 2008, 1155 . 1157 [ISO3166] International Organization for Standardization, "ISO 3166: 1158 1988 (E/F) - Codes for the representation of names of 1159 countries - The International Organization for 1160 Standardization, 3rd edition, 1988-08-15.", ISO Standard 1161 3166, 1988. 1163 [ISO639-2] 1164 International Organization for Standardization, "ISO 639- 1165 2:1998 - Codes for the representation of names of 1166 languages -- Part 2: Alpha-3 code - edition 1, 1167 1998-11-01, 66 pages, prepared by a Joint Working Group of 1168 ISO TC46/SC4 and ISO TC37/SC2.", ISO Standard 639-2, 1998. 1170 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1171 and E. Maler, "Extensible Markup Language (XML) 1.0 1172 (Fourth Edition)", World Wide Web Consortium 1173 Recommendation REC-xml-20060816, August 2006, 1174 . 1176 [REC-xml-infoset] 1177 Cowan, J. and R. Tobin, "XML Information Set (Second 1178 Edition)", World Wide Web Consortium Recommendation REC- 1179 xml-infoset-20040204, February 2004, 1180 . 1182 [REC-xml-names] 1183 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1184 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1185 Consortium Recommendation REC-xml-names-20060816, 1186 August 2006, 1187 . 1189 [REC-xmlbase] 1190 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1191 June 2001, 1192 . 1194 [REC-xmldsig-core] 1195 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1196 Syntax and Processing", World Wide Web Consortium 1197 Recommendation REC-xmldsig-core-20020212, February 2002, 1198 . 1200 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1201 Requirement Levels", BCP 14, RFC 2119, March 1997. 1203 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1205 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1206 Types", RFC 3023, January 2001. 1208 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1209 (SHA1)", RFC 3174, September 2001. 1211 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1212 Timestamps", RFC 3339, July 2002. 1214 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1215 January 2004. 1217 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1218 Resource Identifier (URI): Generic Syntax", STD 66, 1219 RFC 3986, January 2005. 1221 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1222 Identifiers (IRIs)", RFC 3987, January 2005. 1224 9.2. Informative References 1226 [ISO.8601.1988] 1227 International Organization for Standardization, "Data 1228 elements and interchange formats - Information interchange 1229 - Representation of dates and times", ISO Standard 8601, 1230 June 1988. 1232 [RELAX-NG] 1233 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1237 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1238 Format", RFC 4287, December 2005. 1240 [W3C.NOTE-datetime-19980827] 1241 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1242 NOTE NOTE-datetime-19980827, August 1998, 1243 . 1245 [W3C.REC-xmlschema-2-20041028] 1246 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1247 Second Edition", W3C REC REC-xmlschema-2-20041028, 1248 October 2004, 1249 . 1251 Appendix A. Acknowledgements and Contributors 1253 The layout and content of this document relies heavily on work 1254 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1256 The following people contributed to preliminary versions of this 1257 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1258 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1259 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1260 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1261 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1262 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1263 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1264 Hoffman, Eran Hammer-Lahav, and Mark Nottingham. The content and 1265 concepts within are a product of the Metalink community. 1267 The Metalink community has dozens of contributors who proposed ideas 1268 and wording for this document, or contributed to the evolution of 1269 Metalink, including: 1271 Nicolas Alvarez, Patrick Ruckstuhl, Sebastien Willemijns, Micah 1272 Cowan, Yazsoft, Lukas Appelhans, KGet developers, FDM Team, Orbit 1273 Team, Arne Babenhauserheide, Mathias Berchtold, Xienzhenyu and 1274 TheWorld Browser Team, Xi Software, Bridget and Ethan Fletcher, Ruben 1275 Kerkhof, Agostino Russo, Salvatore and Robin Musumeci, Steve and 1276 Rachel Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave Winquist, 1277 Bob Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve Kleisath, 1278 Chad Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, Derick 1279 Cordoba, Ryan Alexander, John Sowder, Sandra Amisano, Tom Mainville, 1280 Janie Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus Hofmann, 1281 Dan Connolly, Tim Berners-Lee, Louis Suarez-Potts, Ross Smith, Jeff 1282 Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan Svedberg, Dedric 1283 Carter, James Antill, Debi Goulding, the Anthony Family, the Bryan 1284 Family, Juanita Anthony and Zimmy Bryan. 1286 Appendix B. RELAX NG Compact Schema 1288 This appendix is informative. 1290 The Relax NG schema explicitly excludes elements in the Metalink 1291 namespace that are not defined in this revision of the specification. 1292 Requirements for Metalink Processors encountering such markup are 1293 given in Sections 6.2 and 6.3. 1295 # -*- rnc -*- 1296 # RELAX NG Compact Syntax Grammar for the 1297 # Metalink Format Specification Version 2 1299 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1300 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1302 # Common attributes 1304 metalinkCommonAttributes = 1305 attribute xml:base { metalinkUri }?, 1306 attribute xml:lang { metalinkLanguageTag }?, 1307 undefinedAttribute* 1309 # Text Constructs 1311 metalinkTextConstruct = 1312 metalinkCommonAttributes, 1313 text 1315 # Date Construct 1317 metalinkDateConstruct = 1318 metalinkCommonAttributes, 1319 xsd:dateTime 1321 start = 1322 element metalink:metalink { 1323 element metalink:generator { 1324 metalinkTextConstruct 1325 } 1326 element metalink:origin { metalinkUri }?, 1327 element metalink:type { "static" | "dynamic" }?, 1328 element metalink:published { metalinkDateConstruct }?, 1329 element metalink:updated { metalinkDateConstruct }?, 1330 element metalink:files { 1331 element metalink:file { 1332 attribute name { metalinkTextConstruct }, 1333 element metalink:identity { metalinkTextConstruct }?, 1334 element metalink:version { metalinkTextConstruct }?, 1335 element metalink:size { xsd:integer }?, 1336 element metalink:description { metalinkTextConstruct }?, 1337 element metalink:license { 1338 attribute uri { metalinkUri }?, 1339 attribute name { metalinkTextConstruct }?, 1340 }?, 1341 element metalink:logo { metalinkUri }?, 1342 element metalink:publisher { 1343 attribute uri { metalinkUri }?, 1344 attribute name { metalinkTextConstruct }?, 1345 }?, 1346 element metalink:language { metalinkTextConstruct }?, 1347 element metalink:copyright { metalinkTextConstruct }?, 1348 element metalink:license { metalinkTextConstruct }?, 1349 element metalink:os { metalinkTextConstruct }?, 1350 element metalink:verification { 1351 hash+, 1352 element metalink:pieces { 1353 attribute length { metalinkTextConstruct }, 1354 attribute type { metalinkTextConstruct }, 1355 hash+ 1356 }+, 1357 element metalink:signature { 1358 attribute type { "pgp" }, 1359 text 1360 }+ 1361 }?, 1362 element metalink:resources { 1363 element metalink:metadata { 1364 attribute preference { xsd:integer }?, 1365 attribute type { metalinkTextConstruct }, 1366 metalinkUri 1367 element metalink:url { 1368 attribute location { xsd:string { 1369 minLength = "2" maxLength="2"} 1370 }?, 1371 attribute preference { xsd:integer }?, 1372 metalinkUri 1373 }+ 1375 } 1376 }+ 1377 } 1378 } 1379 hash = 1380 element metalink:hash { 1381 attribute piece { metalinkTextConstruct }?, 1382 attribute type { metalinkTextConstruct }, 1383 text 1384 } 1386 # As defined in RFC 3066 1387 metalinkLanguageTag = xsd:string { 1388 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1389 } 1391 # Unconstrained; it's not entirely clear how IRI fit into 1392 # xsd:anyURI so let's not try to constrain it here 1393 metalinkUri = text 1395 # Simple Extension 1397 simpleExtensionElement = 1398 element * - metalink:* { 1399 text 1400 } 1402 # Structured Extension 1404 structuredExtensionElement = 1405 element * - metalink:* { 1406 (attribute * { text }+, 1407 (text|anyElement)*) 1408 | (attribute * { text }*, 1409 (text?, anyElement+, (text|anyElement)*)) 1410 } 1412 # Other Extensibility 1414 extensionElement = 1415 simpleExtensionElement | structuredExtensionElement 1417 undefinedAttribute = 1418 attribute * - (xml:base | xml:lang | local:*) { text } 1420 undefinedContent = (text|anyForeignElement)* 1422 anyElement = 1423 element * { 1424 (attribute * { text } 1425 | text 1426 | anyElement)* 1427 } 1429 anyForeignElement = 1430 element * - metalink:* { 1431 (attribute * { text } 1432 | text 1433 | anyElement)* 1434 } 1436 # EOF 1438 Appendix C. Document History (to be removed by RFC Editor before 1439 publication) 1441 [[ to be removed by the RFC editor before publication as an RFC. ]] 1443 Updated versions can be found at 1444 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1445 in Subversion at 1446 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1448 Known issues concerning this draft: 1449 o None. 1451 -08 : July , 2009. 1452 o Clarifications. 1453 o Remove "uri" and "version" attributes from generator element. 1455 -07 : June 18, 2009. 1456 o This ID describes the Metalink document format/schema. 1457 o Remove "Client Implementation Considerations" section. 1458 o Expand "Known issues" section of Document History. 1460 -06 : March 3, 2009. 1461 o Add authors and this Document History section. 1463 -05 : January 13, 2009. 1464 o Clarifications. 1466 -04 : December 31, 2008. 1467 o New IPR notice as required by IETF. 1469 o Correct "metalink:pieces" Element text. 1470 o Add hash examples. 1471 o Slim down "Securing Metalink Documents" section. 1472 o Recommend at least SHA1. 1474 -03 : September 19, 2008. 1475 o New namespace - urn:ietf:params:xml:ns:metalink 1476 o Use the IANA registry named "Operating System Names" to define 1477 values for OS types. 1478 o Add "Client Implementation Considerations" section, which includes 1479 Content Negotiation. 1481 -02 : September 4, 2008. 1482 o Use the IANA registry named "Hash Function Textual Names" for hash 1483 types. 1484 o metadata Element for listing .torrent, .metalink, etc. 1485 o Remove type attribute for url Element. 1487 -01 : August 28, 2008. 1488 o Clarify directory info in name attribute, hash types, add text for 1489 preference attribute. 1491 -00 : August 23, 2008. 1492 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1493 3.0 specification. 1495 Index 1497 A 1498 application/metalink+xml Media Type 24 1500 C 1501 copyright XML element 14 1503 D 1504 description XML element 14 1506 F 1507 file XML element 11 1508 files XML element 10 1510 G 1511 generator XML element 14 1512 Grammar 1513 metalinkCommonAttributes 7 1514 metalinkCopyright 14 1515 metalinkDateConstruct 8 1516 metalinkDescription 14 1517 metalinkFile 11 1518 metalinkFiles 10 1519 metalinkGenerator 14 1520 metalinkHash 15 1521 metalinkIdentity 16 1522 metalinkLanguage 16 1523 metalinkLicense 17 1524 metalinkLogo 17 1525 metalinkMetalink 9 1526 metalinkOrigin 18 1527 metalinkOS 18 1528 metalinkPieces 13 1529 metalinkPublished 18 1530 metalinkPublisher 19 1531 metalinkResources 12 1532 metalinkSignature 19 1533 metalinkSize 20 1534 metalinkTextConstruct 7 1535 metalinkType 20 1536 metalinkUpdated 20 1537 metalinkURL 17, 20 1538 metalinkVerification 13 1539 metalinkVersion 21 1540 simpleExtensionElement 23 1541 structuredExtensionElement 23 1543 H 1544 hash XML element 15 1546 I 1547 identity XML element 16 1549 L 1550 language XML element 16 1551 license XML element 16 1552 logo XML element 17 1554 M 1555 Media Type 1556 application/metalink+xml 24 1557 metadata XML element 17 1558 metalink XML element 9 1559 metalinkCommonAttributes grammar production 7 1560 metalinkCopyright grammar production 14 1561 metalinkDateConstruct grammar production 8 1562 metalinkDescription grammar production 14 1563 metalinkFile grammar production 11 1564 metalinkFiles grammar production 10 1565 metalinkGenerator grammar production 14 1566 metalinkHash grammar production 15 1567 metalinkIdentity grammar production 16 1568 metalinkLanguage grammar production 16 1569 metalinkLicense grammar production 17 1570 metalinkLogo grammar production 17 1571 metalinkMetalink grammar production 9 1572 metalinkOrigin grammar production 18 1573 metalinkOS grammar production 18 1574 metalinkPieces grammar production 13 1575 metalinkPublished grammar production 18 1576 metalinkPublisher grammar production 19 1577 metalinkResources grammar production 12 1578 metalinkSignature grammar production 19 1579 metalinkSize grammar production 20 1580 metalinkTextConstruct grammar production 7 1581 metalinkType grammar production 20 1582 metalinkUpdated grammar production 20 1583 metalinkURL grammar production 17, 20 1584 metalinkVerification grammar production 13 1585 metalinkVersion grammar production 21 1587 O 1588 origin XML element 18 1589 os XML element 18 1591 P 1592 pieces XML element 13 1593 published XML element 18 1594 publisher XML element 19 1596 R 1597 resources XML element 12 1599 S 1600 signature XML element 19 1601 simpleExtensionElement grammar production 23 1602 size XML element 19 1603 structuredExtensionElement grammar production 23 1605 T 1606 type XML element 20 1608 U 1609 updated XML element 20 1610 url XML element 20 1612 V 1613 verification XML element 13 1614 version XML element 21 1616 X 1617 XML Elements 1618 copyright 14 1619 description 14 1620 entry 11 1621 files 10 1622 generator 14 1623 hash 15 1624 identity 16 1625 language 16 1626 license 16 1627 logo 17 1628 metadata 17 1629 metalink 9 1630 origin 18 1631 os 18 1632 pieces 13 1633 published 18 1634 publisher 19 1635 resources 12 1636 signature 19 1637 size 19 1638 type 20 1639 updated 20 1640 url 20 1641 verification 13 1642 version 21 1644 Authors' Addresses 1646 Anthony Bryan (editor) 1647 Metalinker Project 1649 Email: anthonybryan@gmail.com 1650 URI: http://www.metalinker.org 1652 Tatsuhiro Tsujikawa (editor) 1653 Metalinker Project 1655 Email: tatsuhiro.t@gmail.com 1656 URI: http://aria2.sourceforge.net 1657 Neil McNab (editor) 1658 Metalinker Project 1660 Email: nabber00@gmail.com 1661 URI: http://www.nabber.org 1663 Peter Poeml (editor) 1664 Novell, Inc. 1666 Email: info@mirrorbrain.org 1667 URI: http://www.mirrorbrain.org/