Can vCard 4.0 store more than 1 vCard contact that are not part of the group?

1.3k views Asked by At

In vCard 4.0 RFC 6350 I see the following example in MEMBER property description, which is an example of vCard group:

 BEGIN:VCARD
 VERSION:4.0
 KIND:group
 FN:The Doe family
 MEMBER:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af
 MEMBER:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519
 END:VCARD
 BEGIN:VCARD
 VERSION:4.0
 FN:John Doe
 UID:urn:uuid:03a0e51f-d1aa-4385-8a53-e29025acd8af
 END:VCARD
 BEGIN:VCARD
 VERSION:4.0
 FN:Jane Doe
 UID:urn:uuid:b8767877-b4a1-4c70-9acc-505d3819e519
 END:VCARD

As far as I understand both contacts as well as group in the above example are stored and served as a single vCard file (or single CardDAV request/respose).

Can a vCard file or CardDAV request/respose contain more than one vCard contact, that are not part of the group. For example like this:

 BEGIN:VCARD
 VERSION:4.0
 FN:John Doe
 END:VCARD
 BEGIN:VCARD
 VERSION:4.0
 FN:Jane Doe
 END:VCARD

?

1

There are 1 answers

1
hnh On BEST ANSWER

A vCard 4 entity can contain a set of vCards, check RFC 6350 ABNF:

vcard-entity = 1*vcard

One or more, type doesn't matter.

But you are also asking about CardDAV. In CardDAV each vCard is always in a separate HTTP resource / a resource is never supposed to contain a stream of vCards. Check RFC 6352 Address Object Resources:

Address object resources contained in address book collections MUST contain a single vCard component only.

This includes groups (a vCard group in CardDAV is an own resource and doesn't contain the members).

If you want to retrieve multiple CardDAV resources in a single step, use a multiget or addressbook-query REPORT.