[Cosmo-dev] VCard Parsing in Cosmo
Vinubalaji Gopal
vinu at osafoundation.org
Fri Jul 21 14:00:51 PDT 2006
> you interpreted what as a regular expression? if you look at the
> definition of the carddav text-match element, you'll see that there
> are several "match types".
The grammar for this definition:
<!ELEMENT prop-filter (is-defined | text-match)? param-filter*>
prop-filter xml element may have the is-defined or text-match xml element (indicated by ?) and
can have zero or more param-filter xml elements (indicated by *).
> what mapping? the vcard property says that 123 main street, any town
> ca, 91921-1234 is a domicile address, a home address, a postal
> address, and a parcel address. the individual address types are not
> related to individual segments of the property value.
>
True it says that:
the default can be reset to "TYPE=dom,postal,work,home" to
specify a domestic delivery address for postal delivery to a
residence that is also used for work.
Work and home together made me think the other way :)
> there would presumably be two separate ADR properties for home address
> and work address.
Yes. Like the example below which has two telephone types.
ADR;TYPE=WORK:;;501 E. Middlefield Rd.;Mountain View;
CA; 94043;U.S.A.
TEL;TYPE=VOICE,MSG,WORK:+1-415-937-3419
TEL;TYPE=FAX,WORK:+1-415-528-4164
> the hierarchical structure of the jcr property name indicates whether
> it represents a vcard property or vcard parameter.
>
> vcard-adr: <- property (2 name segments)
> vcard-adr-type <- parameter (3 name segments)
thats great, was not aware that jcr allowed heirarchy in the
properties..But still I have an issue with multiple properties since jcr
does not allow same property with different values.
For example the properties:
TEL;TYPE=VOICE,MSG,WORK:+1-415-937-3419
TEL;TYPE=FAX,WORK:+1-415-528-4164
do I map it as
tel-type-1:VOICE,MSG,WORK
tel-1: +1-415-937-3419
tel-type-2: FAX,WORK
tel-2: +1-415-528-4164
More information about the cosmo-dev
mailing list