ISSUE-1: Status of RDFa Profiles

"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

-- 
Manu Sporny (skype: msporny, twitter: manusporny)
President/CEO - Digital Bazaar, Inc.
blog: PaySwarming Goes Open Source
http://blog.digitalbazaar.com/2010/02/01/bitmunk-payswarming/

Received on Thursday, 11 March 2010 18:11:12 UTC