Re: Expansion Algorithm

On 12/05/2011 01:10 PM, Gregg Kellogg wrote:
> I think we're in danger of conflating two issues, and I'm not sure I
> understand all the nuances. Given the following (complete) JSON-LD
> doc:
>
> { "@context": { "age": "http::/xmlns.com/foaf/0.1/age" }, "age": 54
> }
>
> How is this expanded, and how is this normalized? If it is expanded
> to the following:
>
> { "http://xmlns.com/foaf/0.1/age": { "@literal": "54", "@datatype":
> "http://www.w3.org/2001/XMLSchema#integer" } }
>
> Then we need to use an implied xsd:integer type, where this prefix
> is never declared by the user and forces us to define JSON-LD
> primitive types in terms of XSD. This is why I suggested that the
> expanded form should continue to use the native datatype
> representation:

The purpose of Expansion was to effectively remove the context such that
there is no doubt as to what the data is expressing. I don't think
having to have an implied "xsd:integer" value is bad if it models the
data we're talking about well (which it does). Using JSON short-hand for
the expanded form would be a mistake in my mind. Short-hand form is for
JSON-LD Compact form... it shouldn't bleed into the Expanded form. This
is doubly important because we /must/ expand to xsd:integer in
normalized form since we're probably going to be expressing the
serialized form in N-Triples.

What Dave Longley outlined as issues are the same ones that we
identified many months ago and they still stand. We shouldn't try and
shorten any part of JSON-LD expanded form... especially since it makes
explaining what expanded form is to newbies more difficult if there is
some shorthand used.

So, I think the fully expanded form above (in Gregg's response) is
exactly what we want. As for the five bullet items Gregg listed in one
of the first e-mails in this thread, I think we're all mostly in
agreement and some elaboration and clarification will bring us in line
with one another.

-- manu

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
Founder/CEO - Digital Bazaar, Inc.
blog: The Need for Data-Driven Standards
http://manu.sporny.org/2011/data-driven-standards/

Received on Tuesday, 6 December 2011 05:02:11 UTC