- From: Jason Diamond <jason@injektilo.org>
- Date: Sat, 30 Sep 2000 22:59:43 -0700
- To: "www-rdf-interest" <www-rdf-interest@w3.org>
Hi, Perry. > It seems to me that you are arguing for "foo" and "baz" to NOT be in the > "schema:" namespace. I think that is a valid interpretation, but I don't > think it is the most popular one. The popular one seems to be that > unqualified attributes "inherit" their namespace from their element. > Appendix A.2 of the XML Namespace spec is oft (mis?)interpreted > to have that > meaning. I don't mean to dredge up the old namespaces debate. I was under the impression that it was settled. [1][2][3] Regardless of the fact that the popular opinion is that they are inherited (and I agree that it's convenient to "pretend" that they are), the popular tools that we all use (expat, SAX2) do NOT treat unqualified attributes in this way. Of course, we can always add extra semantics onto them and interpret unqualified attributes in whatever way we see fit. This is exactly what many (if not all) namespace-aware applications do. RDF is no excpeption. > If A.2 is clear about anything, it is clear that for this example: > > <rdf:RDF xmlns:rdf="..."> > <rdf:Description about="this" rdf:about="that" ... /> > </rdf:RDF> > > "about" and "rdf:about" are two completely different attributes. So where > does that leave RDF? Beats me. In my mind, this "proves" that the unprefixed attributes do NOT inherit their element's namespace. It's illegal for an element to have two attributes with the same name. If the unprefixed "about" inherited the rdf namespace, that element would have two attributes with the same "universal" name. > While there isn't a very good understanding of the XML Namespace > spec today, > there was even less when the RDF spec was being drafted. In hindsight, it > was probably a mistake to treat attribute and element names as if > they were > interchangeable (and to wed namespaces to schemas to URIs, but that's > another tar pit :-), but for better or worse, RDF assumes they > are. So what > do we do? The truly unfortunate thing is that _we_ really can't do anything. The only entity capable of putting an end to this issue is the W3C. > While I think that is a valid interpretation, I just don't think it will > make you any friends. :-) If the author of your example above > INTENDED for > foo and baz to be in s, I think that author would be annoyed if > you ignored > his properties, even if his practice was questionable. You can't > even point > to the spec and claim that the RDF is not well-formed, since it > is. There's > no good answer to this (so far), so I took a conservative approach: better > to have too much information, even if it is spurious, than to lose > information. That approach is perfectly sound and reasonable. If the RDF M&S authors had taken your stance, we wouldn't be discussing this. (Oh, how I wish we weren't discussing this!) Unfortunately, it's too late. Like I said, it's very convenient to "pretend" that unqualified attributes inherit their element's namespace. Imagine how cumbersome writing XSLT transforms would be if we had to qualify every attribute! The decision to treat unqualified attributes in this manner, however, is each individual spec designer's. The RDF WG decided to make that shortcut available and now we have to live with it. The advantage to not allowing unqualified attributes from being treated as property elements is purely the fact that every example in the RDF M&S would work unchanged. I couldn't find any that used an unqualified attribute that wasn't assumed to be in the RDF namespace. (Please correct me if I'm wrong.) More importantly, the valid RDF that exists today will stay valid tomorrow. Your approach actually breaks several examples from the M&S (thus, your argument to always qualify rdf "keywords". Techincally, though, your solution is sound and I would be happy to implement it if that was the approach that the W3C decided to take. > > > <?xml version="1.0"?> > > > <Foo about="me" and="you" xmlns="schema:"/> > > > > While my trivia question is indeed a trick question, it isn't because > rdf:RDF is missing. rdf:RDF is optional, as indicated by > production [6.1]. Oops. You just found a bug in my parser. It's amazing how you can spend so much time scrutinizing the tiniest details and miss something that obvious. I just realized your example should actually generate one statement: (me, rdf:type, schema:Foo) Do I get a prize? (Or do I have to cave in on my unqualified attribute stance and give you the second statement, too?) ;-) Thanks, Jason. [1] http://www.rpbourret.com/xml/NamespacesFAQ.htm#q3_5 [2] http://www.xml.com/pub/2000/03/08/namespaces/myth1.html [3] http://www.megginson.com/docs/namespaces/namespace-questions.html
Received on Sunday, 1 October 2000 02:01:51 UTC