- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Sat, 02 May 2009 13:16:13 -0400
- To: RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
Shane McCarron wrote: > Manu Sporny wrote: >> It's because of this point that I think that "DEFAULTNS" would be >> preferable to a blank prefix identifier for changing the default >> namespace. >> >> I believe that we end up with a non-deterministic case if we allow >> arbitrary spaces between mappings and the equal sign AND try and use a >> blank prefix identifier to change the default namespace. >> > Actually.... I disagree. I have not tested this extensively, but the > following regular expression should support it: > > (.*?)\s*=\s*([^\s]+)(\s|$) Hmm, I think you're right Shane - thanks again for the correction. :) Your regex is close, but it doesn't account for the case where you have 'ab c=d', it would match 'ab c' as \1. It also doesn't handle the case where you have a new line before a prefix. I believe this one fixes that: ([^ \r]*?)\s*=\s*([^\s]+)(\s|$) Here's my test data file: """ a=b a=b c=d a = b a =b a= b =b c=d =b c = d = e = b a = b c d a = b c d= f gh i=j a = b """ To help visualize the matches, try RegExr (online Adobe Air app): http://gskinner.com/RegExr/ > Note that I am not advocating this solution. Ditto. > I continue to feel that the prefix mapping issue and the extension of > reserved words issue are orthogonal. My proof for this is that I can > solve issue 2 completely independent of any solution for issue 1. I thought that Ivan's issue had to do with specifying the default prefix value, not just specifying prefix mappings? Sure, we could use a special vocabulary term to specify the default prefix in an RDFa triple imported via @profile, or in the current document by doing this: <div prefix="pmap=http://example.org/vocab/prefix-mapping#" about="" rel="pmap:default-prefix" href="http://example.org/vocab/foo#"> but we could also do something like this: prefix="DEFAULT_PREFIX=http://example.org/vocab/foo#" Is this what you mean, Shane? That we don't necessarily need a mechanism in @prefix to specify the default prefix value? > Moreover, I think that the reserved words extension issue is WAY more > important than than defining an alternate prefix definition mechanism. Agreed, although less exuberantly - s/WAY//. -- manu -- Manu Sporny President/CEO - Digital Bazaar, Inc. blog: A Collaborative Distribution Model for Music http://blog.digitalbazaar.com/2009/04/04/collaborative-music-model/
Received on Saturday, 2 May 2009 17:16:53 UTC