idnits 2.17.1 draft-bryan-metalink-11.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.ii or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document seems to contain a disclaimer for pre-RFC5378 work, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, you can and should remove the disclaimer; otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (August 8, 2009) is 5367 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'BITTORRENT' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO3166-1' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml-infoset' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml-names' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xmlbase' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xmldsig-core' ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3023 (Obsoleted by RFC 7303) ** Downref: Normative reference to an Informational RFC: RFC 3174 ** Obsolete normative reference: RFC 4646 (Obsoleted by RFC 5646) Summary: 5 errors (**), 0 flaws (~~), 1 warning (==), 10 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Bryan, Ed. 3 Internet-Draft T. Tsujikawa, Ed. 4 Intended status: Standards Track N. McNab, Ed. 5 Expires: February 9, 2010 Metalinker Project 6 P. Poeml, Ed. 7 Novell, Inc. 8 August 8, 2009 10 The Metalink Download Description Format 11 draft-bryan-metalink-11 13 Status of this Memo 15 This Internet-Draft is submitted to IETF in full conformance with the 16 provisions of BCP 78 and BCP 79. This document may contain material 17 from IETF Documents or IETF Contributions published or made publicly 18 available before November 10, 2008. The person(s) controlling the 19 copyright in some of this material may not have granted the IETF 20 Trust the right to allow modifications of such material outside the 21 IETF Standards Process. Without obtaining an adequate license from 22 the person(s) controlling the copyright in such materials, this 23 document may not be modified outside the IETF Standards Process, and 24 derivative works of it may not be created outside the IETF Standards 25 Process, except to format it for publication as an RFC or to 26 translate it into languages other than English. 28 Internet-Drafts are working documents of the Internet Engineering 29 Task Force (IETF), its areas, and its working groups. Note that 30 other groups may also distribute working documents as Internet- 31 Drafts. 33 Internet-Drafts are draft documents valid for a maximum of six months 34 and may be updated, replaced, or obsoleted by other documents at any 35 time. It is inappropriate to use Internet-Drafts as reference 36 material or to cite them other than as "work in progress." 38 The list of current Internet-Drafts can be accessed at 39 http://www.ietf.org/ietf/1id-abstracts.txt. 41 The list of Internet-Draft Shadow Directories can be accessed at 42 http://www.ietf.org/shadow.html. 44 This Internet-Draft will expire on February 9, 2010. 46 Copyright Notice 48 Copyright (c) 2009 IETF Trust and the persons identified as the 49 document authors. All rights reserved. 51 This document is subject to BCP 78 and the IETF Trust's Legal 52 Provisions Relating to IETF Documents in effect on the date of 53 publication of this document (http://trustee.ietf.org/license-info). 54 Please review these documents carefully, as they describe your rights 55 and restrictions with respect to this document. 57 Abstract 59 This document specifies Metalink Documents, an XML-based download 60 description format. 62 Table of Contents 64 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 65 1.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 4 66 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 5 67 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 5 68 2. Metalink Documents . . . . . . . . . . . . . . . . . . . . . . 6 69 3. Common Metalink Constructs . . . . . . . . . . . . . . . . . . 7 70 3.1. Text Constructs . . . . . . . . . . . . . . . . . . . . . 7 71 3.1.1. Text . . . . . . . . . . . . . . . . . . . . . . . . . 8 72 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 8 73 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 8 74 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 9 75 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 9 76 4.1.2. The "metalink:files" Element . . . . . . . . . . . . . 10 77 4.1.3. The "metalink:file" Element . . . . . . . . . . . . . 10 78 4.1.4. The "metalink:resources" Element . . . . . . . . . . . 11 79 4.1.5. The "metalink:verification" Element . . . . . . . . . 12 80 4.1.6. The "metalink:pieces" Element . . . . . . . . . . . . 13 81 4.2. Metadata Elements . . . . . . . . . . . . . . . . . . . . 13 82 4.2.1. The "metalink:copyright" Element . . . . . . . . . . . 13 83 4.2.2. The "metalink:description" Element . . . . . . . . . . 14 84 4.2.3. The "metalink:dynamic" Element . . . . . . . . . . . . 14 85 4.2.4. The "metalink:generator" Element . . . . . . . . . . . 14 86 4.2.5. The "metalink:hash" Element . . . . . . . . . . . . . 14 87 4.2.6. The "metalink:identity" Element . . . . . . . . . . . 16 88 4.2.7. The "metalink:language" Element . . . . . . . . . . . 16 89 4.2.8. The "metalink:license" Element . . . . . . . . . . . . 16 90 4.2.9. The "metalink:logo" Element . . . . . . . . . . . . . 17 91 4.2.10. The "metalink:metaurl" Element . . . . . . . . . . . . 17 92 4.2.11. The "metalink:origin" Element . . . . . . . . . . . . 18 93 4.2.12. The "metalink:os" Element . . . . . . . . . . . . . . 18 94 4.2.13. The "metalink:published" Element . . . . . . . . . . . 18 95 4.2.14. The "metalink:publisher" Element . . . . . . . . . . . 19 96 4.2.15. The "metalink:signature" Element . . . . . . . . . . . 19 97 4.2.16. The "metalink:size" 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 . . . . . . . . . . . . . . . . . . . . . . 21 103 6.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 21 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 . . . . . . . . . . . . . . 22 108 6.4.2. Structured Extension Elements . . . . . . . . . . . . 23 109 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 110 7.1. XML Namespace Registration . . . . . . . . . . . . . . . . 23 111 7.2. application/metalink+xml MIME type . . . . . . . . . . . . 24 112 8. Security Considerations . . . . . . . . . . . . . . . . . . . 24 113 8.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 25 114 8.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 25 115 8.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 25 116 8.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 25 117 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 25 118 9.1. Normative References . . . . . . . . . . . . . . . . . . . 25 119 9.2. Informative References . . . . . . . . . . . . . . . . . . 27 120 Appendix A. Acknowledgements and Contributors . . . . . . . . . . 27 121 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 28 122 Appendix C. Document History (to be removed by RFC Editor 123 before publication) . . . . . . . . . . . . . . . . . 34 124 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 125 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 38 127 1. Introduction 129 Metalink is an XML-based document format that describes a file or 130 lists of files to be added to a download queue. Lists are composed 131 of a number of files, each with an extensible set of attached 132 metadata. For example, each file can have a description, checksum, 133 and list of URIs that it is available from. 135 The primary use case that Metalink addresses is the description of 136 downloadable content in a format so download agents can act 137 intelligently and recover from common errors with little or no user 138 interaction necessary. These errors can include multiple servers 139 going down and data corrupted in transmission. 141 [[ Discussion of this draft should take place on 142 discuss@apps.ietf.org or the Metalink discussion mailing list located 143 at metalink-discussion@googlegroups.com. To join the list, visit 144 http://groups.google.com/group/metalink-discussion . ]] 146 1.1. Examples 148 A brief, single file Metalink Document: 150 151 152 153 154 155 ftp://ftp.example.com/example.ext 156 http://example.com/example.ext 157 158 http://example.com/example.ext.torrent 159 160 161 162 163 164 A more extensive, single file Metalink Document: 166 167 168 2008-05-15T12:23:23Z 169 170 171 Example 172 1.0 173 en 174 A description of the example file for 175 download. 176 177 80bc95fd391772fa61c91ed68567f0980bb45fd9 178 179 180 181 182 ftp://ftp.example.com/example.ext 183 184 http://example.com/example.ext 185 186 http://example.com/example.ext.torrent 187 188 189 190 191 193 1.2. Namespace and Version 195 The XML Namespaces URI [REC-xml-names] for the XML data format 196 described in this specification is: 198 urn:ietf:params:xml:ns:metalink 200 For convenience, this data format may be referred to as "Metalink", 201 which this specification uses internally. 203 1.3. Notational Conventions 205 This specification describes conformance of Metalink Documents. 206 Additionally, it places some requirements on Metalink Processors. 208 This specification uses the namespace prefix "metalink:" for the 209 Namespace URI identified in Section 1.2, above. Note that the choice 210 of namespace prefix is arbitrary and not semantically significant. 212 Metalink is specified using terms from the XML Infoset 213 [REC-xml-infoset]. However, this specification uses a shorthand for 214 two common terms: the phrase "Information Item" is omitted when 215 naming Element Information Items and Attribute Information Items. 216 Therefore, when this specification uses the term "element," it is 217 referring to an Element Information Item in Infoset terms. Likewise, 218 when it uses the term "attribute," it is referring to an Attribute 219 Information Item. 221 Some sections of this specification are illustrated with fragments of 222 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 223 text of this specification provides the definition of conformance. A 224 complete schema appears in Appendix B. 226 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 227 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 228 document are to be interpreted as described in BCP 14, [RFC2119], as 229 scoped to those conformance targets. 231 2. Metalink Documents 233 This specification describes Metalink Documents. 235 A Metalink Document describes a file or group of files, how to access 236 them, and metadata that identifies them. Its root is the metalink: 237 metalink element. 239 namespace metalink = "urn:ietf:params:xml:ns:metalink" 240 start = metalinkMetalink 242 Metalink Documents are specified in terms of the XML Information Set, 243 serialized as XML 1.0 [REC-xml] and identified with the "application/ 244 metalink+xml" media type. 246 Metalink Documents MUST be well-formed XML. This specification does 247 not define a DTD for Metalink Documents, and hence does not require 248 them to be valid (in the sense used by XML). 250 Metalink allows the use of IRIs [RFC3987]. Every URI [RFC3986] is 251 also an IRI, so a URI may be used wherever below an IRI is named. 252 There is one special consideration: when an IRI that is not also a 253 URI is given for dereferencing, it MUST be mapped to a URI using the 254 steps in Section 3.1 of [RFC3987]. 256 Any element defined by this specification MAY have an xml:base 257 attribute [REC-xmlbase]. When xml:base is used in an Metalink 258 Document, it serves the function described in Section 5.1.1 of 260 [RFC3986], establishing the base URI (or IRI) for resolving any 261 relative references found within the effective scope of the xml:base 262 attribute. 264 Any element defined by this specification MAY have an xml:lang 265 attribute, whose content indicates the natural language for the 266 element and its descendents. The language context is only 267 significant for elements and attributes declared to be "Language- 268 Sensitive" by this specification. Requirements regarding the content 269 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 270 Section 2.12. 272 metalinkCommonAttributes = 273 attribute xml:base { metalinkUri }?, 274 attribute xml:lang { metalinkLanguageTag }?, 275 undefinedAttribute* 277 Metalink is an extensible format. See Section 6 of this document for 278 a full description of how Metalink Documents can be extended. 280 3. Common Metalink Constructs 282 Many of Metalink's elements share a few common structures. This 283 section defines those structures and their requirements for 284 convenient reference by the appropriate element definitions. 286 When an element is identified as being a particular kind of 287 construct, it inherits the corresponding requirements from that 288 construct's definition in this section. 290 Note that there MUST NOT be any white space in a Date construct or in 291 any IRI. Some XML-emitting implementations erroneously insert white 292 space around values by default, and such implementations will emit 293 invalid Metalink Documents. 295 3.1. Text Constructs 297 A Text construct contains human-readable text, usually in small 298 quantities. The content of Text constructs is Language-Sensitive. 300 metalinkTextConstruct = 301 metalinkCommonAttributes, 302 text 304 3.1.1. Text 306 Example metalink:description with text content: 308 ... 309 310 A description of the example file for download. 311 312 ... 314 The content of the Text construct MUST NOT contain child elements. 315 Such text is intended to be presented to humans in a readable 316 fashion. Thus, white space could be collapsed (including line 317 breaks) and text could be displayed using typographic techniques such 318 as justification and proportional fonts. 320 3.2. Date Constructs 322 A Date construct is an element whose content MUST conform to the 323 "date-time" production in [RFC3339]. In addition, an uppercase "T" 324 character MUST be used to separate date and time, and an uppercase 325 "Z" character MUST be present in the absence of a numeric time zone 326 offset. 328 metalinkDateConstruct = 329 metalinkCommonAttributes, 330 xsd:dateTime 332 Such date values happen to be compatible with the following 333 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 334 [W3C.REC-xmlschema-2-20041028]. 336 Example Date constructs: 338 2008-12-13T18:30:02Z 339 2008-12-13T18:30:02.25Z 340 2008-12-13T18:30:02+01:00 341 2008-12-13T18:30:02.25+01:00 343 Date values SHOULD be as accurate as possible. For example, it would 344 be generally inappropriate for a publishing system to apply the same 345 timestamp to several Metalink Documents that were published during 346 the course of a single day. 348 4. Metalink Element Definitions 349 4.1. Container Elements 351 4.1.1. The "metalink:metalink" Element 353 The "metalink:metalink" element is the document (i.e., top-level) 354 element of a Metalink Document, acting as a container for metadata 355 and data associated with the listed files. It contains one 356 "metalink:files" element whose element children consist of metadata 357 elements followed by one or more metalink:file child elements. 359 metalinkMetalink = 360 element metalink:metalink { 361 metalinkCommonAttributes, 362 (metalinkDynamic? 363 & metalinkFiles 364 & metalinkGenerator? 365 & metalinkOrigin? 366 & metalinkPublished? 367 & metalinkUpdated? 368 & extensionElement*) 369 } 371 The following child elements are defined by this specification (note 372 that the presence of some of these elements is required): 374 o metalink:metalink elements MAY contain exactly one metalink: 375 dynamic element. 376 o metalink:metalink elements MUST contain exactly one metalink:files 377 element. 378 o metalink:metalink elements MAY contain exactly one metalink: 379 generator element. 380 o metalink:metalink elements SHOULD contain exactly one metalink: 381 origin element. 382 o metalink:metalink elements MAY contain exactly one metalink: 383 published element. 385 4.1.1.1. Providing Textual Content 387 Experience teaches that downloads providing textual content are in 388 general more useful than those that do not. Some applications (one 389 example is full-text indexers) require a minimum amount of text to 390 function reliably and predictably. Metalink publishers should be 391 aware of these issues. It is advisable that each metalink:file 392 element contain a non-empty metalink:description element, a non-empty 393 metalink:identity element when that element is present, and a non- 394 empty metalink:version element, and a non-empty metalink:publisher 395 element. However, the absence of metalink:description is not an 396 error, and Metalink Processors MUST NOT fail to function correctly as 397 a consequence of such an absence. 399 4.1.2. The "metalink:files" Element 401 The "metalink:files" element acts as a container for metadata and 402 data associated with the listed files. It contains one or more 403 metalink:file child elements. 405 metalinkFiles = 406 element metalink:files { 407 metalinkCommonAttributes, 408 (metalinkFile+ 409 & extensionElement*) 410 } 412 The following child elements are defined by this specification (note 413 that the presence of some of these elements is required): 415 o metalink:files elements MUST contain one or more metalink:file 416 elements. 418 4.1.3. The "metalink:file" Element 420 The "metalink:file" element represents an individual file, acting as 421 a container for metadata and data associated with the file. 423 metalinkFile = 424 element metalink:file { 425 metalinkCommonAttributes, 426 attribute name { text }, 427 (metalinkCopyright? 428 & metalinkDescription? 429 & metalinkIdentity? 430 & metalinkLanguage? 431 & metalinkLicense? 432 & metalinkLogo? 433 & metalinkOS? 434 & metalinkPublisher? 435 & metalinkResources 436 & metalinkSize? 437 & metalinkVerification? 438 & metalinkVersion? 439 & extensionElement*) 440 } 442 This specification assigns no significance to the order of metalink: 443 file elements. 445 The following child elements are defined by this specification (note 446 that it requires the presence of some of these elements): 448 o metalink:file elements MAY contain exactly one metalink:copyright 449 element. 450 o metalink:file elements MAY contain exactly one metalink: 451 description element. 452 o metalink:file elements MAY contain exactly one metalink:identity 453 element. 454 o metalink:file elements MAY contain exactly one metalink:language 455 element. 456 o metalink:file elements MAY contain exactly one metalink:license 457 element. 458 o metalink:file elements MAY contain exactly one metalink:logo 459 element. 460 o metalink:file elements MAY contain exactly one metalink:os 461 element. 462 o metalink:file elements MAY contain exactly one metalink:publisher 463 element. 464 o metalink:file elements MUST contain exactly one metalink:resources 465 element. 466 o metalink:file elements SHOULD contain exactly one metalink:size 467 element. 468 o metalink:file elements SHOULD contain exactly one metalink: 469 verification element. 470 o metalink:file elements MAY contain exactly one metalink:version 471 element. 473 4.1.3.1. The "name" Attribute 475 metalink:file elements MUST have a "name" attribute, which contains 476 the filename of the file to be downloaded. 478 Directory information can also be contained in a "path/file" format 479 only, as in: 481 483 In this example, a subdirectory "debian-amd64/sarge/" will be created 484 and a file named "Contents-amd64.gz" will be created inside it. The 485 path MUST NOT contain any directory traversal directives or 486 information. The path MUST be relative. The path MUST NOT begin 487 with a "/", "./" or "../", contain "/../", or end with "/..". 489 4.1.4. The "metalink:resources" Element 491 The "metalink:resources" element acts as a container for metadata and 492 data associated with the listed files. It contains one or more 493 metalink:url child elements. It can also contain one or more 494 metalink:metaurl child elements. 496 All elements contained in each metalink:resources element SHOULD lead 497 to identical files. That is, each metalink:url element should be an 498 alternative location for the same file and each metalink:metaurl 499 element should provide metadata to retrieve the same file in another 500 way, such as a peer to peer network. 502 metalinkResources = 503 element metalink:resources { 504 metalinkCommonAttributes, 505 (metalinkMetaURL* 506 & metalinkURL* 507 & extensionElement*) 508 } 510 This specification assigns no significance to the order of metalink: 511 url or metalink:metaurl elements. Significance is determined by the 512 value of the "preference" attribute of the metalink:url or metalink: 513 metaurl elements. 515 The following child elements are defined by this specification (note 516 that the presence of some of these elements is required): 518 o metalink:resources elements MUST contain at least one metalink:url 519 element or at least one metalink:metaurl element. Typically, 520 metalink:resources element contains more than one metalink:url 521 element to provide multiple download sources. 523 4.1.5. The "metalink:verification" Element 525 The "metalink:verification" element acts as a container for metadata 526 and data associated with verifying the listed files. This 527 information is in the form of checksums and digital signatures. 528 Checksums are used to verify the integrity of a complete file or 529 portion of a file to determine if the files have been transferred 530 without any errors. Digital signatures verify that a file is from 531 the entity that has signed it. 533 metalinkVerification = 534 element metalink:verification { 535 metalinkCommonAttributes, 536 (metalinkHash* 537 & metalinkPieces* 538 & metalinkSignature? 539 & extensionElement*) 540 } 542 The following child elements are defined by this specification: 544 o metalink:verification elements MAY contain one or more metalink: 545 hash elements. 546 o metalink:verification elements MAY contain one or more metalink: 547 pieces elements. 548 o metalink:verification elements MAY contain one or more metalink: 549 signature elements. 551 4.1.6. The "metalink:pieces" Element 553 The "metalink:pieces" element acts as a container for metadata and 554 data associated with verifying the listed files. This information is 555 in the form of checksums for a portion of a file. 557 metalinkPieces = 558 element metalink:pieces { 559 attribute length { xsd:integer }, 560 attribute type { text }, 561 metalinkHash+ 562 } 564 4.1.6.1. The "type" Attribute 566 metalink:pieces elements MUST have a "type" attribute. 568 The IANA registry named "Hash Function Textual Names" defines values 569 for hash types. If a Metalink Document contains verification 570 information, it SHOULD include "sha-1" which is SHA1, as specified in 571 [RFC3174]. It MAY also include other verification algorithms. 573 4.1.6.2. The "length" Attribute 575 metalink:pieces elements MUST have a "length" attribute, which is an 576 integer that describes the length of the piece of the file in octets. 578 4.2. Metadata Elements 580 4.2.1. The "metalink:copyright" Element 582 The "metalink:copyright" element is a Text construct that conveys a 583 human-readable copyright for a file. 585 metalinkCopyright = 586 element metalink:copyright { 587 metalinkTextConstruct 588 } 590 4.2.2. The "metalink:description" Element 592 The "metalink:description" element is a Text construct that conveys a 593 human-readable description for a file. 595 metalinkDescription = 596 element metalink:description { 597 metalinkTextConstruct 598 } 600 4.2.3. The "metalink:dynamic" Element 602 The "metalink:dynamic" element is a Text construct that describes 603 whether the IRI from "metalink:origin" in a Metalink will contain 604 dynamic updated Metalinks or static content that is not updated. 606 metalinkDynamic = 607 element metalink:dynamic { 608 "true" | "false" 609 } 611 4.2.4. The "metalink:generator" Element 613 The "metalink:generator" element's content identifies the generating 614 agent name and version, separated by a "/", used to generate a 615 Metalink Document, for debugging and other purposes. 617 metalinkGenerator = 618 element metalink:generator { 619 metalinkTextConstruct 620 } 622 The content of this element, when present, MUST be a string that is a 623 human-readable name and version, separated by a "/", for the 624 generating agent. For example, "MirrorBrain/2.8.1", where 625 "MirrorBrain" is the name and "2.8.1" is the version. Entities such 626 as "&" and "<" represent their corresponding characters ("&" 627 and "<" respectively), not markup. 629 4.2.5. The "metalink:hash" Element 631 The "metalink:hash" element is a Text construct that conveys a hash 632 for a file. All hashes are encoded in lowercase hexadecimal format. 633 metalink:hash elements MUST have a "type" attribute or a "piece" 634 attribute. 636 metalinkHash = 637 element metalink:hash { 638 (attribute piece { xsd:integer } 639 | attribute type { text }), 640 text 641 } 643 Metalinks can contain one or multiples hashes of a complete file, for 644 example both SHA-1 and SHA-256. metalink:hash elements with a "type" 645 attribute contain a hash of the whole file. 647 ... 648 649 a97fcf6ba9358f8a6f62beee4421863d3e52b080 650 fc87941af7fd7f03e53b34af393f4c14923d74 651 825f51116ff591336af4880227 652 653 ... 655 Metalinks can also contain hashes for individual pieces of a file. 656 metalink:hash elements with a "piece" attribute contain a hash for 657 that specific piece or chunk of the file, and are of the same hash 658 type as the metalink:pieces element they are contained in. 660 ... 661 662 a97fcf6ba9358f8a6f62beee4421863d3e52b080 663 fc87941af7fd7f03e53b34af393f4c14923d74 664 825f51116ff591336af4880227 665 666 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 667 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 668 3e84219096435c34e092b17b70a011771c52d87a 669 67183e4c3ab892d3ebe8326b7d79eb62d077f487 670 671 672 ... 674 4.2.5.1. The "type" Attribute 676 metalink:hash elements MUST have a "type" attribute, but only when 677 they are a sub element of metalink:verification. The IANA registry 678 named "Hash Function Textual Names" defines values for hash types. 679 If a Metalink Document contains verification information, it SHOULD 680 include "sha-1" which is SHA1, as specified in [RFC3174]. It MAY 681 also include other verification algorithms. 683 4.2.5.2. The "piece" Attribute 685 metalink:hash elements MUST have a "piece" attribute, but only when 686 they are a sub element of metalink:pieces. The value of "piece" 687 starts at "0" and increases, depending on the "length" attribute of 688 metalink:pieces and the size of the file. Depending on the size of a 689 file, the last piece may not be the same size as the others. 691 4.2.6. The "metalink:identity" Element 693 The "metalink:identity" element is a Text construct that conveys a 694 human-readable identity for a file. The identity of OpenOffice.org 695 3.0 would be "OpenOffice.org". 697 metalinkIdentity = 698 element metalink:identity { 699 metalinkTextConstruct 700 } 702 4.2.7. The "metalink:language" Element 704 The "metalink:language" element is a Text construct that conveys a 705 code for the language of a file, per [RFC4646]. 707 metalinkLanguage = 708 element metalink:language { 709 metalinkTextConstruct 710 } 712 4.2.8. The "metalink:license" Element 714 The "metalink:license" element is a Text construct that conveys a 715 human-readable license name for a file. 717 metalinkLicense = 718 element metalink:license { 719 metalinkCommonAttributes, 720 attribute uri { metalinkUri }?, 721 attribute name { text }? 722 } 724 The metalink:license element MAY have a "uri" attribute whose value 725 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 726 URI (mapped from an IRI, if necessary) SHOULD produce a 727 representation that is relevant to that agent. 729 The metalink:license element MAY have a "name" attribute that 730 indicates the name of the license. 732 4.2.9. The "metalink:logo" Element 734 The "metalink:logo" element's content is an IRI reference [RFC3987] 735 that identifies an image that provides visual identification for a 736 file. 738 metalinkLogo = 739 element metalink:logo { 740 metalinkCommonAttributes, 741 (metalinkUri) 742 } 744 The image SHOULD have an aspect ratio of one (horizontal) to one 745 (vertical) and SHOULD be suitable for presentation at a small size. 747 4.2.10. The "metalink:metaurl" Element 749 The "metalink:metaurl" element contains the IRI of metadata about a 750 resource to download. For example, this could be the IRI of a 751 BitTorrent .torrent file or a Metalink Document. Note that the 752 information in the metalink:verification element does not apply to 753 these files, but to the files that are described by them. 755 metalinkMetaURL = 756 element metalink:metaurl { 757 metalinkCommonAttributes, 758 attribute preference { xsd:integer }?, 759 attribute type { text }, 760 attribute name { text }?, 761 metalinkUri 762 } 764 4.2.10.1. The "preference" Attribute 766 metalink:metaurl elements MAY have a preference attribute, whose 767 value MUST be a number from 1 to 100 for priority, with 100 used 768 first and 1 used last. Multiple metalink:metaurl elements can have 769 the same preference, i.e. three BitTorrent .torrent files could have 770 preference="100". See also the "preference" attribute of the 771 metalink:url element. 773 4.2.10.2. The "type" Attribute 775 metalink:metaurl elements MUST have a "type" attribute that indicates 776 the MIME type of the metadata available at the IRI. In the case of 777 BitTorrent as specified in [BITTORRENT], the value "torrent" is 778 required. Types without "/" are reserved. Currently, "torrent" is 779 the only reserved value. 781 4.2.10.3. The "name" Attribute 783 metalink:metaurl elements MAY have a "name" attribute that indicates 784 a specific file in a BitTorrent .torrent file or a Metalink Document 785 that describes multiple files. 787 Directory information can also be contained in a "path/file" format 788 only, as in: 790 792 In this example, a file named "Contents-amd64.gz" is indicated, in a 793 "debian-amd64/sarge/" subdirectory. The path MUST NOT contain any 794 directory traversal directives or information. The path MUST be 795 relative. The path MUST NOT begin with a "/", "./" or "../", contain 796 "/../", or end with "/..". 798 4.2.11. The "metalink:origin" Element 800 The "metalink:origin" element is an IRI where the Metalink Document 801 was originally published. If metalink:dynamic is "true", then 802 updated versions of the Metalink can be found at this IRI. 804 metalinkOrigin = 805 element metalink:origin { 806 metalinkCommonAttributes, 807 (metalinkUri) 808 } 810 4.2.12. The "metalink:os" Element 812 The "metalink:os" element is a Text construct that conveys a human- 813 readable Operating System for a file. The IANA registry named 814 "Operating System Names" defines values for OS types. 816 metalinkOS = 817 element metalink:os { 818 metalinkTextConstruct 819 } 821 4.2.13. The "metalink:published" Element 823 The "metalink:published" element is a Date construct indicating an 824 instant in time associated with an event early in the life cycle of 825 the entry. 827 metalinkPublished = 828 element metalink:published { 829 metalinkDateConstruct 830 } 832 Typically, metalink:published will be associated with the initial 833 creation or first availability of the resource. 835 4.2.14. The "metalink:publisher" Element 837 The "metalink:publisher" element indicates a group or other entity 838 which has published the file described in the Metalink Document. 840 metalinkPublisher = 841 element metalink:publisher { 842 metalinkCommonAttributes, 843 attribute uri { metalinkUri }?, 844 attribute name { text }? 845 } 847 The metalink:publisher element MAY have a "uri" attribute whose value 848 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 849 URI (mapped from an IRI, if necessary) SHOULD produce a 850 representation that is relevant to that agent. 852 The metalink:publisher element MAY have a "name" attribute that 853 indicates the name of the publisher. 855 4.2.15. The "metalink:signature" Element 857 The "metalink:signature" element is a Text construct that conveys a 858 digital signature for a file described in a Metalink Document. 860 metalinkSignature = 861 element metalink:signature { 862 attribute type { "pgp" }, 863 metalinkTextConstruct 864 } 866 4.2.15.1. The "type" Attribute 868 metalink:signature elements MUST have a "type" attribute. The 869 initial value of "type" is the string that is non-empty and matches 870 "pgp". It may be useful to extend Metalink documents with new types 871 of digital signatures, so unknown types are allowed. 873 4.2.16. The "metalink:size" Element 875 The "metalink:size" element indicates the length of the linked 876 content in octets; it is a hint about the content length of the 877 representation returned when the IRI is mapped to a URI and 878 dereferenced. 880 metalinkSize = 881 element metalink:size { 882 metalinkTextConstruct 883 } 885 4.2.17. The "metalink:updated" Element 887 The "metalink:updated" element is a Date construct indicating the 888 most recent instant in time when a Metalink was modified in a way the 889 publisher considers significant. Therefore, not all modifications 890 necessarily result in a changed metalink:updated value. 892 metalinkUpdated = 893 element metalink:updated { 894 metalinkDateConstruct 895 } 897 Publishers MAY change the value of this element over time. 899 4.2.18. The "metalink:url" Element 901 The "metalink:url" element contains the IRI of a file. Most Metalink 902 Documents will contain multiple metalink:url elements, and each one 903 SHOULD be a valid alternative to download the same file. 905 metalinkURL = 906 element metalink:url { 907 metalinkCommonAttributes, 908 attribute location { xsd:string { 909 minLength = "2" maxLength="2"} 910 }?, 911 attribute preference { xsd:integer }?, 912 metalinkUri 913 } 915 4.2.18.1. The "preference" Attribute 917 metalink:url elements MAY have a preference attribute, whose value 918 MUST be a number from 1 to 100 for priority, with 100 used first and 919 1 used last. Multiple metalink:url elements can have the same 920 preference, i.e. ten mirrors could have preference="100". 922 4.2.18.2. The "location" Attribute 924 metalink:url elements MAY have a "location" attribute, which is a 925 [ISO3166-1] alpha-2 two letter country code for the geographical 926 location of the physical server an IRI is used to access. 928 4.2.19. The "metalink:version" Element 930 The "metalink:version" element is a Text construct that conveys a 931 human-readable version for a file. The version of OpenOffice.org 3.0 932 would be "3.0". 934 metalinkVersion = 935 element metalink:version { 936 metalinkTextConstruct 937 } 939 5. Securing Metalink Documents 941 Because Metalink is an XML-based format, existing XML security 942 mechanisms can be used to secure its content. 944 Producers of Metalinks may have sound reasons for signing otherwise- 945 unprotected content. For example, a merchant might digitally sign a 946 Metalink that lists a file download to verify its origin. Other 947 merchants may wish to sign and encrypt Metalinks that list digital 948 songs that have been purchased. Of course, many other examples are 949 conceivable as well. 951 The algorithm requirements in this section pertain to the Metalink 952 Processor. They require that a recipient, at a minimum, be able to 953 handle messages that use the specified cryptographic algorithms. 954 These requirements do not limit the algorithms that the sender can 955 choose. 957 Metalink Processors that verify signed Metalink Documents MUST at 958 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 960 6. Extending Metalink 962 6.1. Extensions from Non-Metalink Vocabularies 964 This specification describes Metalink's XML markup vocabulary. 965 Markup from other vocabularies ("foreign markup") can be used in an 966 Metalink Document. 968 6.2. Extensions to the Metalink Vocabulary 970 The Metalink namespace is reserved for future forward-compatible 971 revisions of Metalink. Future versions of this specification could 972 add new elements and attributes to the Metalink markup vocabulary. 973 Software written to conform to this version of the specification will 974 not be able to process such markup correctly and, in fact, will not 975 be able to distinguish it from markup error. For the purposes of 976 this discussion, unrecognized markup from the Metalink vocabulary 977 will be considered "foreign markup". 979 6.3. Processing Foreign Markup 981 Metalink Processors that encounter foreign markup in a location that 982 is legal according to this specification MUST NOT stop processing or 983 signal an error. It might be the case that the Metalink Processor is 984 able to process the foreign markup correctly and does so. Otherwise, 985 such markup is termed "unknown foreign markup". 987 When unknown foreign markup is encountered as a child of metalink: 988 file, metalink:metalink, Metalink Processors MAY bypass the markup 989 and any textual content and MUST NOT change their behavior as a 990 result of the markup's presence. 992 When unknown foreign markup is encountered in a Text Construct, 993 software SHOULD ignore the markup and process any text content of 994 foreign elements as though the surrounding markup were not present. 996 6.4. Extension Elements 998 Metalink allows foreign markup anywhere in an Metalink document, 999 except where it is explicitly forbidden. Child elements of metalink: 1000 file and metalink:metalink are considered Metadata elements and are 1001 described below. Child elements of Person constructs are considered 1002 to apply to the construct. The role of other foreign markup is 1003 undefined by this specification. 1005 6.4.1. Simple Extension Elements 1007 A Simple Extension element MUST NOT have any attributes or child 1008 elements. The element MAY contain character data or be empty. 1009 Simple Extension elements are not Language-Sensitive. 1011 simpleExtensionElement = 1012 element * - metalink:* { 1013 text 1014 } 1016 The element can be interpreted as a simple property (or name/value 1017 pair) of the parent element that encloses it. The pair consisting of 1018 the namespace-URI of the element and the local name of the element 1019 can be interpreted as the name of the property. The character data 1020 content of the element can be interpreted as the value of the 1021 property. If the element is empty, then the property value can be 1022 interpreted as an empty string. 1024 6.4.2. Structured Extension Elements 1026 The root element of a Structured Extension element MUST have at least 1027 one attribute or child element. It MAY have attributes, it MAY 1028 contain well-formed XML content (including character data), or it MAY 1029 be empty. Structured Extension elements are Language-Sensitive. 1031 structuredExtensionElement = 1032 element * - metalink:* { 1033 (attribute * { text }+, 1034 (text|anyElement)*) 1035 | (attribute * { text }*, 1036 (text?, anyElement+, (text|anyElement)*)) 1037 } 1039 The structure of a Structured Extension element, including the order 1040 of its child elements, could be significant. 1042 This specification does not provide an interpretation of a Structured 1043 Extension element. The syntax of the XML contained in the element 1044 (and an interpretation of how the element relates to its containing 1045 element) is defined by the specification of the Metalink extension. 1047 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. 1094 Base URI: As specified in [RFC3023], Section 6. 1095 Macintosh File Type code: TEXT 1096 Person and email address to contact for further information: Anthony 1097 Bryan 1098 Intended usage: COMMON 1099 Author/Change controller: IESG 1101 8. Security Considerations 1103 Publishers are encouraged to offer Metalink documents via 1104 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1105 are also encouraged to include digital signatures of the files within 1106 the Metalink Documents if they are available. 1108 8.1. URIs and IRIs 1110 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1111 and Section 8 of [RFC3987] for security considerations related to 1112 their handling and use. 1114 8.2. Spoofing 1116 There is potential for spoofing attacks where the attacker publishes 1117 Metalinks with false information. Malicious publishers might create 1118 Metalink Documents containing inaccurate information anywhere in the 1119 document. At best, this could deceive unaware downloaders that they 1120 are downloading a malicious or worthless file. At worst, malicious 1121 publishers could attempt a distributed denial of service attack by 1122 inserting unrelated IRIs into Metalink Documents. 1124 8.3. Cryptographic Hashes 1126 Currently, some of the hash types defined in the IANA registry named 1127 "Hash Function Textual Names" are considered insecure. These include 1128 the whole Message Digest family of algorithms which are not suitable 1129 for cryptographically strong verification. Malicious people could 1130 provide files that appear to be identical to another file because of 1131 a collision, i.e. the weak cryptographic hashes of the intended file 1132 and a substituted malicious file could match. 1134 If a Metalink Document contains verification information, it SHOULD 1135 implement "sha-1" which is SHA1, as specified in [RFC3174]. It MAY 1136 also include other verification algorithms. 1138 8.4. Signing 1140 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1141 subject to the security considerations implied by its use. This 1142 addresses the issue of spoofing. 1144 Digital signatures provide authentication, message integrity, and 1145 non-repudiation with proof of origin. 1147 9. References 1149 9.1. Normative References 1151 [BITTORRENT] 1152 Cohen, B., "The BitTorrent Protocol Specification", 1153 BITTORRENT 11031, February 2008, 1154 . 1156 [ISO3166-1] 1157 International Organization for Standardization, "ISO 3166- 1158 1:2006. Codes for the representation of names of 1159 countries and their subdivisions -- Part 1: Country 1160 codes", November 2006. 1162 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1163 and E. Maler, "Extensible Markup Language (XML) 1.0 1164 (Fourth Edition)", World Wide Web Consortium 1165 Recommendation REC-xml-20060816, August 2006, 1166 . 1168 [REC-xml-infoset] 1169 Cowan, J. and R. Tobin, "XML Information Set (Second 1170 Edition)", World Wide Web Consortium Recommendation REC- 1171 xml-infoset-20040204, February 2004, 1172 . 1174 [REC-xml-names] 1175 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1176 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1177 Consortium Recommendation REC-xml-names-20060816, 1178 August 2006, 1179 . 1181 [REC-xmlbase] 1182 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1183 June 2001, 1184 . 1186 [REC-xmldsig-core] 1187 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1188 Syntax and Processing (Second Edition)", World Wide Web 1189 Consortium Recommendation REC-xmldsig-core-20080610, 1190 June 2008, 1191 . 1193 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1194 Requirement Levels", BCP 14, RFC 2119, March 1997. 1196 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1198 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1199 Types", RFC 3023, January 2001. 1201 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1202 (SHA1)", RFC 3174, September 2001. 1204 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1205 Timestamps", RFC 3339, July 2002. 1207 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1208 January 2004. 1210 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1211 Resource Identifier (URI): Generic Syntax", STD 66, 1212 RFC 3986, January 2005. 1214 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1215 Identifiers (IRIs)", RFC 3987, January 2005. 1217 [RFC4646] Phillips, A. and M. Davis, "Tags for Identifying 1218 Languages", BCP 47, RFC 4646, September 2006. 1220 9.2. Informative References 1222 [ISO.8601.1988] 1223 International Organization for Standardization, "Data 1224 elements and interchange formats - Information interchange 1225 - Representation of dates and times", ISO Standard 8601, 1226 June 1988. 1228 [RELAX-NG] 1229 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1233 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1234 Format", RFC 4287, December 2005. 1236 [W3C.NOTE-datetime-19980827] 1237 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1238 NOTE NOTE-datetime-19980827, August 1998, 1239 . 1241 [W3C.REC-xmlschema-2-20041028] 1242 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1243 Second Edition", W3C REC REC-xmlschema-2-20041028, 1244 October 2004, 1245 . 1247 Appendix A. Acknowledgements and Contributors 1249 The layout and content of this document relies heavily on work 1250 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1252 The following people contributed to preliminary versions of this 1253 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1254 Burford, Giorgio Maone, Manuel Subredu, A. Bram Neijt, Max Velasques, 1255 Manolo Valdes, Urs Wolfer, Frederick Cheung, Nils Maier, Hampus 1256 Wessman, Hayden Legendre, Danny Ayers, Nick Dominguez, Rene 1257 Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, James Clark, Daniel 1258 Stenberg, Matt Domsch, Chris Newman, Lisa Dusseault, Ian Macfarlane, 1259 Dave Cridland, Julian Reschke, Barry Leiba, Uri Blumenthal, Paul 1260 Hoffman, Felix Sasaki, Matthias Fuchs, Eran Hammer-Lahav, and Mark 1261 Nottingham. The content and concepts within are a product of the 1262 Metalink community. 1264 The Metalink community has dozens of contributors who proposed ideas 1265 and wording for this document, or contributed to the evolution of 1266 Metalink, including: 1268 Nicolas Alvarez, Patrick Ruckstuhl, Sebastien Willemijns, Micah 1269 Cowan, Yazsoft, KGet developers, FDM Team, Orbit Team, Arne 1270 Babenhauserheide, Mathias Berchtold, Xienzhenyu and TheWorld Browser 1271 Team, Xi Software, Bridget and Ethan Fletcher, Ruben Kerkhof, 1272 Agostino Russo, Salvatore and Robin Musumeci, Steve and Rachel 1273 Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave Winquist, Bob 1274 Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve Kleisath, Chad 1275 Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, Derick Cordoba, 1276 Ryan Alexander, John Sowder, Sandra Amisano, Tom Mainville, Janie 1277 Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus Hofmann, Dan 1278 Connolly, Tim Berners-Lee, Louis Suarez-Potts, Ross Smith, Jeff 1279 Covey, Ed Lee, Shawn Wilsher, Mike Connor, Johan Svedberg, Dedric 1280 Carter, James Antill, Debi Goulding, the Anthony Family, the Bryan 1281 Family, Juanita Anthony and Zimmy Bryan. 1283 Appendix B. RELAX NG Compact Schema 1285 This appendix is informative. 1287 The Relax NG schema explicitly excludes elements in the Metalink 1288 namespace that are not defined in this revision of the specification. 1289 Requirements for Metalink Processors encountering such markup are 1290 given in Sections 6.2 and 6.3. 1292 # -*- rnc -*- 1293 # RELAX NG Compact Syntax Grammar for the 1294 # Metalink Format Specification Version 3 1296 namespace local = "" 1297 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1298 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1299 # Common attributes 1301 metalinkCommonAttributes = 1302 attribute xml:base { metalinkUri }?, 1303 attribute xml:lang { metalinkLanguageTag }?, 1304 undefinedAttribute* 1306 # Text Constructs 1308 metalinkTextConstruct = 1309 metalinkCommonAttributes, 1310 text 1312 # Date Construct 1314 metalinkDateConstruct = 1315 metalinkCommonAttributes, 1316 xsd:dateTime 1318 start = metalinkMetalink 1320 metalinkMetalink = 1321 element metalink:metalink { 1322 metalinkCommonAttributes, 1323 (metalinkDynamic? 1324 & metalinkFiles 1325 & metalinkGenerator? 1326 & metalinkOrigin? 1327 & metalinkPublished? 1328 & metalinkUpdated? 1329 & extensionElement*) 1330 } 1332 metalinkFiles = 1333 element metalink:files { 1334 metalinkCommonAttributes, 1335 (metalinkFile+ 1336 & extensionElement*) 1337 } 1339 metalinkFile = 1340 element metalink:file { 1341 metalinkCommonAttributes, 1342 attribute name { text }, 1343 (metalinkCopyright? 1344 & metalinkDescription? 1345 & metalinkIdentity? 1346 & metalinkLanguage? 1347 & metalinkLicense? 1348 & metalinkLogo? 1349 & metalinkOS? 1350 & metalinkPublisher? 1351 & metalinkResources 1352 & metalinkSize? 1353 & metalinkVerification? 1354 & metalinkVersion? 1355 & extensionElement*) 1356 } 1358 metalinkResources = 1359 element metalink:resources { 1360 metalinkCommonAttributes, 1361 (metalinkMetaURL* 1362 & metalinkURL* 1363 & extensionElement*) 1364 } 1366 metalinkVerification = 1367 element metalink:verification { 1368 metalinkCommonAttributes, 1369 (metalinkHash* 1370 & metalinkPieces* 1371 & metalinkSignature? 1372 & extensionElement*) 1373 } 1375 metalinkPieces = 1376 element metalink:pieces { 1377 attribute length { xsd:integer }, 1378 attribute type { text }, 1379 metalinkHash+ 1380 } 1382 metalinkCopyright = 1383 element metalink:copyright { 1384 metalinkTextConstruct 1385 } 1387 metalinkDescription = 1388 element metalink:description { 1389 metalinkTextConstruct 1390 } 1392 metalinkDynamic = 1393 element metalink:dynamic { 1394 "true" | "false" 1396 } 1398 metalinkGenerator = 1399 element metalink:generator { 1400 metalinkTextConstruct 1401 } 1403 metalinkHash = 1404 element metalink:hash { 1405 (attribute piece { xsd:integer } 1406 | attribute type { text }), 1407 text 1408 } 1410 metalinkIdentity = 1411 element metalink:identity { 1412 metalinkTextConstruct 1413 } 1415 metalinkLanguage = 1416 element metalink:language { 1417 metalinkTextConstruct 1418 } 1420 metalinkLicense = 1421 element metalink:license { 1422 metalinkCommonAttributes, 1423 attribute uri { metalinkUri }?, 1424 attribute name { text }? 1425 } 1427 metalinkLogo = 1428 element metalink:logo { 1429 metalinkCommonAttributes, 1430 (metalinkUri) 1431 } 1433 metalinkMetaURL = 1434 element metalink:metaurl { 1435 metalinkCommonAttributes, 1436 attribute preference { xsd:integer }?, 1437 attribute type { text }, 1438 attribute name { text }?, 1439 metalinkUri 1440 } 1442 metalinkOrigin = 1443 element metalink:origin { 1444 metalinkCommonAttributes, 1445 (metalinkUri) 1446 } 1448 metalinkOS = 1449 element metalink:os { 1450 metalinkTextConstruct 1451 } 1453 metalinkPublished = 1454 element metalink:published { 1455 metalinkDateConstruct 1456 } 1458 metalinkPublisher = 1459 element metalink:publisher { 1460 metalinkCommonAttributes, 1461 attribute uri { metalinkUri }?, 1462 attribute name { text }? 1463 } 1465 metalinkSignature = 1466 element metalink:signature { 1467 attribute type { "pgp" }, 1468 metalinkTextConstruct 1469 } 1471 metalinkSize = 1472 element metalink:size { 1473 metalinkTextConstruct 1474 } 1476 metalinkUpdated = 1477 element metalink:updated { 1478 metalinkDateConstruct 1479 } 1481 metalinkURL = 1482 element metalink:url { 1483 metalinkCommonAttributes, 1484 attribute location { xsd:string { 1485 minLength = "2" maxLength="2"} 1486 }?, 1487 attribute preference { xsd:integer }?, 1488 metalinkUri 1489 } 1491 metalinkVersion = 1492 element metalink:version { 1493 metalinkTextConstruct 1494 } 1496 # As defined in RFC 3066 and compatible with RFC 4646 1497 metalinkLanguageTag = xsd:string { 1498 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1499 } 1501 # Unconstrained; it's not entirely clear how IRI fit into 1502 # xsd:anyURI so let's not try to constrain it here 1503 metalinkUri = text 1505 # Simple Extension 1507 simpleExtensionElement = 1508 element * - metalink:* { 1509 text 1510 } 1512 # Structured Extension 1514 structuredExtensionElement = 1515 element * - metalink:* { 1516 (attribute * { text }+, 1517 (text|anyElement)*) 1518 | (attribute * { text }*, 1519 (text?, anyElement+, (text|anyElement)*)) 1520 } 1522 # Other Extensibility 1524 extensionElement = 1525 simpleExtensionElement | structuredExtensionElement 1527 undefinedAttribute = 1528 attribute * - (xml:base | xml:lang | local:*) { text } 1530 undefinedContent = (text|anyForeignElement)* 1532 anyElement = 1533 element * { 1534 (attribute * { text } 1535 | text 1536 | anyElement)* 1537 } 1539 anyForeignElement = 1540 element * - metalink:* { 1541 (attribute * { text } 1542 | text 1543 | anyElement)* 1544 } 1546 # EOF 1548 Appendix C. Document History (to be removed by RFC Editor before 1549 publication) 1551 [[ to be removed by the RFC editor before publication as an RFC. ]] 1553 Updated versions can be found at 1554 http://tools.ietf.org/html/draft-bryan-metalink with frequent updates 1555 in Subversion at 1556 http://metalinks.svn.sourceforge.net/viewvc/metalinks/internetdraft/ 1558 Known issues concerning this draft: 1559 o None. 1561 -11 : August 08, 2009. 1562 o Renamed type element (static or dynamic values) to dynamic element 1563 (true or false values). 1564 o Renamed metadata inheritance and most other elements from files 1565 element. 1567 -10 : July 28, 2009. 1568 o Schema fixes. 1569 o Rename metadata element to metaurl, add name attribute to it 1570 similar to file element's name attribute. 1571 o Update REC-xmldsig-core reference to second edition. 1573 -09 : July 11, 2009. 1574 o Replace ISO639-2 references with RFC 4646. 1575 o Add ISO3166-1. 1577 -08 : July 04, 2009. 1578 o Clarifications. 1579 o Remove "uri" and "version" attributes from generator element. 1581 -07 : June 18, 2009. 1582 o This ID describes the Metalink document format/schema. 1583 o Remove "Client Implementation Considerations" section. 1584 o Expand "Known issues" section of Document History. 1586 -06 : March 3, 2009. 1588 o Add authors and this Document History section. 1590 -05 : January 13, 2009. 1591 o Clarifications. 1593 -04 : December 31, 2008. 1594 o New IPR notice as required by IETF. 1595 o Correct "metalink:pieces" Element text. 1596 o Add hash examples. 1597 o Slim down "Securing Metalink Documents" section. 1598 o Recommend at least SHA1. 1600 -03 : September 19, 2008. 1601 o New namespace - urn:ietf:params:xml:ns:metalink 1602 o Use the IANA registry named "Operating System Names" to define 1603 values for OS types. 1604 o Add "Client Implementation Considerations" section, which includes 1605 Content Negotiation. 1607 -02 : September 4, 2008. 1608 o Use the IANA registry named "Hash Function Textual Names" for hash 1609 types. 1610 o metadata Element for listing .torrent, .metalink, etc. 1611 o Remove type attribute for url Element. 1613 -01 : August 28, 2008. 1614 o Clarify directory info in name attribute, hash types, add text for 1615 preference attribute. 1617 -00 : August 23, 2008. 1618 o Initial draft; Text largely based on RFC 4287, ideas from Metalink 1619 3.0 specification. 1621 Index 1623 A 1624 application/metalink+xml Media Type 24 1626 C 1627 copyright XML element 13 1629 D 1630 description XML element 14 1632 F 1633 file XML element 10 1634 files XML element 10 1636 G 1637 generator XML element 14 1638 Grammar 1639 metalinkCommonAttributes 7 1640 metalinkCopyright 13 1641 metalinkDateConstruct 8 1642 metalinkDescription 14 1643 metalinkFile 10 1644 metalinkFiles 10 1645 metalinkGenerator 14 1646 metalinkHash 15 1647 metalinkIdentity 16 1648 metalinkLanguage 16 1649 metalinkLicense 16 1650 metalinkLogo 17 1651 metalinkMetalink 9 1652 metalinkOrigin 18 1653 metalinkOS 18 1654 metalinkPieces 13 1655 metalinkPublished 19 1656 metalinkPublisher 19 1657 metalinkResources 12 1658 metalinkSignature 19 1659 metalinkSize 20 1660 metalinkTextConstruct 7 1661 metalinkType 14 1662 metalinkUpdated 20 1663 metalinkURL 17, 20 1664 metalinkVerification 12 1665 metalinkVersion 21 1666 simpleExtensionElement 22 1667 structuredExtensionElement 23 1669 H 1670 hash XML element 14 1672 I 1673 identity XML element 16 1675 L 1676 language XML element 16 1677 license XML element 16 1678 logo XML element 17 1680 M 1681 Media Type 1682 application/metalink+xml 24 1683 metadata XML element 17 1684 metalink XML element 9 1685 metalinkCommonAttributes grammar production 7 1686 metalinkCopyright grammar production 13 1687 metalinkDateConstruct grammar production 8 1688 metalinkDescription grammar production 14 1689 metalinkFile grammar production 10 1690 metalinkFiles grammar production 10 1691 metalinkGenerator grammar production 14 1692 metalinkHash grammar production 15 1693 metalinkIdentity grammar production 16 1694 metalinkLanguage grammar production 16 1695 metalinkLicense grammar production 16 1696 metalinkLogo grammar production 17 1697 metalinkMetalink grammar production 9 1698 metalinkOrigin grammar production 18 1699 metalinkOS grammar production 18 1700 metalinkPieces grammar production 13 1701 metalinkPublished grammar production 19 1702 metalinkPublisher grammar production 19 1703 metalinkResources grammar production 12 1704 metalinkSignature grammar production 19 1705 metalinkSize grammar production 20 1706 metalinkTextConstruct grammar production 7 1707 metalinkType grammar production 14 1708 metalinkUpdated grammar production 20 1709 metalinkURL grammar production 17, 20 1710 metalinkVerification grammar production 12 1711 metalinkVersion grammar production 21 1713 O 1714 origin XML element 18 1715 os XML element 18 1717 P 1718 pieces XML element 13 1719 published XML element 18 1720 publisher XML element 19 1722 R 1723 resources XML element 11 1725 S 1726 signature XML element 19 1727 simpleExtensionElement grammar production 22 1728 size XML element 20 1729 structuredExtensionElement grammar production 23 1731 T 1732 type XML element 14 1734 U 1735 updated XML element 20 1736 url XML element 20 1738 V 1739 verification XML element 12 1740 version XML element 21 1742 X 1743 XML Elements 1744 copyright 13 1745 description 14 1746 entry 10 1747 files 10 1748 generator 14 1749 hash 14 1750 identity 16 1751 language 16 1752 license 16 1753 logo 17 1754 metadata 17 1755 metalink 9 1756 origin 18 1757 os 18 1758 pieces 13 1759 published 18 1760 publisher 19 1761 resources 11 1762 signature 19 1763 size 20 1764 type 14 1765 updated 20 1766 url 20 1767 verification 12 1768 version 21 1770 Authors' Addresses 1772 Anthony Bryan (editor) 1773 Metalinker Project 1775 Email: anthonybryan@gmail.com 1776 URI: http://www.metalinker.org 1777 Tatsuhiro Tsujikawa (editor) 1778 Metalinker Project 1780 Email: tatsuhiro.t@gmail.com 1781 URI: http://aria2.sourceforge.net 1783 Neil McNab (editor) 1784 Metalinker Project 1786 Email: nabber00@gmail.com 1787 URI: http://www.nabber.org 1789 Peter Poeml (editor) 1790 Novell, Inc. 1792 Email: info@mirrorbrain.org 1793 URI: http://www.mirrorbrain.org/