modules
modules copied to clipboard
[contacts] Use correct ontology URI and schema for vCard
http://www.w3.org/TR/2014/NOTE-vcard-rdf-20140522
good point. in http://www.w3.org/TR/2014/NOTE-vcard-rdf-20140522/#Overview it is stated that the correct URI, both for rdf and for json-ld, is "http://www.w3.org/2006/vcard/ns#"
There's a JSON-LD example as well.
ok, I'll update the module so that it uses that instead of http://remotestorage.io/modules/code/files/contacts-js.html#contacts/contact
This is still missing a whole lot of fields, and most importantly, still doesn't specificy the actual schema, including format information for stuff like URLs etc, which we can all define.
good point, that wasn't clear. fixed now.
I updated the schema definition so that it's clear that any field that exists in the vcard spec is allowed, and the schema we give here is non-normative. they're just the fields we want to check at runtime.
That's not solving...
This is still missing a whole lot of fields, and most importantly, still doesn't specify the actual schema, including format information for stuff like URLs etc, which we can all define.
If you don't want to do it, please leave it open for me or someone else to complete. We can define all known fields, so that developers don't have to do extend the module for their app in order to have validation etc.
sure, you can add more fields if you think you or someone else will use them
That's a nonsensical "if". I'll add them for other reasons, namely the ones I already wrote down.
do you use JSON-LD @context in data you store?
$ curl http://www.w3.org/2006/vcard/ns -H "Accept: application/ld+json"
i wonder if your schema and code handles properly cases like multiple values:
{
hasEmail: [
"[email protected]",
"[email protected]"
]
}
http://www.w3.org/TR/json-ld/#sets-and-lists
as well as multiple languages:
{
fn: {
en: "Ismail",
ar: "إسماعيل"
}
}
http://www.w3.org/TR/json-ld/#string-internationalization
do you use JSON-LD @context in data you store?
Yes.
i wonder if your schema and code handles properly cases like multiple values:
We can define that in the JSON Schema object. JSON schema is extensible in theory, but you can also just amend the schema in the module. We even have an extend method in modules for merging objects like schemas. The schema we define should account for all standard use cases, though, so that people don't have to muck around in the module.
thx @skddc! I guess I move further conversation to http://community.remotestorage.io/ :)
Completely OT, but hey: Well, @elf-pavlik, you didn't check that page in a while, didn't you? The Discourse service died some days/weeks ago. I wonder if it would make sense, @skddc, if we joined forces and I'd put the last backup you have within my new Discourse farm at Ecobytes. ?
:+1: AFAIK you guys live in the same town, just do a small hack party and make it happen :smiley:
We're still waiting for the data. It's not because we're lazy.
Good luck with the backup.
On 4 June 2014 11:45, Sebastian Kippe [email protected] wrote:
We're still waiting for the data. It's not because we're lazy.
— Reply to this email directly or view it on GitHub https://github.com/remotestorage/modules/issues/56#issuecomment-45071265 .
this should help: https://github.com/lanthaler/vCardOntology from one of JSON-LD spec authors!
Nice, thanks!
That would mean we'd have to introduce support for maps/objects as @context. Looks like our implementation still needs work to support using all of JSON-LD.