- From: Toby Inkster <tai@g5n.co.uk>
- Date: Fri, 01 May 2009 13:22:34 +0100
- To: Martin McEvoy <martin@weborganics.co.uk>
- Cc: RDFa <public-rdf-in-xhtml-tf@w3.org>
On Fri, 2009-05-01 at 12:11 +0100, Martin McEvoy wrote: > maybe try using the @prefix element in the same way @xmlns is used > then?..... eg: > > <div prefix:foaf="http://xmlns.com/foaf/0.1/" > rel="foaf:page" > typeof="foaf:Document"> > > </div> Problem with this is that any elements and attibutes containing colons are assumed to be namespaced tokens by XML parsers - so the above will be taken to mean "the 'foaf' attribute from the 'prefix' namespace" and you'll get errors from parsers complaining that the 'prefix' namespace is undefined. Perhaps one of these: <div prefix.foaf="http://xmlns.com/foaf/0.1/"> <div prefix-foaf="http://xmlns.com/foaf/0.1/"> However, both of these (and 'xmlns' is also guilty of this) theoretically add an infinite number of attributes to the XHTML namespace. This makes DTD-based validation impossible (or at least, very impractical -- though the W3C validator has a workaround in that it ignores all 'xmlns:'-prefixed attributes). Using a single 'prefix' attribute solves this. -- Toby Inkster <tai@g5n.co.uk>
Received on Friday, 1 May 2009 12:24:00 UTC