Re: Consensus on alternate prefixing mechanism

Hi Martin,

I do agree with the idea that there shouldn't be two ways to do the
same thing, but I feel the way to resolve that is to say that @prefix
is doing something different to @xmlns.

And then drop the @xmlns technique. :)

The 'something else' that we should allow is the defining of full
URIs, and not just prefixes, and I've discussed this and some related
ideas in a recent blog post:

  <http://bit.ly/JKSgb>


On @xmlns itself, I think there are two major problems with it.

The first is that it is essentially a technique for defining document
'structure', rather than document 'content', so it seems wrong to me
to mix the two. (Lots of languages mix the two, it's true, and they
have tended to have problems.)

Setting parts of a document's structure using namespaces is fine:

  <a:b xmlns:a="blah">
    ...
  </a:b>

The content of a document could be regarded as being 'carried' by this
structure, and so can be seen as being in a different 'plane' or
'axis'. (And by content I mean the text and the metadata.)

However, there is no relationship between the document structure and
the document content. The source of elements and attributes from
vocabularies like XHTML and SVG is almost always different to the
source of properties from vocabularies like FOAF and DC.

So just as there is no connection between namespaces used in a
document's structure and the title of the document, so there is no
connection between the namespaces and the metadata.

If that seems a little esoteric, a simpler way to look at it might be
this; if you declare the SVG namespace in a document are you likely to
use that namespace mapping in any of your metadata? Or conversely, if
you declare the FOAF namespace in your document for use in @rel and
@property, are you likely to use that namespace mapping in your
element and attribute declarations?

Almost certainly no, in both cases.

So I feel that the first thing we need to do is drop all references to
the term 'namespace' if we are going to provide a new attribute for
declaring prefixes. And if we do that then there is no need for a
discussion about overriding default namespaces, and such like.

(And I should add that using @content would really confuse things.)

I said there were two problems with @xmlns; the second is that
namespaces apply to the element they are on, and the children of that
element. This makes it impossible to define a set of prefixes in an
external document, and then to import them.

However, by devising a new attribute that owes no loyalty to the way
that @xmlns behaves, we can create new rules about processing, and in
particular allow for importing external collections of mappings.

Regards,

Mark

On Thu, Apr 30, 2009 at 12:07 PM, Martin McEvoy
<martin@weborganics.co.uk> wrote:
> Manu Sporny wrote:
>>
>> I have noted these issues on the rdfa.info wiki:
>>
>>
>> http://rdfa.info/wiki/alternate-prefix-declaration-mechanism#Outstanding_Issues
>>
>> Anybody else disagree or have more input on these issues?
>>
>> -- manu
>>
>
> Hello Manu Ivan , thank you Manu for documenting this.
>
> Im still a little unsure of why RDFa should support an alternate prefixing
> mechanism,  its never a good thing in my view to support two ways of doing
> the same thing?
>
> I really do not like the @prefix mechanism at all it seems intuitive and a
> little "hackish". If RDFa really neds to support such a mechanism I am more
> in favour of re-using what we already have and not thinking of something
> new, @content seem ideal for this purpose
>
> <div content="foaf=http://xmlns.com/foaf/0.1/"
>    rel="foaf:page"
>    typeof="foaf:Document">
> ....
> ....
> </div>
>
> multiple prefixes can also declared in this way eg:
> @content="foaf=http://xmlns.com/foaf/0.1/ dct=http://purl.org/dc/terms/". I
> prefer @content over @prefix because authors already know what it means.
>
> I dont believe any of these should be legal
>
> * foo=
>       # would this default to the current document?
>
> * =http://someuri.com/
>       # why would you want to overide the default namespace?
>
> * xmlns:foo="http://foo.com" @prefix="foo=http://bar.com/"
>      # on the same element seems pointless as you cant really differentiate
> the URI's, you cant do that in RDF so why should you be able to do that in
> RDFa?
>
> * I also think this should be Illegal  @prefix="audio=
> http://purl.org/media/audio# video = http://purl.org/media/video#"
>      # spaces between the "=" equals.
>
>
> Thank you.
>
> --
> Martin McEvoy
>
> http://weborganics.co.uk/
>
> "You may find it hard to swallow the notion that anything as large and
> apparently inanimate as the Earth is alive."
> Dr. James Lovelock, The Ages of Gaia
>
>
>



-- 
Mark Birbeck, webBackplane

mark.birbeck@webBackplane.com

http://webBackplane.com/mark-birbeck

webBackplane is a trading name of Backplane Ltd. (company number
05972288, registered office: 2nd Floor, 69/85 Tabernacle Street,
London, EC2A 4RR)

Received on Thursday, 30 April 2009 14:57:28 UTC