Re: ISSUE-1: Status of RDFa Profiles

(A meta issue: we seem to use the terms 'token' and 'keyword' for
something like 'next' and 'copyright' in the current RDF1.0 document. We
should agree on one... For me, either is fine.)

But I am not sure I 100% agree with your characterization of the issues.
The way I see it we discussed only two alternatives which might make the
discussion a bit crisper, namely:

Alternative #1: Assertion: The "list of mappings" are specified via
@xmlns and rdfa:keyword (used in the profile document)

0. Split the RDFa attribute value on whitespace into tokens.
1. Process each token in the token list.
2. Check to see if there is a colon in the token
3. If there isn't a colon, you try to lookup the token in your "list of
   token mappings".
 3.1 If the mapping doesn't exist, discard the token and move on.
 3.2 If the mapping does exist, use the "list of token mappings" to
     resolve the token to a URI.
4. If there is a colon, you split the text on the colon and lookup the
   text in your "list of token mappings".
 4.1 If the mapping doesn't exist, the token is a URI
 4.2 If the mapping does exist, expand the token using the "list of
     token mappings" and append the part after the colon to the
     mapping.


Alternative #2: The "list of prefix mappings" are specified via @xmlns,
rdfa:prefix (used in the profile document), and a "list of token
mapping" are defined by the rdfa:keyword (used in the profile document).

0. Split the RDFa attribute value on whitespace into items.
1. Process each item in the item list.
2. Check to see if there is a colon in the item.
3. If there isn't a colon, assume we're dealing with a token. Try to
   lookup the token in your "list of token mappings".
 3.1 If the mapping doesn't exist, discard the token and move on.
 3.2 If the mapping does exist, use the "list of token mappings" to
     resolve the token to a URI.
4. If there is a colon, assume we're dealing with a prefix. Split the
   text on the colon and lookup the text in the "list of prefix
   mappings".
 4.1 If the mapping doesn't exist, the item is a URI.
 4.2 If the mapping does exist, expand the item using the "list of
     prefix mappings" and append the part after the colon to the
     mapping.


I know we had a discussion to add a @token or @vocab attribute as a
syntactic alternative to @xmlns, and I am not sure where we are with
that; but that is only syntactic sugar, isn't it, ie, we can put that
aside for a moment in my view...

Ivan


On 2010-3-11 19:10 , Manu Sporny wrote:
> "What is the mental model are tokens/prefixes two different concepts in
> RDFa or are they the same thing?"
> 
> Mark has proposed that we could simplify the way we think of
> CURIEs/prefixes and tokens by boiling it all down to tokens.
> 
> There are three potential mental models, assertions and algorithms that
> we could use to process CURIEs:
> 
> CURIE Resolution Algorithm #1:
> 
> Assertion: The "list of token mappings" are specified via @xmlns: and
> possibly @token.
> 
> 0. Split the RDFa attribute value on whitespace into tokens.
> 1. Process each token in the token list.
> 2. Check to see if there is a colon in the token
> 3. If there isn't a colon, you try to lookup the token in your "list of
>    token mappings".
>  3.1 If the mapping doesn't exist, discard the token and move on.
>  3.2 If the mapping does exist, use the "list of token mappings" to
>      resolve the token to a URI.
> 4. If there is a colon, you split the text on the colon and lookup the
>    text in your "list of token mappings".
>  4.1 If the mapping doesn't exist, the token is a URI
>  4.2 If the mapping does exist, expand the token using the "list of
>      token mappings" and append the part after the colon to the
>      mapping.
> 
> There is an alternative to the above that keeps two lists of mappings.
> One list for tokens and another for prefixes:
> 
> CURIE Resolution Algorithm #2:
> 
> Assertion: The "list of token mappings" is separate from the "list of
> prefix mappings". The "list of prefix mappings" are updated via @xmlns,
> and the "list of token mappings" are updated via @token.
> 
> 0. Split the RDFa attribute value on whitespace into items.
> 1. Process each item in the item list.
> 2. Check to see if there is a colon in the item.
> 3. If there isn't a colon, assume we're dealing with a token. Try to
>    lookup the token in your "list of token mappings".
>  3.1 If the mapping doesn't exist, discard the token and move on.
>  3.2 If the mapping does exist, use the "list of token mappings" to
>      resolve the token to a URI.
> 4. If there is a colon, assume we're dealing with a prefix. Split the
>    text on the colon and lookup the text in the "list of prefix
>    mappings".
>  4.1 If the mapping doesn't exist, the item is a URI.
>  4.2 If the mapping does exist, expand the item using the "list of
>      prefix mappings" and append the part after the colon to the
>      mapping.
> 
> The third approach keeps one list of mappings, but allows those mappings
> to be modified via @xmlns, rdfa:prefix and rdfa:keyword.
> 
> CURIE Resolution Algorithm #3:
> 
> Assertion: The "list of mappings" are specified via @xmlns, rdfa:prefix
> (used in the profile document), and rdfa:keyword (used in the profile
> document). Note that the rest of this algorithm is identical to #1.
> 
> 0. Split the RDFa attribute value on whitespace into items.
> 1. Process each token in the item list.
> 2. Check to see if there is a colon in the item.
> 3. If there isn't a colon, you try to lookup the token in your "list of
>    mappings".
>  3.1 If the mapping doesn't exist, discard the token and move on.
>  3.2 If the mapping does exist, use the "list of mappings" to
>      resolve the token to a URI.
> 4. If there is a colon, you split the text on the colon and lookup the
>    text in your "list of mappings".
>  4.1 If the mapping doesn't exist, the item is a URI
>  4.2 If the mapping does exist, expand the token using the "list of
>      mappings" and append the part after the colon to the mapping.
> 
> -- manu
> 

-- 

Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF   : http://www.ivan-herman.net/foaf.rdf
vCard  : http://www.ivan-herman.net/HermanIvan.vcf

Received on Friday, 12 March 2010 09:45:11 UTC