[Cosmo-dev] VCard Parsing in Cosmo

Vinubalaji Gopal vinu at osafoundation.org
Wed Jul 19 14:53:48 PDT 2006


On Wed, 2006-07-19 at 14:05 -0700, Brian Moseley wrote:

> builds the dom, and it's your job to walk through the dom (or use
> xpath) to pull out the types, parameters and values.
I am doing that, but I was assuming that the vcard properties are really
simple key value pairs. 

But after going through the vcard rfc, I am a bit confused and inclined
to complete the xpath implementation.
  
For example of all the key-value pairs the address key value pair (and a
few others) is a bit different: 

ADR;TYPE=dom,home,postal,parcel:;;123 Main
          Street;Any Town;CA;91921-1234

In this case I can create properties in the following ways: (with
VCARD_PREFIX = vcard)
vcard-adr-type-home:123 Main Street
vcard-adr-type-postal:Any Town
or
vcard-adr-type-dom,home,postal,parcel:123 Main Street;Any
Town;CA;91921-1234
or 
vcard-adr:type=dom,home,postal,parcel:;;123 Main Street;Any
Town;CA;91921-1234


I don't see any example in the CardDAV spec for querying the address
type. Assuming that the adbk-query is like:
<C:filter>
   <C:prop-filter name="ADR">
     <C:text-match match-type="contains">
	Main
     </C:text-match>
   </C:prop-filter>
</C:filter>

which just queries on the ADR field. Storing which property do you think
will make more sense? 

> well, we certainly need to store the original vcard so that we can
> send it back in response to GETs.
oh yeah we do need to store it in jackrabbit as a complete VCard so we
will also be having the entire vcard representation. 




More information about the cosmo-dev mailing list