idnits 2.17.1 draft-bryan-metalink-04.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. 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 lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (December 31, 2008) is 5595 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'BITTORRENT' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO3166' -- Possible downref: Non-RFC (?) normative reference: ref. 'ISO639-2' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml-infoset' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xml-names' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xmlbase' -- Possible downref: Non-RFC (?) normative reference: ref. 'REC-xmldsig-core' ** Downref: Normative reference to an Experimental RFC: RFC 2295 ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 3023 (Obsoleted by RFC 7303) ** Downref: Normative reference to an Informational RFC: RFC 3174 Summary: 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 Metalinker Project 4 Intended status: Standards Track December 31, 2008 5 Expires: July 4, 2009 7 The Metalink Download Description Format 8 draft-bryan-metalink-04 10 Status of this Memo 12 This Internet-Draft is submitted to IETF in full conformance with the 13 provisions of BCP 78 and BCP 79. 15 Internet-Drafts are working documents of the Internet Engineering 16 Task Force (IETF), its areas, and its working groups. Note that 17 other groups may also distribute working documents as Internet- 18 Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six months 21 and may be updated, replaced, or obsoleted by other documents at any 22 time. It is inappropriate to use Internet-Drafts as reference 23 material or to cite them other than as "work in progress." 25 The list of current Internet-Drafts can be accessed at 26 http://www.ietf.org/ietf/1id-abstracts.txt. 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 This Internet-Draft will expire on July 4, 2009. 33 Copyright Notice 35 Copyright (c) 2008 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents 40 (http://trustee.ietf.org/license-info) in effect on the date of 41 publication of this document. Please review these documents 42 carefully, as they describe your rights and restrictions with respect 43 to this document. 45 Abstract 47 This document specifies Metalink Documents, an XML-based download 48 description format. 50 Table of Contents 52 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 53 1.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . 4 54 1.2. Namespace and Version . . . . . . . . . . . . . . . . . . 5 55 1.3. Notational Conventions . . . . . . . . . . . . . . . . . . 5 56 2. Metalink Documents . . . . . . . . . . . . . . . . . . . . . . 6 57 3. Common Metalink Constructs . . . . . . . . . . . . . . . . . . 7 58 3.1. Text Constructs . . . . . . . . . . . . . . . . . . . . . 7 59 3.1.1. Text . . . . . . . . . . . . . . . . . . . . . . . . . 7 60 3.2. Date Constructs . . . . . . . . . . . . . . . . . . . . . 8 61 4. Metalink Element Definitions . . . . . . . . . . . . . . . . . 8 62 4.1. Container Elements . . . . . . . . . . . . . . . . . . . . 8 63 4.1.1. The "metalink:metalink" Element . . . . . . . . . . . 9 64 4.1.2. The "metalink:files" Element . . . . . . . . . . . . . 10 65 4.1.3. The "metalink:file" Element . . . . . . . . . . . . . 11 66 4.1.4. The "metalink:resources" Element . . . . . . . . . . . 12 67 4.1.5. The "metalink:verification" Element . . . . . . . . . 13 68 4.1.6. The "metalink:pieces" Element . . . . . . . . . . . . 13 69 4.2. Metadata Elements . . . . . . . . . . . . . . . . . . . . 14 70 4.2.1. The "metalink:copyright" Element . . . . . . . . . . . 14 71 4.2.2. The "metalink:description" Element . . . . . . . . . . 14 72 4.2.3. The "metalink:generator" Element . . . . . . . . . . . 14 73 4.2.4. The "metalink:hash" Element . . . . . . . . . . . . . 15 74 4.2.5. The "metalink:identity" Element . . . . . . . . . . . 16 75 4.2.6. The "metalink:language" Element . . . . . . . . . . . 17 76 4.2.7. The "metalink:license" Element . . . . . . . . . . . . 17 77 4.2.8. The "metalink:logo" Element . . . . . . . . . . . . . 17 78 4.2.9. The "metalink:metadata" Element . . . . . . . . . . . 17 79 4.2.10. The "metalink:origin" Element . . . . . . . . . . . . 18 80 4.2.11. The "metalink:os" Element . . . . . . . . . . . . . . 18 81 4.2.12. The "metalink:published" Element . . . . . . . . . . . 19 82 4.2.13. The "metalink:publisher" Element . . . . . . . . . . . 19 83 4.2.14. The "metalink:signature" Element . . . . . . . . . . . 19 84 4.2.15. The "metalink:size" Element . . . . . . . . . . . . . 20 85 4.2.16. The "metalink:type" Element . . . . . . . . . . . . . 20 86 4.2.17. The "metalink:updated" Element . . . . . . . . . . . . 20 87 4.2.18. The "metalink:url" Element . . . . . . . . . . . . . . 21 88 4.2.19. The "metalink:version" Element . . . . . . . . . . . . 21 89 5. Client Implementation Considerations . . . . . . . . . . . . . 22 90 6. Securing Metalink Documents . . . . . . . . . . . . . . . . . 22 91 7. Extending Metalink . . . . . . . . . . . . . . . . . . . . . . 23 92 7.1. Extensions from Non-Metalink Vocabularies . . . . . . . . 23 93 7.2. Extensions to the Metalink Vocabulary . . . . . . . . . . 23 94 7.3. Processing Foreign Markup . . . . . . . . . . . . . . . . 23 95 7.4. Extension Elements . . . . . . . . . . . . . . . . . . . . 23 96 7.4.1. Simple Extension Elements . . . . . . . . . . . . . . 24 97 7.4.2. Structured Extension Elements . . . . . . . . . . . . 24 99 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 24 100 8.1. XML Namespace Registration . . . . . . . . . . . . . . . . 25 101 8.2. application/metalink+xml MIME type . . . . . . . . . . . . 25 102 9. Security Considerations . . . . . . . . . . . . . . . . . . . 26 103 9.1. URIs and IRIs . . . . . . . . . . . . . . . . . . . . . . 26 104 9.2. Spoofing . . . . . . . . . . . . . . . . . . . . . . . . . 26 105 9.3. Cryptographic Hashes . . . . . . . . . . . . . . . . . . . 26 106 9.4. Signing . . . . . . . . . . . . . . . . . . . . . . . . . 26 107 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 108 10.1. Normative References . . . . . . . . . . . . . . . . . . . 27 109 10.2. Informative References . . . . . . . . . . . . . . . . . . 28 110 Appendix A. Contributors . . . . . . . . . . . . . . . . . . . . 29 111 Appendix B. RELAX NG Compact Schema . . . . . . . . . . . . . . . 30 112 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 113 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 36 115 1. Introduction 117 Metalink is an XML-based document format that describes a file or 118 lists of files to be added to a download queue. Lists are composed 119 of a number of files, each with an extensible set of attached 120 metadata. For example, each file can have a description, checksum, 121 and list of URIs that it is available from. 123 The primary use case that Metalink addresses is the description of 124 downloadable content in a format so download agents can act 125 intelligently and recover from common errors with little or no user 126 interaction necessary. These errors can include multiple servers 127 going down and data corrupted in transmission. 129 Discussion of this draft should take place on discuss@apps.ietf.org 130 or the Metalink discussion mailing list located at 131 metalink-discussion@googlegroups.com. To join the list, visit 132 http://groups.google.com/group/metalink-discussion . 134 1.1. Examples 136 A brief, single file Metalink Document: 138 139 140 141 142 143 ftp://ftp.example.com/example.ext 144 http://example.com/example.ext 145 146 http://example.com/example.ext.torrent 147 148 149 150 151 152 A more extensive, single file Metalink Document: 154 155 156 2008-05-15T12:23:23Z 157 158 159 Example 160 1.0 161 A description of the example file for 162 download. 163 164 80bc95fd391772fa61c91ed68567f0980bb45fd9 165 166 167 168 ftp://ftp.example.com/example.ext 169 http://example.com/example.ext 170 171 http://example.com/example.ext.torrent 172 173 174 175 176 178 1.2. Namespace and Version 180 The XML Namespaces URI [REC-xml-names] for the XML data format 181 described in this specification is: 183 urn:ietf:params:xml:ns:metalink 185 For convenience, this data format may be referred to as "Metalink", 186 which this specification uses internally. 188 1.3. Notational Conventions 190 This specification describes conformance of Metalink Documents. 191 Additionally, it places some requirements on Metalink Processors. 193 This specification uses the namespace prefix "metalink:" for the 194 Namespace URI identified in Section 1.2, above. Note that the choice 195 of namespace prefix is arbitrary and not semantically significant. 197 Metalink is specified using terms from the XML Infoset 198 [REC-xml-infoset]. However, this specification uses a shorthand for 199 two common terms: the phrase "Information Item" is omitted when 200 naming Element Information Items and Attribute Information Items. 201 Therefore, when this specification uses the term "element," it is 202 referring to an Element Information Item in Infoset terms. Likewise, 203 when it uses the term "attribute," it is referring to an Attribute 204 Information Item. 206 Some sections of this specification are illustrated with fragments of 207 a non-normative RELAX NG Compact schema [RELAX-NG]. However, the 208 text of this specification provides the definition of conformance. A 209 complete schema appears in Appendix B. 211 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 212 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 213 document are to be interpreted as described in BCP 14, [RFC2119], as 214 scoped to those conformance targets. 216 2. Metalink Documents 218 This specification describes Metalink Documents. 220 A Metalink Document describes a file or group of files, how to access 221 them, and metadata that identifies them. Its root is the metalink: 222 metalink element. 224 namespace metalink = "urn:ietf:params:xml:ns:metalink" 225 start = metalinkMetalink 227 Metalink Documents are specified in terms of the XML Information Set, 228 serialized as XML 1.0 [REC-xml] and identified with the "application/ 229 metalink+xml" media type. 231 Metalink Documents MUST be well-formed XML. This specification does 232 not define a DTD for Metalink Documents, and hence does not require 233 them to be valid (in the sense used by XML). 235 Metalink allows the use of IRIs [RFC3987]. Every URI [RFC3986] is 236 also an IRI, so a URI may be used wherever below an IRI is named. 237 There is one special consideration: when an IRI that is not also a 238 URI is given for dereferencing, it MUST be mapped to a URI using the 239 steps in Section 3.1 of [RFC3987]. 241 Any element defined by this specification MAY have an xml:base 242 attribute [REC-xmlbase]. When xml:base is used in an Metalink 243 Document, it serves the function described in Section 5.1.1 of 244 [RFC3986], establishing the base URI (or IRI) for resolving any 245 relative references found within the effective scope of the xml:base 246 attribute. 248 Any element defined by this specification MAY have an xml:lang 249 attribute, whose content indicates the natural language for the 250 element and its descendents. The language context is only 251 significant for elements and attributes declared to be "Language- 252 Sensitive" by this specification. Requirements regarding the content 253 and interpretation of xml:lang are specified in XML 1.0 [REC-xml], 254 Section 2.12. 256 metalinkCommonAttributes = 257 attribute xml:base { metalinkUri }?, 258 attribute xml:lang { metalinkLanguageTag }?, 259 undefinedAttribute* 261 Metalink is an extensible format. See Section 7 of this document for 262 a full description of how Metalink Documents can be extended. 264 3. Common Metalink Constructs 266 Many of Metalink's elements share a few common structures. This 267 section defines those structures and their requirements for 268 convenient reference by the appropriate element definitions. 270 When an element is identified as being a particular kind of 271 construct, it inherits the corresponding requirements from that 272 construct's definition in this section. 274 Note that there MUST NOT be any white space in a Date construct or in 275 any IRI. Some XML-emitting implementations erroneously insert white 276 space around values by default, and such implementations will emit 277 invalid Metalink Documents. 279 3.1. Text Constructs 281 A Text construct contains human-readable text, usually in small 282 quantities. The content of Text constructs is Language-Sensitive. 284 metalinkTextConstruct = 285 metalinkCommonAttributes, 286 text 288 3.1.1. Text 290 Example metalink:description with text content: 292 ... 293 294 A description of the example file for download. 295 296 ... 298 The content of the Text construct MUST NOT contain child elements. 299 Such text is intended to be presented to humans in a readable 300 fashion. Thus, Metalink Processors MAY collapse white space 301 (including line breaks) and display the text using typographic 302 techniques such as justification and proportional fonts. 304 3.2. Date Constructs 306 A Date construct is an element whose content MUST conform to the 307 "date-time" production in [RFC3339]. In addition, an uppercase "T" 308 character MUST be used to separate date and time, and an uppercase 309 "Z" character MUST be present in the absence of a numeric time zone 310 offset. 312 metalinkDateConstruct = 313 metalinkCommonAttributes, 314 xsd:dateTime 316 Such date values happen to be compatible with the following 317 specifications: [ISO.8601.1988], [W3C.NOTE-datetime-19980827], and 318 [W3C.REC-xmlschema-2-20041028]. 320 Example Date constructs: 322 2008-12-13T18:30:02Z 323 2008-12-13T18:30:02.25Z 324 2008-12-13T18:30:02+01:00 325 2008-12-13T18:30:02.25+01:00 327 Date values SHOULD be as accurate as possible. For example, it would 328 be generally inappropriate for a publishing system to apply the same 329 timestamp to several entries that were published during the course of 330 a single day. 332 4. Metalink Element Definitions 334 4.1. Container Elements 335 4.1.1. The "metalink:metalink" Element 337 The "metalink:metalink" element is the document (i.e., top-level) 338 element of a Metalink Document, acting as a container for metadata 339 and data associated with the listed files. It contains one 340 "metalink:files" element whose element children consist of metadata 341 elements followed by one or more metalink:file child elements. 343 metalinkMetalink = 344 element metalink:metalink { 345 metalinkCommonAttributes, 346 (metalinkPublished? 347 & metalinkOrigin? 348 & metalinkGenerator? 349 & metalinkUpdated? 350 & extensionElement*), 351 metalinkFiles 352 } 354 The following child elements are defined by this specification (note 355 that the presence of some of these elements is required): 357 o metalink:metalink elements MUST contain exactly one metalink:files 358 element. 359 o metalink:metalink elements MAY contain exactly one metalink:origin 360 element. If metalink:type is "dynamic", metalink:metalink 361 elements MAY contain exactly one metalink:origin element. 362 o metalink:metalink elements MAY contain exactly one metalink:type 363 element. 364 o metalink:metalink elements MAY contain exactly one metalink: 365 generator element. 366 o metalink:metalink elements MAY contain exactly one metalink: 367 published element. 368 o metalink:metalink elements MAY contain exactly one metalink: 369 updated element. If metalink:type is "dynamic", metalink:metalink 370 elements MAY contain exactly one metalink:updated element. 372 4.1.1.1. Providing Textual Content 374 Experience teaches that downloads providing textual content are in 375 general more useful than those that do not. Some applications (one 376 example is full-text indexers) require a minimum amount of text to 377 function reliably and predictably. Metalink publishers should be 378 aware of these issues. It is advisable that each metalink:file 379 element contain a non-empty metalink:description element, a non-empty 380 metalink:identity element when that element is present, and a non- 381 empty metalink:version element, and a non-empty metalink:publisher 382 element. However, the absence of metalink:description is not an 383 error, and Metalink Processors MUST NOT fail to function correctly as 384 a consequence of such an absence. 386 4.1.2. The "metalink:files" Element 388 The "metalink:files" element acts as a container for metadata and 389 data associated with the listed files. It contains one or more 390 metalink:file child elements. Certain elements can be listed either 391 under metalink:files or metalink:file. If under metalink:files, they 392 apply to all files listed in each metalink:file. If under metalink: 393 file, then they apply to just that specific file. 395 metalinkFiles = 396 element metalink:files { 397 metalinkCommonAttributes, 398 (metalinkIdentity? 399 & metalinkVersion? 400 & metalinkDescription? 401 & metalinkOS? 402 & metalinkLogo? 403 & metalinkLanguage? 404 & metalinkPublisher? 405 & metalinkCopyright? 406 & metalinkLicense? 407 & extensionElement*) 408 metalinkFile 409 } 411 The following child elements are defined by this specification (note 412 that the presence of some of these elements is required): 414 o metalink:files element MUST contain one or more metalink:file 415 elements. 416 o metalink:files elements SHOULD contain exactly one metalink: 417 identity element. 418 o metalink:files elements SHOULD contain exactly one metalink: 419 version element. 420 o metalink:files elements MAY contain exactly one metalink: 421 description element. 422 o metalink:files elements MAY contain exactly one metalink:os 423 element. 424 o metalink:files elements MAY contain exactly one metalink:logo 425 element. 426 o metalink:files elements MAY contain exactly one metalink:language 427 element. 428 o metalink:files elements MAY contain exactly one metalink:publisher 429 element. 431 o metalink:files elements MAY contain exactly one metalink:copyright 432 element. 433 o metalink:files elements MAY contain exactly one metalink:license 434 element. 436 4.1.3. The "metalink:file" Element 438 The "metalink:file" element represents an individual file, acting as 439 a container for metadata and data associated with the file. 441 metalinkFile = 442 element metalink:file { 443 metalinkCommonAttributes, 444 attribute name { metalinkTextConstruct }, 445 (metalinkVerification? 446 & metalinkIdentity? 447 & metalinkVersion? 448 & metalinkDescription? 449 & metalinkSize? 450 & metalinkOS? 451 & metalinkLogo? 452 & metalinkLanguage? 453 & metalinkPublisher? 454 & metalinkCopyright? 455 & metalinkLicense? 456 & extensionElement*) 457 metalinkResources 458 } 460 This specification assigns no significance to the order of metalink: 461 file elements. 463 The following child elements are defined by this specification (note 464 that it requires the presence of some of these elements): 466 o metalink:file elements MUST contain exactly one metalink:resources 467 element. 468 o metalink:file elements SHOULD contain exactly one metalink: 469 verification element. 470 o metalink:file elements SHOULD contain exactly one metalink: 471 identity element. 472 o metalink:file elements SHOULD contain exactly one metalink:version 473 element. 474 o metalink:file elements MAY contain exactly one metalink: 475 description element. 476 o metalink:file elements SHOULD contain exactly one metalink:size 477 element. 479 o metalink:file elements MAY contain exactly one metalink:os 480 element. 481 o metalink:file elements MAY contain exactly one metalink:logo 482 element. 483 o metalink:file elements MAY contain exactly one metalink:language 484 element. 485 o metalink:file elements MAY contain exactly one metalink:publisher 486 element. 487 o metalink:file elements MAY contain exactly one metalink:copyright 488 element. 489 o metalink:file elements MAY contain exactly one metalink:license 490 element. 492 4.1.3.1. The "name" Attribute 494 metalink:file elements MUST have a "name" attribute, which contains 495 the filename of the file downloaded. 497 Directory information can also be contained in a "path/file" format 498 only, as in: 500 502 In this example, a subdirectory debian-amd64/sarge/ will be created 503 and a file named Contents-amd64.gz will be created inside it. The 504 path MUST be relative. The path MUST NOT begin with a "/", "./" or 505 "../", contain "/../", or end with "/..". Metalink Processors MUST 506 NOT allow directory traversal. 508 A Metalink Processor MAY alter the name of the subdirectory or file 509 if they contain characters which are invalid in the destination 510 filesystem. 512 4.1.4. The "metalink:resources" Element 514 The "metalink:resources" element acts as a container for metadata and 515 data associated with the listed files. It contains one or more 516 metalink:url child elements. 518 metalinkResources = 519 element metalink:resources { 520 metalinkCommonAttributes, 521 extensionElement* 522 metalinkURL* 523 } 525 This specification assigns no significance to the order of metalink: 526 url elements. Significance is determined by the value of the 527 "preference" attribute of the metalink:url elements. 529 The following child elements are defined by this specification (note 530 that the presence of some of these elements is required): 532 o metalink:resources element MAY contain at least one metalink: 533 metadata element. 534 o metalink:resources element MUST contain at least one metalink:url 535 element. Typically, such elements contain more than one metalink: 536 url element to provide multiple download sources. 538 4.1.5. The "metalink:verification" Element 540 The "metalink:verification" element acts as a container for metadata 541 and data associated with verifying the listed files. This 542 information is in the form of checksums and digital signatures. 543 Checksums are used to verify the integrity of a complete file or 544 portion of a file to determine if the files have been transferred 545 without any errors. Digital signatures verify that a file is from 546 the entity that has signed it. 548 metalinkVerification = 549 element metalink:verification { 550 metalinkCommonAttributes, 551 (metalinkHash* 552 & metalinkPieces* 553 & metalinkSignature 554 & extensionElement*) 555 } 557 The following child elements are defined by this specification (note 558 that the presence of some of these elements is required): 560 o metalink:verification element MAY contain one or more metalink: 561 hash elements. 562 o metalink:verification element MAY contain one or more metalink: 563 pieces elements. 564 o metalink:verification element MAY contain exactly one metalink: 565 signature elements. 567 4.1.6. The "metalink:pieces" Element 569 The "metalink:pieces" element acts as a container for metadata and 570 data associated with verifying the listed files. This information is 571 in the form of checksums for a portion of a file. 573 metalinkPieces = 574 element metalink:pieces { 575 attribute length { metalinkTextConstruct }, 576 attribute type { metalinkTextConstruct }, 577 hash+ 578 }+, 580 4.1.6.1. The "type" Attribute 582 metalink:pieces elements MUST have a "type" attribute. 584 The IANA registry named "Hash Function Textual Names" defines values 585 for hash types. Metalink Generators and Processors supporting 586 verification SHOULD at least implement "sha-1" which is SHA1, as 587 specified in [RFC3174]. 589 4.1.6.2. The "length" Attribute 591 metalink:pieces elements MUST have a "length" attribute, which is an 592 integer that describes the length of the piece of the file in octets. 594 4.2. Metadata Elements 596 4.2.1. The "metalink:copyright" Element 598 The "metalink:copyright" element is a Text construct that conveys a 599 human-readable copyright for a file. 601 metalinkCopyright = 602 element metalink:copyright { 603 metalinkTextConstruct 604 } 606 4.2.2. The "metalink:description" Element 608 The "metalink:description" element is a Text construct that conveys a 609 human-readable description for a file. 611 metalinkDescription = 612 element metalink:description { 613 metalinkTextConstruct 614 } 616 4.2.3. The "metalink:generator" Element 618 The "metalink:generator" element's content identifies the agent used 619 to generate a Metalink Document, for debugging and other purposes. 621 metalinkGenerator = element metalink:generator { 622 metalinkCommonAttributes, 623 attribute uri { metalinkUri }?, 624 attribute version { text }?, 625 text 626 } 628 The content of this element, when present, MUST be a string that is a 629 human-readable name for the generating agent. Entities such as 630 "&" and "<" represent their corresponding characters ("&" and 631 "<" respectively), not markup. 633 The metalink:generator element MAY have a "uri" attribute whose value 634 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 635 URI (mapped from an IRI, if necessary) SHOULD produce a 636 representation that is relevant to that agent. 638 The metalink:generator element MAY have a "version" attribute that 639 indicates the version of the generating agent. 641 4.2.4. The "metalink:hash" Element 643 The "metalink:hash" element is a Text construct that conveys a hash 644 for a file. All hashes are encoded in lowercase hexadecimal format. 646 metalinkHash = 647 element metalink:hash { 648 attribute piece { xsd:integer }?, 649 attribute type { metalinkTextConstruct }, 650 text 651 } 653 Metalinks can contain multiples hashes for a complete file, for 654 example both SHA-1 and SHA-256. 656 ... 657 658 a97fcf6ba9358f8a6f62beee4421863d3e52b080 659 fc87941af7fd7f03e53b34af393f4c14923d74 660 825f51116ff591336af4880227 661 662 ... 664 Metalinks can also contain hashes for individual pieces of a file. 666 ... 667 668 a97fcf6ba9358f8a6f62beee4421863d3e52b080 669 fc87941af7fd7f03e53b34af393f4c14923d74 670 825f51116ff591336af4880227 671 672 d96b9a4b92a899c2099b7b31bddb5ca423bb9b30 673 10d68f4b1119014c123da2a0a6baf5c8a6d5ba1e 674 3e84219096435c34e092b17b70a011771c52d87a 675 67183e4c3ab892d3ebe8326b7d79eb62d077f487 676 677 678 ... 680 metalink:hash elements MUST have a "type" attribute or a "piece" 681 attribute. metalink:hash elements with a "type" attribute contain a 682 hash of the whole file. metalink:hash elements with a "piece" 683 attribute contain a hash for that specific piece or chunk of the 684 file. 686 4.2.4.1. The "type" Attribute 688 The IANA registry named "Hash Function Textual Names" defines values 689 for hash types. Metalink Generators and Processors supporting 690 verification SHOULD at least implement "sha-1" which is SHA1, as 691 specified in [RFC3174]. 693 4.2.4.2. The "piece" Attribute 695 metalink:hash elements MAY have a "piece" attribute, only when they 696 are a sub element of metalink:pieces. The value of "piece" starts at 697 "0" and increases, depending on the "length" attribute of metalink: 698 pieces and the size of the file. Depending on the size of a file, 699 the last piece may not be the same size as the others. 701 4.2.5. The "metalink:identity" Element 703 The "metalink:identity" element is a Text construct that conveys a 704 human-readable identity for a file. The identity of OpenOffice.org 705 3.0 would be "OpenOffice.org". 707 metalinkIdentity = 708 element metalink:identity { 709 metalinkTextConstruct 710 } 712 4.2.6. The "metalink:language" Element 714 The "metalink:language" element is a Text construct that conveys a 715 code for the language of a file, per [ISO639-2]. 717 metalinkLanguage = 718 element metalink:language { 719 metalinkTextConstruct 720 } 722 4.2.7. The "metalink:license" Element 724 The "metalink:license" element is a Text construct that conveys a 725 human-readable license name for a file. 727 metalinkLicense = 728 element metalink:license { 729 metalinkCommonAttributes, 730 attribute uri { metalinkUri }?, 731 attribute name { metalinkTextConstruct }?, 732 } 734 The metalink:license element MAY have a "uri" attribute whose value 735 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 736 URI (mapped from an IRI, if necessary) SHOULD produce a 737 representation that is relevant to that agent. 739 The metalink:license element MAY have a "name" attribute that 740 indicates the name of the license. 742 4.2.8. The "metalink:logo" Element 744 The "metalink:logo" element's content is an IRI reference [RFC3987] 745 that identifies an image that provides visual identification for a 746 file. 748 metalinkLogo = element metalink:logo { 749 metalinkCommonAttributes, 750 (metalinkUri) 751 } 753 The image SHOULD have an aspect ratio of one (horizontal) to one 754 (vertical) and SHOULD be suitable for presentation at a small size. 756 4.2.9. The "metalink:metadata" Element 758 The "metalink:metadata" element contains the IRI of metadata about a 759 resource to download. For example, this could be the IRI of a 760 BitTorrent .torrent file or a Metalink Document. 762 metalinkMetadata = 763 element metalink:metadata { 764 metalinkCommonAttributes, 765 attribute preference { xsd:integer }?, 766 attribute type { metalinkTextConstruct }, 767 metalinkUri 768 }+ 770 4.2.9.1. The "preference" Attribute 772 metalink:metadata elements MAY have a preference attribute, whose 773 value MUST be a number from 1 to 100 for priority, with 100 used 774 first and 1 used last. See the "preference" attribute of the 775 metalink:url element for more information. 777 4.2.9.2. The "type" Attribute 779 metalink:metadata elements MUST have a "type" attribute that 780 indicates the MIME type of the metadata available at the IRI. In the 781 case of BitTorrent as specified in [BITTORRENT], the value "torrent" 782 is required. Types without "/" are reserved. Currently, "torrent" 783 is the only reserved value. 785 Metalink Processors that do not support a specified type of metadata 786 about a resource to download MUST ignore that metadata. 788 4.2.10. The "metalink:origin" Element 790 The "metalink:origin" element is an IRI where the Metalink Document 791 was originally published. If metalink:type is "dynamic", then 792 updated versions of the Metalink can be found at this IRI. 794 metalinkOrigin = element metalink:origin { 795 metalinkCommonAttributes, 796 (metalinkUri) 797 } 799 4.2.11. The "metalink:os" Element 801 The "metalink:os" element is a Text construct that conveys a human- 802 readable Operating System for a file. The IANA registry named 803 "Operating System Names" defines values for OS types. 805 metalinkOS = 806 element metalink:os { 807 metalinkTextConstruct 808 } 810 4.2.12. The "metalink:published" Element 812 The "metalink:published" element is a Date construct indicating an 813 instant in time associated with an event early in the life cycle of 814 the entry. 816 metalinkPublished = 817 element metalink:published { 818 metalinkDateConstruct 819 } 821 Typically, metalink:published will be associated with the initial 822 creation or first availability of the resource. 824 4.2.13. The "metalink:publisher" Element 826 The "metalink:publisher" element indicates a group or other entity 827 which has published the file. 829 metalinkPublisher = 830 element metalink:publisher { 831 metalinkCommonAttributes, 832 attribute uri { metalinkUri }?, 833 attribute name { metalinkTextConstruct }?, 834 } 836 The metalink:publisher element MAY have a "uri" attribute whose value 837 MUST be an IRI reference [RFC3987]. When dereferenced, the resulting 838 URI (mapped from an IRI, if necessary) SHOULD produce a 839 representation that is relevant to that agent. 841 The metalink:publisher element MAY have a "name" attribute that 842 indicates the name of the publisher. 844 4.2.14. The "metalink:signature" Element 846 The "metalink:signature" element is a Text construct that conveys a 847 digital signature for a file described in a Metalink Document. 849 metalinkSignature = 850 element metalink:signature { 851 attribute type { "pgp" }, 852 metalinkTextConstruct 853 } 855 4.2.14.1. The "type" Attribute 857 metalink:signature elements MUST have a "type" attribute. The inital 858 value of "type" is the string that is non-empty and matches "pgp". 859 It may be useful to extend Metalink documents with new types of 860 digital signatures, so unknown types are allowed. 862 4.2.15. The "metalink:size" Element 864 The "metalink:size" element indicates the length of the linked 865 content in octets; it is a hint about the content length of the 866 representation returned when the IRI is mapped to a URI and 867 dereferenced. Note that the "metalink:size" element MUST override 868 the actual content length of the representation as reported by the 869 underlying protocol, i.e. files with different sizes should be 870 discarded. 872 metalinkSize = 873 element metalink:size { 874 metalinkTextConstruct 875 } 877 4.2.16. The "metalink:type" Element 879 The "metalink:type" element is a Text construct that describes 880 whether the IRI from "metalink:origin" a Metalink will contain 881 dynamic updated Metalinks or static content that is not updated. 883 metalinkType = 884 element metalink:type { 885 "static" | "dynamic" 886 } 888 4.2.17. The "metalink:updated" Element 890 The "metalink:updated" element is a Date construct indicating the 891 most recent instant in time when a Metalink was modified in a way the 892 publisher considers significant. Therefore, not all modifications 893 necessarily result in a changed metalink:updated value. 895 metalinkUpdated = 896 element metalink:updated { 897 metalinkDateConstruct 898 } 900 Publishers MAY change the value of this element over time. 902 4.2.18. The "metalink:url" Element 904 The "metalink:url" element contains the IRI of a file. All IRIs MUST 905 lead to identical files. 907 metalinkURL = 908 element metalink:url { 909 metalinkCommonAttributes, 910 attribute location { xsd:string { 911 minLength = "2" maxLength="2"} 912 }?, 913 attribute preference { xsd:integer }?, 914 metalinkUri 915 }+ 917 4.2.18.1. The "preference" Attribute 919 metalink:url elements MAY have a preference attribute, whose value 920 MUST be a number from 1 to 100 for priority, with 100 used first and 921 1 used last. Multiple metalink:url elements can have the same 922 preference, i.e. ten mirrors could have preference="100". A Metalink 923 Processor MAY download different segments of a file from more than 924 one IRI simultaneously, and when doing so SHOULD first use the 925 highest priority IRIs and then use lower ones. 927 When one or more metalink:url elements have a preference attribute 928 value of "100", other metalink:url elements SHOULD NOT be used, 929 unless the elements with a preference of 100 cannot be processed 930 (e.g. if they are of a metalink:metadata element type which is not 931 supported by the Metalink Processor, such as BitTorrent, or if the 932 servers are unavailable). 934 Any metalink:url elements with a preference attribute value of "1" 935 SHOULD NOT be used unless all other metalink:url elements cannot be 936 processed (e.g. if they are of a metalink:metadata element type which 937 is not supported by the Metalink Processor, such as BitTorrent, or if 938 the servers are unavailable). 940 4.2.18.2. The "location" Attribute 942 metalink:url elements MAY have a "location" attribute, which is a 943 [ISO3166] alpha-2 two letter country code for the geographical 944 location of the physical server an IRI is used to access. 946 4.2.19. The "metalink:version" Element 948 The "metalink:version" element is a Text construct that conveys a 949 human-readable version for a file. The version of OpenOffice.org 3.0 950 would be "3.0". 952 metalinkVersion = 953 element metalink:version { 954 metalinkTextConstruct 955 } 957 5. Client Implementation Considerations 959 Metalink Processors that support HTTP MUST support transparent 960 content negotiation with HTTP [RFC2295]. Transparent content 961 negotiation is accomplished by adding the Metalink media type to the 962 Accept request header. Metalink Processors MUST check the returned 963 content type, and if the Metalink media type is used, it MUST process 964 the Metalink. If the content type does not match the Metalink media 965 type, then Metalink Processors SHOULD handle the response as a normal 966 response. Metalink Processors MUST NOT add the Metalink media type 967 to Accept when requesting a URI from a metalink:url element, thus 968 avoiding loops. Metalink Processors SHOULD handle external redirects 969 that might lead to a Metalink. 971 When multiple hash types methods are provided, a Metalink Processor 972 MAY verify using more than one of these hash types. Metalink 973 Processors are encouraged to check all hash types given which they 974 are able to verify. 976 6. Securing Metalink Documents 978 Because Metalink is an XML-based format, existing XML security 979 mechanisms can be used to secure its content. 981 Producers of Metalinks may have sound reasons for signing otherwise- 982 unprotected content. For example, a merchant might digitally sign a 983 Metalink that lists a file download to verify its origin. Other 984 merchants may wish to sign and encypt Metalinks that list digital 985 songs that have been purchased. Of course, many other examples exist 986 as well. 988 The algorithm requirements in this section pertain to the Metalink 989 Processor. They require that a recipient, at a minimum, be able to 990 handle messages that use the specified cryptographic algorithms. 991 These requirements do not limit the algorithms that the sender can 992 choose. 994 Metalink Processors that verify signed Metalink Documents MUST at 995 least support XML-Signature and Syntax Processing [REC-xmldsig-core]. 997 7. Extending Metalink 999 7.1. Extensions from Non-Metalink Vocabularies 1001 This specification describes Metalink's XML markup vocabulary. 1002 Markup from other vocabularies ("foreign markup") can be used in an 1003 Metalink Document. 1005 7.2. Extensions to the Metalink Vocabulary 1007 The Metalink namespace is reserved for future forward-compatible 1008 revisions of Metalink. Future versions of this specification could 1009 add new elements and attributes to the Metalink markup vocabulary. 1010 Software written to conform to this version of the specification will 1011 not be able to process such markup correctly and, in fact, will not 1012 be able to distinguish it from markup error. For the purposes of 1013 this discussion, unrecognized markup from the Metalink vocabulary 1014 will be considered "foreign markup". 1016 7.3. Processing Foreign Markup 1018 Metalink Processors that encounter foreign markup in a location that 1019 is legal according to this specification MUST NOT stop processing or 1020 signal an error. It might be the case that the Metalink Processor is 1021 able to process the foreign markup correctly and does so. Otherwise, 1022 such markup is termed "unknown foreign markup". 1024 When unknown foreign markup is encountered as a child of metalink: 1025 file, metalink:metalink, Metalink Processors MAY bypass the markup 1026 and any textual content and MUST NOT change their behavior as a 1027 result of the markup's presence. 1029 When unknown foreign markup is encountered in a Text Construct, 1030 software SHOULD ignore the markup and process any text content of 1031 foreign elements as though the surrounding markup were not present. 1033 7.4. Extension Elements 1035 Metalink allows foreign markup anywhere in an Metalink document, 1036 except where it is explicitly forbidden. Child elements of metalink: 1037 file and metalink:metalink are considered Metadata elements and are 1038 described below. Child elements of Person constructs are considered 1039 to apply to the construct. The role of other foreign markup is 1040 undefined by this specification. 1042 7.4.1. Simple Extension Elements 1044 A Simple Extension element MUST NOT have any attributes or child 1045 elements. The element MAY contain character data or be empty. 1046 Simple Extension elements are not Language-Sensitive. 1048 simpleExtensionElement = 1049 element * - metalink:* { 1050 text 1051 } 1053 The element can be interpreted as a simple property (or name/value 1054 pair) of the parent element that encloses it. The pair consisting of 1055 the namespace-URI of the element and the local name of the element 1056 can be interpreted as the name of the property. The character data 1057 content of the element can be interpreted as the value of the 1058 property. If the element is empty, then the property value can be 1059 interpreted as an empty string. 1061 7.4.2. Structured Extension Elements 1063 The root element of a Structured Extension element MUST have at least 1064 one attribute or child element. It MAY have attributes, it MAY 1065 contain well-formed XML content (including character data), or it MAY 1066 be empty. Structured Extension elements are Language-Sensitive. 1068 structuredExtensionElement = 1069 element * - metalink:* { 1070 (attribute * { text }+, 1071 (text|anyElement)*) 1072 | (attribute * { text }*, 1073 (text?, anyElement+, (text|anyElement)*)) 1074 } 1076 The structure of a Structured Extension element, including the order 1077 of its child elements, could be significant. 1079 This specification does not provide an interpretation of a Structured 1080 Extension element. The syntax of the XML contained in the element 1081 (and an interpretation of how the element relates to its containing 1082 element) is defined by the specification of the Metalink extension. 1084 8. IANA Considerations 1085 8.1. XML Namespace Registration 1087 This document makes use of the XML registry specified in [RFC3688]. 1088 Accordingly, IANA has made the following registration: 1090 Registration request for the Metalink namespace: 1092 URI: urn:ietf:params:xml:ns:metalink 1094 Registrant Contact: See the "Author's Address" section of this 1095 document. 1097 XML: None. Namespace URIs do not represent an XML specification. 1099 8.2. application/metalink+xml MIME type 1101 A Metalink Document, when serialized as XML 1.0, can be identified 1102 with the following media type: 1104 MIME media type name: application 1105 MIME subtype name: metalink+xml 1106 Mandatory parameters: None. 1107 Optional parameters: 1108 "charset": This parameter has semantics identical to the charset 1109 parameter of the "application/xml" media type as specified in 1110 [RFC3023]. 1111 Encoding considerations: Identical to those of "application/xml" as 1112 described in [RFC3023], Section 3.2. 1113 Security considerations: As defined in this specification. 1114 In addition, as this media type uses the "+xml" convention, it 1115 shares the same security considerations as described in [RFC3023], 1116 Section 10. 1117 Interoperability considerations: There are no known interoperability 1118 issues. 1119 Published specification: This specification. 1120 Applications that use this media type: No known applications 1121 currently use this media type. 1123 Additional information: 1125 Magic number(s): As specified for "application/xml" in [RFC3023], 1126 Section 3.2. 1127 File extension: .metalink 1128 Fragment identifiers: As specified for "application/xml" in 1129 [RFC3023], Section 5. 1131 Base URI: As specified in [RFC3023], Section 6. 1132 Macintosh File Type code: TEXT 1133 Person and email address to contact for further information: Anthony 1134 Bryan 1135 Intended usage: COMMON 1136 Author/Change controller: IESG 1138 9. Security Considerations 1140 Publishers are encouraged to offer Metalink documents via 1141 authenticated HTTP under TLS as specified in [RFC2818]. Publishers 1142 are also encouraged to include digital signatures of the files within 1143 the Metalink Documents if they are available. 1145 9.1. URIs and IRIs 1147 Metalink Processors handle URIs and IRIs. See Section 7 of [RFC3986] 1148 and Section 8 of [RFC3987] for security considerations related to 1149 their handling and use. 1151 9.2. Spoofing 1153 Metalink Processors should be aware of the potential for spoofing 1154 attacks where the attacker publishes Metalinks with false 1155 information. Malicious publishers might create Metalink Documents 1156 containing inaccurate information anywhere in the document. At best, 1157 this could deceive unaware downloaders that they are downloading a 1158 malicious or worthless file. At worst, malicious publishers could 1159 attempt a distributed denial of service attack by inserting unrelated 1160 IRIs into Metalink Documents. 1162 9.3. Cryptographic Hashes 1164 Currently, some of the hash types defined in the IANA registry named 1165 "Hash Function Textual Names" are considered insecure. These include 1166 the whole Message Digest family of algorithms which are not suitable 1167 for cryptographically strong verification. Malicious people could 1168 provide files that appear to be identical to another file because of 1169 a collision, i.e. the weak cryptographic hashes match. 1171 Metalink Generators and Processors supporting verification SHOULD at 1172 least implement "sha-1" which is SHA1, as specified in [RFC3174]. 1174 9.4. Signing 1176 Metalink Documents SHOULD be signed using [REC-xmldsig-core] and are 1177 subject to the security considerations implied by its use. This 1178 addresses the issue of spoofing. 1180 Digital signatures provide authentication, message integrity, and 1181 non-repudiation with proof of origin. 1183 10. References 1185 10.1. Normative References 1187 [BITTORRENT] 1188 Cohen, B., "The BitTorrent Protocol Specification", 1189 BITTORRENT 11031, February 2008, 1190 . 1192 [ISO3166] International Organization for Standardization, "ISO 3166: 1193 1988 (E/F) - Codes for the representation of names of 1194 countries - The International Organization for 1195 Standardization, 3rd edition, 1988-08-15.", ISO Standard 1196 3166, 1988. 1198 [ISO639-2] 1199 International Organization for Standardization, "ISO 639- 1200 2:1998 - Codes for the representation of names of 1201 languages -- Part 2: Alpha-3 code - edition 1, 1202 1998-11-01, 66 pages, prepared by a Joint Working Group of 1203 ISO TC46/SC4 and ISO TC37/SC2.", ISO Standard 639-2, 1998. 1205 [REC-xml] Yergeau, F., Paoli, J., Bray, T., Sperberg-McQueen, C., 1206 and E. Maler, "Extensible Markup Language (XML) 1.0 1207 (Fourth Edition)", World Wide Web Consortium 1208 Recommendation REC-xml-20060816, August 2006, 1209 . 1211 [REC-xml-infoset] 1212 Cowan, J. and R. Tobin, "XML Information Set (Second 1213 Edition)", World Wide Web Consortium Recommendation REC- 1214 xml-infoset-20040204, February 2004, 1215 . 1217 [REC-xml-names] 1218 Hollander, D., Bray, T., Tobin, R., and A. Layman, 1219 "Namespaces in XML 1.0 (Second Edition)", World Wide Web 1220 Consortium Recommendation REC-xml-names-20060816, 1221 August 2006, 1222 . 1224 [REC-xmlbase] 1225 Marsh, J., "XML Base", W3C REC W3C.REC-xmlbase-20010627, 1226 June 2001, 1227 . 1229 [REC-xmldsig-core] 1230 Solo, D., Reagle, J., and D. Eastlake, "XML-Signature 1231 Syntax and Processing", World Wide Web Consortium 1232 Recommendation REC-xmldsig-core-20020212, February 2002, 1233 . 1235 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1236 Requirement Levels", BCP 14, RFC 2119, March 1997. 1238 [RFC2295] Holtman, K. and A. Mutz, "Transparent Content Negotiation 1239 in HTTP", RFC 2295, March 1998. 1241 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 1243 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media 1244 Types", RFC 3023, January 2001. 1246 [RFC3174] Eastlake, D. and P. Jones, "US Secure Hash Algorithm 1 1247 (SHA1)", RFC 3174, September 2001. 1249 [RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: 1250 Timestamps", RFC 3339, July 2002. 1252 [RFC3688] Mealling, M., "The IETF XML Registry", BCP 81, RFC 3688, 1253 January 2004. 1255 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1256 Resource Identifier (URI): Generic Syntax", STD 66, 1257 RFC 3986, January 2005. 1259 [RFC3987] Duerst, M. and M. Suignard, "Internationalized Resource 1260 Identifiers (IRIs)", RFC 3987, January 2005. 1262 10.2. Informative References 1264 [ISO.8601.1988] 1265 International Organization for Standardization, "Data 1266 elements and interchange formats - Information interchange 1267 - Representation of dates and times", ISO Standard 8601, 1268 June 1988. 1270 [RELAX-NG] 1271 Clark, J., "RELAX NG Compact Syntax", December 2001, . 1275 [RFC4287] Nottingham, M. and R. Sayre, "The Atom Syndication 1276 Format", RFC 4287, December 2005. 1278 [W3C.NOTE-datetime-19980827] 1279 Wolf, M. and C. Wicksteed, "Date and Time Formats", W3C 1280 NOTE NOTE-datetime-19980827, August 1998, 1281 . 1283 [W3C.REC-xmlschema-2-20041028] 1284 Malhotra, A. and P. Biron, "XML Schema Part 2: Datatypes 1285 Second Edition", W3C REC REC-xmlschema-2-20041028, 1286 October 2004, 1287 . 1289 Appendix A. Contributors 1291 The layout and content of this document relies heavily on work 1292 pioneered in the Atom Syndication Format as specified in [RFC4287]. 1294 The following people contributed to preliminary versions of this 1295 document: Paul Burkhead, Kristian Weston, Darius Liktorius, Michael 1296 Burford, Giorgio Maone, Manuel Subredu, Tatsuhiro Tsujikawa, A. Bram 1297 Neijt, Max Velasques, Manolo Valdes, Urs Wolfer, Frederick Cheung, 1298 Nils Maier, Hampus Wessman, Neil McNab, Hayden Legendre, Danny Ayers, 1299 Nick Dominguez, Rene Leonhardt, Per Oyvind Karlsen, Gary Zellerbach, 1300 James Clark, Daniel Stenberg, Peter Poeml, Matt Domsch, Chris Newman, 1301 Lisa Dusseault, Ian Macfarlane, Dave Cridland, Julian Reschke, Barry 1302 Leiba, Uri Blumenthal, and Paul Hoffman. The content and concepts 1303 within are a product of the Metalink community. 1305 The Metalink community has dozens of contributors who proposed ideas 1306 and wording for this document, or contributed to the evolution of 1307 Metalink, including: 1309 Nicolas Alvarez, Patrick Ruckstuhl, Mike Wells, Sebastien Willemijns, 1310 Micah Cowan, Dan Fandrich, Francis Giannaros, Yazsoft, Lukas 1311 Appelhans, KGet developers, FDM Team, Orbit Team, Arne 1312 Babenhauserheide, Mathias Berchtold, Xienzhenyu and TheWorld Browser 1313 Team, Xi Software, Bridget and Ethan Fletcher, Ruben Kerkhof, 1314 Agostino Russo, Gervase Markham, Salvatore and Robin Musumeci, Steve 1315 and Rachel Eshelman, Lucas Hewett, Ryan and Darren Cronin, Dave 1316 Winquist, Bob Denison, Wes Shelton, Kees Cook, Josh Colbert, Steve 1317 Kleisath, Chad Neptune, Nick Carrabba, Chris Carrabba, Erin Solari, 1318 Derick Cordoba, Ryan Alexander, John Sowder, Sandra Amisano, Tom 1319 Mainville, Janie Wargo, Jason Hansen, Tim Bray, Dan Brickley, Markus 1320 Hofmann, Dan Connolly, Tim Berners-Lee, Harry Chen, Adrien Macneil, 1321 Louis Suarez-Potts, Ross Smith, Rahul Sundaram, Jesse Keating, Michal 1322 Bentkowski, Andrew Pantyukhin, Judd Vinet, Charles Landemaine, Pascal 1323 Bleser, Jeff@BLAG, Yuichiro Nakada, Jereme Hancock, Marcel Hauser, 1324 Jeff Covey, Doug Lang, Seth Brown, Alexander Lazic, Mayank Sharma, 1325 Robin Heggelund Hansen, Steve Langasek, Federico Parodi, Stefano 1326 Verna, Jason Green, James Linden, Matt Nederlanden, Aren Olsen, Dag 1327 Odenhall, Troy Sobotka, Corey Farwell, Ed Lee, Shawn Wilsher, Mike 1328 Connor, Anand Muttagi, Dedric Carter, Debi Goulding, the Anthony 1329 Family, the Bryan Family, Juanita Anthony and Zimmy Bryan. 1331 Appendix B. RELAX NG Compact Schema 1333 This appendix is informative. 1335 The Relax NG schema explicitly excludes elements in the Metalink 1336 namespace that are not defined in this revision of the specification. 1337 Requirements for Metalink Processors encountering such markup are 1338 given in Sections 7.2 and 7.3. 1340 # -*- rnc -*- 1341 # RELAX NG Compact Syntax Grammar for the 1342 # Metalink Format Specification Version 1 1344 namespace metalink = "urn:ietf:params:xml:ns:metalink" 1345 namespace xsd = "http://www.w3.org/2001/XMLSchema" 1347 # Common attributes 1349 metalinkCommonAttributes = 1350 attribute xml:base { metalinkUri }?, 1351 attribute xml:lang { metalinkLanguageTag }?, 1352 undefinedAttribute* 1354 # Text Constructs 1356 metalinkTextConstruct = 1357 metalinkCommonAttributes, 1358 text 1360 # Date Construct 1362 metalinkDateConstruct = 1363 metalinkCommonAttributes, 1364 xsd:dateTime 1366 start = 1367 element metalink:metalink { 1368 element metalink:generator { 1369 attribute uri { metalinkUri }?, 1370 attribute version { text }?, 1371 metalinkTextConstruct 1372 } 1373 element metalink:origin { metalinkUri }?, 1374 element metalink:type { "static" | "dynamic" }?, 1375 element metalink:published { metalinkDateConstruct }?, 1376 element metalink:updated { metalinkDateConstruct }?, 1377 element metalink:files { 1378 element metalink:file { 1379 attribute name { metalinkTextConstruct }, 1380 element metalink:identity { metalinkTextConstruct }?, 1381 element metalink:version { metalinkTextConstruct }?, 1382 element metalink:size { xsd:integer }?, 1383 element metalink:description { metalinkTextConstruct }?, 1384 element metalink:license { 1385 attribute uri { metalinkUri }?, 1386 attribute name { metalinkTextConstruct }?, 1387 }?, 1388 element metalink:logo { metalinkUri }?, 1389 element metalink:publisher { 1390 attribute uri { metalinkUri }?, 1391 attribute name { metalinkTextConstruct }?, 1392 }?, 1393 element metalink:language { metalinkTextConstruct }?, 1394 element metalink:copyright { metalinkTextConstruct }?, 1395 element metalink:license { metalinkTextConstruct }?, 1396 element metalink:os { metalinkTextConstruct }?, 1397 element metalink:verification { 1398 hash+, 1399 element metalink:pieces { 1400 attribute length { metalinkTextConstruct }, 1401 attribute type { metalinkTextConstruct }, 1402 hash+ 1403 }+, 1404 element metalink:signature { 1405 attribute type { "pgp" }, 1406 text 1407 } 1408 }?, 1409 element metalink:resources { 1410 element metalink:metadata { 1411 attribute preference { xsd:integer }?, 1412 attribute type { metalinkTextConstruct }, 1413 metalinkUri 1415 element metalink:url { 1416 attribute location { xsd:string { 1417 minLength = "2" maxLength="2"} 1418 }?, 1419 attribute preference { xsd:integer }?, 1420 metalinkUri 1421 }+ 1422 } 1423 }+ 1424 } 1425 } 1426 hash = 1427 element metalink:hash { 1428 attribute piece { metalinkTextConstruct }?, 1429 attribute type { metalinkTextConstruct }, 1430 text 1431 } 1433 # As defined in RFC 3066 1434 metalinkLanguageTag = xsd:string { 1435 pattern = "[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" 1436 } 1438 # Unconstrained; it's not entirely clear how IRI fit into 1439 # xsd:anyURI so let's not try to constrain it here 1440 metalinkUri = text 1442 # Simple Extension 1444 simpleExtensionElement = 1445 element * - metalink:* { 1446 text 1447 } 1449 # Structured Extension 1451 structuredExtensionElement = 1452 element * - metalink:* { 1453 (attribute * { text }+, 1454 (text|anyElement)*) 1455 | (attribute * { text }*, 1456 (text?, anyElement+, (text|anyElement)*)) 1457 } 1459 # Other Extensibility 1461 extensionElement = 1462 simpleExtensionElement | structuredExtensionElement 1464 undefinedAttribute = 1465 attribute * - (xml:base | xml:lang | local:*) { text } 1467 undefinedContent = (text|anyForeignElement)* 1469 anyElement = 1470 element * { 1471 (attribute * { text } 1472 | text 1473 | anyElement)* 1474 } 1476 anyForeignElement = 1477 element * - metalink:* { 1478 (attribute * { text } 1479 | text 1480 | anyElement)* 1481 } 1483 # EOF 1485 Index 1487 A 1488 application/metalink+xml Media Type 25 1490 C 1491 copyright XML element 14 1493 D 1494 description XML element 14 1496 F 1497 file XML element 11 1498 files XML element 10 1500 G 1501 generator XML element 14 1502 Grammar 1503 metalinkCommonAttributes 7 1504 metalinkCopyright 14 1505 metalinkDateConstruct 8 1506 metalinkDescription 14 1507 metalinkFile 11 1508 metalinkFiles 10 1509 metalinkGenerator 15 1510 metalinkHash 15 1511 metalinkIdentity 16 1512 metalinkLanguage 17 1513 metalinkLicense 17 1514 metalinkLogo 17 1515 metalinkMetalink 9 1516 metalinkOrigin 18 1517 metalinkOS 18 1518 metalinkPieces 14 1519 metalinkPublished 19 1520 metalinkPublisher 19 1521 metalinkResources 12 1522 metalinkSignature 19 1523 metalinkSize 20 1524 metalinkTextConstruct 7 1525 metalinkType 20 1526 metalinkUpdated 20 1527 metalinkURL 18, 21 1528 metalinkVerification 13 1529 metalinkVersion 22 1530 simpleExtensionElement 24 1531 structuredExtensionElement 24 1533 H 1534 hash XML element 15 1536 I 1537 identity XML element 16 1539 L 1540 language XML element 17 1541 license XML element 17 1542 logo XML element 17 1544 M 1545 Media Type 1546 application/metalink+xml 25 1547 metadata XML element 17 1548 metalink XML element 9 1549 metalinkCommonAttributes grammar production 7 1550 metalinkCopyright grammar production 14 1551 metalinkDateConstruct grammar production 8 1552 metalinkDescription grammar production 14 1553 metalinkFile grammar production 11 1554 metalinkFiles grammar production 10 1555 metalinkGenerator grammar production 15 1556 metalinkHash grammar production 15 1557 metalinkIdentity grammar production 16 1558 metalinkLanguage grammar production 17 1559 metalinkLicense grammar production 17 1560 metalinkLogo grammar production 17 1561 metalinkMetalink grammar production 9 1562 metalinkOrigin grammar production 18 1563 metalinkOS grammar production 18 1564 metalinkPieces grammar production 14 1565 metalinkPublished grammar production 19 1566 metalinkPublisher grammar production 19 1567 metalinkResources grammar production 12 1568 metalinkSignature grammar production 19 1569 metalinkSize grammar production 20 1570 metalinkTextConstruct grammar production 7 1571 metalinkType grammar production 20 1572 metalinkUpdated grammar production 20 1573 metalinkURL grammar production 18, 21 1574 metalinkVerification grammar production 13 1575 metalinkVersion grammar production 22 1577 O 1578 origin XML element 18 1579 os XML element 18 1581 P 1582 pieces XML element 13 1583 published XML element 19 1584 publisher XML element 19 1586 R 1587 resources XML element 12 1589 S 1590 signature XML element 19 1591 simpleExtensionElement grammar production 24 1592 size XML element 20 1593 structuredExtensionElement grammar production 24 1595 T 1596 type XML element 20 1598 U 1599 updated XML element 20 1600 url XML element 21 1602 V 1603 verification XML element 13 1604 version XML element 21 1606 X 1607 XML Elements 1608 copyright 14 1609 description 14 1610 entry 11 1611 files 10 1612 generator 14 1613 hash 15 1614 identity 16 1615 language 17 1616 license 17 1617 logo 17 1618 metadata 17 1619 metalink 9 1620 origin 18 1621 os 18 1622 pieces 13 1623 published 19 1624 publisher 19 1625 resources 12 1626 signature 19 1627 size 20 1628 type 20 1629 updated 20 1630 url 21 1631 verification 13 1632 version 21 1634 Author's Address 1636 Anthony Bryan (editor) 1637 Metalinker Project 1639 Email: anthonybryan@gmail.com 1640 URI: http://www.metalinker.org