idnits 2.17.1 draft-ietf-vcarddav-vcardxml-01.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.i 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 : ---------------------------------------------------------------------------- ** The document seems to lack a both a reference to RFC 2119 and the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. RFC 2119 keyword, line 216: '...vCard XML parser MUST ignore XML data ...' RFC 2119 keyword, line 232: '... original vCard format [I-D.ietf-vcarddav-vcardrev] MUST still be...' RFC 2119 keyword, line 238: '...rary. The order MUST be respected in ...' RFC 2119 keyword, line 240: '... vCard MAY happen....' Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (October 21, 2009) is 5300 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) == Outdated reference: A later version (-22) exists of draft-ietf-vcarddav-vcardrev-09 Summary: 2 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group S. Perreault 3 Internet-Draft Viagenie 4 Intended status: Standards Track October 21, 2009 5 Expires: April 24, 2010 7 vCard XML Schema 8 draft-ietf-vcarddav-vcardxml-01 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 April 24, 2010. 33 Copyright Notice 35 Copyright (c) 2009 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 in effect on the date of 40 publication of this document (http://trustee.ietf.org/license-info). 41 Please review these documents carefully, as they describe your rights 42 and restrictions with respect to this document. 44 Abstract 46 This document defines the XML schema of the vCard data format. 48 Table of Contents 50 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 51 2. The Schema . . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 3. Example: Author's XML vCard . . . . . . . . . . . . . . . . . 3 53 4. Design Considerations . . . . . . . . . . . . . . . . . . . . 5 54 4.1. Extensibility . . . . . . . . . . . . . . . . . . . . . . 5 55 4.2. Limitations . . . . . . . . . . . . . . . . . . . . . . . 6 56 5. The "XML" vCard Property . . . . . . . . . . . . . . . . . . . 6 57 6. Security Considerations . . . . . . . . . . . . . . . . . . . 7 58 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 59 7.1. Registration of the "XML" vCard Property . . . . . . . . . 8 60 7.2. Registration of the XML Namespace . . . . . . . . . . . . 8 61 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8 62 9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 63 9.1. Normative References . . . . . . . . . . . . . . . . . . . 8 64 9.2. Informative References . . . . . . . . . . . . . . . . . . 8 65 Appendix A. Relax NG Schema . . . . . . . . . . . . . . . . . . . 8 66 Appendix B. Change Log (to be removed by RFC Editor prior to 67 publication) . . . . . . . . . . . . . . . . . . . . 14 68 B.1. Changes in -01 . . . . . . . . . . . . . . . . . . . . . . 14 69 B.2. Changes in -00 . . . . . . . . . . . . . . . . . . . . . . 15 71 1. Introduction 73 vCard [I-D.ietf-vcarddav-vcardrev] is a data format for representing 74 and exchanging information about individuals. It is a text-based 75 format (as opposed to a binary format). This document defines an XML 76 representation for vCard. The underlying data structure is exactly 77 the same, enabling a 1-to-1 mapping between the original vCard format 78 and the XML representation. The XML formatting may be preferred in 79 some contexts where an XML engine is readily available and may be 80 reused instead of writing a stand-alone vCard parser. 82 Earlier work on an XML format for vCard was started in 1998 by Frank 83 Dawson [I-D.dawson-vcard-xml-dtd]. Sadly it did not take over the 84 world. 86 2. The Schema 88 The schema is expressed in the RELAX NG language 89 [relaxng][relaxng-compact] and is found in Appendix A. 91 3. Example: Author's XML vCard 93 94 95 96 Simon Perreault 97 98 Perreault 99 Simon 100 101 102 ing. jr. 103 M.Sc. 104 105 106 --0203 107 108 20090808T1430-0500 109 110 1 111 112 1 113 fr 114 115 116 2 117 en 118 119 120 121 Viagenie 122 123 124 125 126 Suite 625 127 2600 boul. Laurier 128 Quebec 129 QC 130 G1V 4W1 131 Canada 132 133 134 135 tel:+1-418-656-9254;ext=102 136 137 138 139 140 141 tel:+1-418-262-6501 142 143 144 145 tel:+1-418-656-9257 146 147 148 149 simon.perreault@viagenie.ca 150 151 152 153 geo:46.772673,-71.282945 154 155 156 157 http://www.viagenie.ca/simon.perreault/simon.asc 158 159 America/Montreal 160 PUBLIC 161 162 164 4. Design Considerations 166 The general idea is to map vCard parameters, properties, and value 167 types to XML elements. For example, the "FN" property is mapped to 168 the "fn" element. That element in turn contains a text element whose 169 content corresponds to the vCard property's value. 171 vCard parameters are also mapped to XML elements. They are contained 172 in the element, which is contained in property elements. 173 For example, the "TYPE" parameter applied to the "TEL" property would 174 look like the following in XML: 176 177 178 tel:+1-555-555-555 179 181 Properties having structured values (e.g. the "N" property) are 182 expressed by XML element trees. Element names in that tree (e.g. 183 "surname", "given", etc.) do not have a vCard equivalent since they 184 are identified by position in plain vCard. 186 Line folding is a non-issue in XML. Therefore, the mapping from 187 vCard to XML is done after the unfolding procedure is carried out. 188 Conversely, the mapping from XML to vCard is done before the folding 189 procedure is carried out. 191 4.1. Extensibility 193 The original vCard format is extensible. New properties, parameters, 194 data types and values (collectively known as vCard objects) can be 195 registered from IANA. It is expected that these vCard extensions 196 will also specify extensions to the XML format described in this 197 document. This is not a requirement: a separate document may be used 198 instead. 200 Unregistered extensions (i.e. those starting with "X-" and 201 "VND-...-") can be expressed in XML by making use of XML namespaces. 202 They simply correspond to elements outside of the core namespace. 203 For example: 205 207 208 1 209 210 value goes here 211 213 Note that extension elements do not need the "X- or "VND-" prefix in 214 XML. The XML namespace mechanism is sufficient. 216 A vCard XML parser MUST ignore XML data qualified by a namespace it 217 does not understand. 219 In the original vCard format, the "VERSION" property was mandatory 220 and played a role in extensibility. In XML, this property is absent. 221 Its role is played by the vCard core namespace identifier, which 222 includes the version number. vCard revisions will use a different 223 namespace. 225 Parameters containing a list of values are expressed using a list of 226 elements in XML (e.g. the element). 228 4.2. Limitations 230 The schema does not validate the cardinality of properties. This is 231 a limitation of the schema definition language. Cardinalities of the 232 original vCard format [I-D.ietf-vcarddav-vcardrev] MUST still be 233 respected. 235 Some constructs (e.g. value enumerations in type parameters) have 236 additional ordering constraints in XML. This is a result of 237 limitations of the schema definition language and the order is 238 arbitrary. The order MUST be respected in XML for the vCard to be 239 valid. However, reordering as part of conversion to or from plain 240 vCard MAY happen. 242 5. The "XML" vCard Property 244 This document defines the following vCard property. 246 Namespace: 248 Property name: XML 250 Purpose: To include XML-encoded vCard data in a plain vCard. 252 Value type: A single text value. 254 Cardinality: (0,n) 256 Property parameters: none allowed 257 Description: The content of this property is an XML chunk. Its 258 default XML namespace is "urn:ietf:params:xml:ns:vcard-4.0". The 259 elements allowed at the root level of this chunk are those that 260 are allowed to be immediate children of the element 261 defined in this document. The normal rules for extensibility 262 apply (i.e. things in unknown namespaces are ignored). The chunk 263 is subject to normal line folding and escaping, i.e. replace all 264 backslashes with "\\", then replace all newlines with "\n", then 265 fold long lines. 267 Format definition: 269 XML-param = "" 270 XML-value = text 272 Example: The three following vCards are equivalent. 274 275 276 277 John Doe 278 jdoe@example.com 279 280 282 BEGIN:VCARD 283 VERSION:4.0 284 XML:John Doe>/text>\n 285 jdoe@example.com 286 END:VCARD 288 BEGIN:VCARD 289 VERSION:4.0 290 FN:John Doe 291 EMAIL:jdoe@example.com 292 END:VCARD 294 6. Security Considerations 296 All the security considerations applicable to plain vCard 297 [I-D.ietf-vcarddav-vcardrev] are applicable to this document as well. 299 7. IANA Considerations 300 7.1. Registration of the "XML" vCard Property 302 The completed registration template can be found in section 303 Section 5. 305 7.2. Registration of the XML Namespace 307 URI: urn:ietf:params:xml:ns:vcard-4.0 309 Registrant Contact: Simon Perreault 311 XML: None. Namespace URIs do not represent an XML specification. 313 8. Acknowledgements 315 Thanks to the following people for their input: 317 Alexey Melnikov, Barry Leiba, Cyrus Daboo, Joe Hildebrand, Joseph 318 Smarr, Marc Blanchet, Peter Saint-Andre, Robins George, Zahhar 319 Kirillov, Zoltan Ordogh. 321 9. References 323 9.1. Normative References 325 [I-D.ietf-vcarddav-vcardrev] Perreault, S. and P. Resnick, "vCard 326 Format Specification", 327 draft-ietf-vcarddav-vcardrev-09 (work 328 in progress), October 2009. 330 [relaxng] Clark, J., "RELAX NG Specification", 331 December 2001. 333 [relaxng-compact] Clark, J., "RELAX NG Compact Syntax", 334 November 2002. 336 9.2. Informative References 338 [I-D.dawson-vcard-xml-dtd] Dawson, F., "The vCard v3.0 XML DTD", 339 draft-dawson-vcard-xml-dtd-03 (work in 340 progress), June 1998. 342 Appendix A. Relax NG Schema 344 default namespace = "urn:ietf:params:xml:ns:vcard-4.0" 346 # Value types 347 \text = element text { text } 348 text-list = \text+ 349 uri = element uri { xsd:anyURI } 350 date = element date { 351 xsd:string { pattern = "\d{8}|\d{4}-\d\d|--\d\d(\d\d)?|---\d\d" } 352 } 353 time = element time { 354 xsd:string { pattern = "(\d\d(\d\d(\d\d)?)?|-\d\d(\d\d?)|--\d\d)" 355 ~ "(Z|[+\-]\d\d(\d\d)?)?" } 356 } 357 date-time = element date-time { 358 xsd:string { pattern = "(\d{8}|--\d{4}|---\d\d)T\d\d(\d\d(\d\d)?)?" 359 ~ "(Z|[+\-]\d\d(\d\d)?)?" } 360 } 361 date-and-or-time = date | date-time | time 362 timestamp = element timestamp { 363 xsd:string { pattern = "\d{8}T\d{6}(Z|[+\-]\d\d(\d\d)?)?" } 364 } 365 boolean = element boolean { xsd:boolean } 366 integer = element integer { xsd:integer } 367 float = element float { xsd:float } 368 binary = element binary { xsd:base64Binary } 369 language-tag = element language-tag { 370 xsd:string { pattern = "([a-z]{2,3}((-[a-z]{3}){0,3})?|[a-z]{4,8})" 371 ~ "(-[a-z]{4})?(-([a-z]{2}|\d{3}))?" 372 ~ "(-([0-9a-z]{5,8}|\d[0-9a-z]{3}))*" 373 ~ "(-[0-9a-wyz](-[0-9a-z]{2,8})+)*" 374 ~ "(-x(-[0-9a-z]{1,8})+)?|x(-[0-9a-z]{1,8})+|" 375 ~ "[a-z]{1,3}(-[0-9a-z]{2,8}){1,2}" } 376 } 378 # Parameters 379 language = element language { language-tag }? 380 pref = element pref { 381 xsd:integer { minInclusive = "1" maxInclusive = "100" } 382 }? 383 pid = element pid { 384 xsd:string { pattern = "\d+(\.\d+)?" } 385 }? 386 type = element type { 387 element work { empty }?, 388 element home { empty }? 389 }? 391 # Properties 392 source = element source { 393 element parameters { pid, pref }, 394 uri 395 } 397 name = element name { \text } 398 kind = element kind { 399 element individual { empty } 400 | element group { empty } 401 | element org { empty } 402 | element location { empty } 403 } 404 fn = element fn { 405 element parameters { language, pid, pref, type }?, 406 \text 407 } 408 n = element n { 409 element parameters { language }?, 410 element surname { text-list }, 411 element given { text-list }, 412 element prefix { text-list }, 413 element suffix { text-list } 414 } 415 nickname = element nickname { 416 element parameters { language, pid, pref, type }?, 417 text-list 418 } 419 photo = element photo { 420 element parameters { 421 pid, 422 pref, 423 element type { 424 element work { empty }?, 425 element home { empty }?, 426 element media { \text }? 427 } 428 }?, 429 (binary | uri) 430 } 431 bday = element bday { date-and-or-time | \text } 432 dday = element dday { date-and-or-time | \text } 433 birth = element birth { 434 element parameters { language }?, 435 \text 436 } 437 death = element death { 438 element parameters { language }?, 439 \text 440 } 441 anniversary = element anniversary { date-and-or-time | \text } 442 sex = element sex { "0" | "1" | "2" | "9" } 443 adr = element adr { 444 element parameters { 445 language, 446 pid, 447 pref, 448 type, 449 element geo { uri }?, 450 element tz { \text | uri }? 451 }?, 452 element pobox { text-list }, 453 element ext { text-list }, 454 element street { text-list }, 455 element locality { text-list }, 456 element region { text-list }, 457 element code { text-list }, 458 element country { text-list } 459 } 460 label = element label { 461 element parameters { language, pid, pref, type }?, 462 \text 463 } 464 tel = element tel { 465 element parameters { 466 pid, 467 pref, 468 element type { 469 element work { empty }?, 470 element home { empty }?, 471 element text { empty }?, 472 element voice { empty }?, 473 element fax { empty }?, 474 element cell { empty }?, 475 element video { empty }?, 476 element pager { empty }? 477 }? 478 }, 479 uri 480 } 481 email = element email { 482 element parameters { pid, pref, type }?, 483 \text 484 } 485 impp = element impp { 486 element parameters { pid, pref, type }?, 487 uri 488 } 489 lang = element lang { 490 element parameters { pid, pref, type }?, 491 language-tag 492 } 494 tz = element tz { 495 element parameters { pid, pref, type }?, 496 (\text | uri) 497 } 498 geo = element geo { 499 element parameters { pid, pref, type }?, 500 uri 501 } 502 title = element title { 503 element parameters { language, pid, pref, type }?, 504 \text 505 } 506 role = element role { 507 element parameters { language, pid, pref, type }?, 508 \text 509 } 510 logo = element logo { 511 element parameters { 512 language, 513 pid, 514 pref, 515 element type { 516 element work { empty }?, 517 element home { empty }?, 518 element media { \text }? 519 } 520 }?, 521 (binary | uri) 522 } 523 org = element org { 524 element parameters { language, pid, pref, type }?, 525 text-list 526 } 527 member = element member { pid, pref, uri } 528 related = element related { 529 element parameters { 530 pid, 531 pref, 532 element type { 533 element work { empty }?, 534 element home { empty }?, 535 ( element parent { empty } 536 | element child { empty } 537 | element sibling { empty } 538 | element spouse { empty } 539 | element family { empty } 540 | element friend { empty } 541 | element supervisor { empty } 542 | element supervisee { empty } 543 | element assistant { empty } 544 | element colleague { empty } 545 | element agent { empty } 546 | element emergency { empty }) 547 }? 548 }?, 549 (uri | \text) 550 } 551 categories = element categories { 552 element parameters { pid, pref, type }?, 553 \text 554 } 555 note = element note { 556 element parameters { language, pid, pref, type }?, 557 \text 558 } 559 prodid = element prodid { \text } 560 rev = element rev { timestamp } 561 sort-string = element sort-string { \text } 562 sound = element sound { 563 element parameters { 564 language, 565 pid, 566 pref, 567 element type { 568 element work { empty }?, 569 element home { empty }?, 570 element media { \text }? 571 } 572 }?, 573 (binary | uri) 574 } 575 uid = element uid { uri } 576 clientpidmap = element clientpidmap { 577 element sourceid { xsd:positiveInteger }, 578 uri 579 } 580 url = element url { 581 element parameters { pid, pref, type }?, 582 uri 583 } 584 class = element class { "PUBLIC" | "PRIVATE" | "CONFIDENTIAL" } 585 key = element key { 586 element parameters { 587 pid, 588 pref, 589 element type { 590 element work { empty }?, 591 element home { empty }?, 592 element media { \text }? 593 } 594 }?, 595 (binary | uri) 596 } 597 fburl = element fburl { 598 element parameters { pid, pref, type }?, 599 uri 600 } 601 caladruri = element caladruri { 602 element parameters { pid, pref, type }?, 603 uri 604 } 605 caluri = element caluri { 606 element parameters { pid, pref, type }?, 607 uri 608 } 610 # Top-level grammar 611 property = adr | anniversary | bday | birth | caladruri | caluri 612 | categories | class | clientpidmap | dday | death | email 613 | fburl | fn | geo | impp | key | kind | label | lang | logo 614 | member | n | name | nickname | note | org | photo | prodid 615 | related | rev | role | sex | sort-string | sound | source 616 | tel | title | tz | uid | url 617 start = element vcards { 618 element vcard { 619 (property 620 | element group { 621 attribute name { text }, 622 property* 623 })+ 624 }+ 625 } 627 Appendix B. Change Log (to be removed by RFC Editor prior to 628 publication) 630 B.1. Changes in -01 632 o Synchronized with draft-ietf-vcarddav-vcardrev-09. 634 o Added the element to allow multiple vCards in a single 635 XML file. 637 o Created the container element. 639 o Use text value for enumeration in element. 641 o Created the "XML" vCard property. 643 o Added IANA considerations section. 645 o Added security considerations section. 647 B.2. Changes in -00 649 o Same as draft-perreault-vcarddav-vcardxml-02. 651 Author's Address 653 Simon Perreault 654 Viagenie 655 2600 boul. Laurier, suite 625 656 Quebec, QC G1V 4W1 657 Canada 659 Phone: +1 418 656 9254 660 EMail: simon.perreault@viagenie.ca 661 URI: http://www.viagenie.ca