Re: [whatwg] RDFa uses CURIEs, not QNames
On Fri, 29 Aug 2008 07:08:37 +0200, Manu Sporny [EMAIL PROTECTED] wrote: Anne van Kesteren wrote: The idea and premise of RDF is sort of attractive (people being able to do their own thing, unified data model, etc), though I agree with others that the complexity (lengthy URIs, ***qname***/curie cruft) is an issue. We do not use QName's in RDFa - there is not QName/CURIE cruft! We went to great lengths to avoid QNames, please take the time to understand why (it's because of the cruft that you complain about): As far as I can tell they both have the same (subset of) problems. They create a level of indirection and require keeping namespace prefix declarations around. -- Anne van Kesteren http://annevankesteren.nl/ http://www.opera.com/
Re: [whatwg] RDFa uses CURIEs, not QNames
Anne van Kesteren wrote: As far as I can tell they both have the same (subset of) problems. They create a level of indirection and require keeping namespace prefix declarations around. It's important to note that, in our experience and in our design, the level of indirection is a feature, not a bug. One rarely uses a vocabulary for just one property. -Ben
Re: [whatwg] RDFa uses CURIEs, not QNames
On Fri, Aug 29, 2008 at 4:57 PM, Ben Adidawrote: Anne van Kesteren wrote: As far as I can tell they both have the same (subset of) problems. They create a level of indirection and require keeping namespace prefix declarations around. It's important to note that, in our experience and in our design, the level of indirection is a feature, not a bug. One rarely uses a vocabulary for just one property. The bug is in that attribute values are opaque strings unless told otherwise (e.g. through a schema), so most processors won't know that a particular attribute's value is a CURIE and that they need to copy the namespace declaration and/or keep the prefix the same; and people copy/pasting things will have to know it's a CURIE and they have to find and copy/paste the namespace declaration too (and know where to paste it). The problem with QNames is not QNames by themselves (except for their key+value nature, but that's another story), it's their use in attribute values (e.g. in XSLT). QNames should probably have defined a string serialization (such as the James Clark's notation: {namespace-uri}local-name) to be used by other specifications, or at least the first major spec using QNames in attribute values (wasn't it XSLT?) should have defined it (expecting others to follow the same rule). (note that I talked about attribute values, but the same is true for element's text value) -- Thomas Broyer
Re: [whatwg] RDFa uses CURIEs, not QNames
Ben Adida wrote: It's important to note that, in our experience and in our design, the level of indirection is a feature, not a bug. One rarely uses a vocabulary for just one property. In my experience, that level of indirection is a disaster. It is the single most problematic part of XML as practiced. It destroyed XPointer. It takes what should be a simple, atomic value and makes it context dependent. I'm surprised you want to reinvent that particular mistake. -- Elliotte Rusty Harold [EMAIL PROTECTED] Refactoring HTML Just Published! http://www.amazon.com/exec/obidos/ISBN=0321503635/ref=nosim/cafeaulaitA
Re: [whatwg] RDFa uses CURIEs, not QNames
Elliotte Harold wrote: In my experience, that level of indirection is a disaster. It is the single most problematic part of XML as practiced. It destroyed XPointer. It takes what should be a simple, atomic value and makes it context dependent. That's not the same thing at all. XML Namespaces may have been added in a way that didn't play well with the dozens of other pre-existing XML technologies. That doesn't mean the *concept* of namespacing and indirection are wrong. I'm surprised you want to reinvent that particular mistake. Maybe because you're looking at the wrong context. We're not dealing with an existing technology that is going to be made somehow incompatible because of CURIE support. None of the existing HTML tools will have to change (they already ignore attributes they don't know, given that, e.g., a number of JavaScript libraries use their own attributes). None of the HTML parsers will have to change. None of the other specifications will have to change one iota. The changes we're proposing are entirely self-contained. So while the way in which namespaces were introduced in XML may have been a mistake, I don't give much credit to the argument that namespacing and indirection *in general* are mistakes. Quite the contrary, they are crucial software design principles. I'm surprised you've over-generalized from your bad XML experience. -Ben
Re: [whatwg] RDFa uses CURIEs, not QNames
Ben Adida wrote: We're not dealing with an existing technology that is going to be made somehow incompatible because of CURIE support. None of the existing HTML tools will have to change (they already ignore attributes they don't know, given that, e.g., a number of JavaScript libraries use their own attributes). None of the HTML parsers will have to change. None of the other specifications will have to change one iota. The changes we're proposing are entirely self-contained. Sadly, they aren't, though not in the way you mean. The specific problem I refer to is that the string foo:localName has no defined namespace absent an outer context. Leaving aside all the other problems with namespaces (and they are legion) that was a mistake. And CURIEs most definitely appear to be repeating that mistake. Unlike namespaces, though, CURIEs are unlikely to convince maintainers of DOM/SAX/JDOM/XPath/XQuery/etc. to add special support for their indirection. This is going to make them even harder for developers to use. :-( -- Elliotte Rusty Harold [EMAIL PROTECTED]
Re: [whatwg] RDFa uses CURIEs, not QNames (was: RDFa statement consistency)
Anne van Kesteren wrote: The idea and premise of RDF is sort of attractive (people being able to do their own thing, unified data model, etc), though I agree with others that the complexity (lengthy URIs, ***qname***/curie cruft) is an issue. We do not use QName's in RDFa - there is not QName/CURIE cruft! We went to great lengths to avoid QNames, please take the time to understand why (it's because of the cruft that you complain about): Here's an excerpt from the section in the CURIE spec that explains why we don't use QNames in RDFa[1]: * CURIEs are designed from the ground up to be used in attribute values. QNames are designed for unambiguously naming elements and attributes. * CURIEs expand to any IRI. QNames are treated as value pairs, but even if those pairs are combined into a string, only a subset of IRIs can be represented. * CURIEs can be used in non-XML grammars, and can even be used in XML languages that do not support XML Namespaces. QNames are limited to XML Namespace-aware XML Applications. The syntax document explains each bullet point more clearly in the Introduction section[1]. In other words, 1) CURIEs always map to a IRI. 2) They don't have any constraints on the reference portion (the part after the colon). 3) They can be used outside of XML languages. 4) They were designed specifically for the purpose of compacting IRIs in attribute values. RDFa is not encumbered by any QName cruftiness. -- manu [1]http://www.w3.org/MarkUp/2008/ED-curie-20080617/#s_intro -- Manu Sporny President/CEO - Digital Bazaar, Inc. blog: Bitmunk 3.0 Website Launches http://blog.digitalbazaar.com/2008/07/03/bitmunk-3-website-launches