- From: Dan Connolly <connolly@w3.org>
- Date: Thu, 16 Aug 2001 08:43:09 -0500
- To: Patrick.Stickler@nokia.com
- CC: drew.mcdermott@yale.edu, www-rdf-logic@w3.org, www-rdf-interest@w3.org
[This will be my last message in this thread unless/until I see some new information. We're convering well-trodden ground here. cf http://www.w3.org/2000/03/rdf-tracking/#rdfms-uri-substructure ] Patrick.Stickler@nokia.com wrote: > > > ... Any qname whose prefix binds to a URI reference > > which, when concatenated with the QName's local name, yeilds > > the relevant URI is just fine. > > Uhhh... sorry Dan, but just where do you get that? I deduce it from the RDF spec: [[[ Each propertyElt E contained by a Description element results in the creation of a triple {p,r,v} where: 1.p is the expansion of the namespace-qualified tag name (Generic Identifier) of E. This expansion is generated by concatenating the namespace name given in the namespace declaration with the LocalPart of the qualified name. ]]] -- Resource Description Framework (RDF) Model and Syntax Specification http://www.w3.org/TR/REC-rdf-syntax/ Wed, 24 Feb 1999 14:45:07 GMT I have also seen it in a number of implmentations. > Certainly not > from the XML Namespace spec. Of course not. > One might be able to bend the XML NS > spec wording to seem compatible with that interpretation, The XML namespaces spec is silent on this matter; no bending is necessary. > but the > XML NS spec defines no such QName to URI mapping function. > > > > But there's no rule for where > > > to break it, and, as Patrick pointed out, if you do it the wrong way > > > you get ambiguities. > > > > What ambiguities? concat(nsname, localname) is completely > > unambiguous. > > Well, I've provided examples several times to the list demonstrating > that such straight concatenation is potentially collisive, including > an example in the original posting of this thread. Yes, but why does it matter that there are collisions? Why does it matter that the mapping is not 1-1? If by "unambiguous" you meant 1-1, then I sorry, I misunderstood. The mapping is indeed not 1-1. For many URIs, there are lots of ways to split it into a namespace name and a local name. > But for your benefit, I'll repeat the example here: And I'll repeat my answer... > > I.e. if 'ns1:' = "urn:x:abc" and 'ns2:' = "urn:x:abcd" > then both 'ns1:defg' and 'ns2:efg' are mapped to > the same URI "urn:x:abcdefg"! Yes, exactly. > Yet these are clearly > separate resources per their disjunct QName identities "clearly"? That's not clear at all. > (the fact that the above example is contrived in no way lessens the > seriousness of this problem) What problem? What are the undesirable consequences of this state of affairs? (aside from threads like this one ;-) > > > This really is a glaring hole in RDF that needs to be filled. > > > > Well, it's a discussion that keeps happening. > > But I have yet to see any coherent argument that there's an > > actual technical hole. > > If the above example doesn't do it for you, I don't know what > will. It doesn't convince me there is a hole, no. > And if you have not read my proposal for an rdf:Map construct > (which includes numerous, well layed out arguments, examples and > discussion) then I would appreciate it if you would. please see my > posting to the www-rdf-interest group titled 'A proposed solution to > the RDF syntactic/semantic mapping problem (long)' posted a couple of > months ago. I'd also be happy to email you a copy. > > > > Adopting an offical QName <-> URI mapping convention seems to be the > > > obvious solution. > > > > The RDF spec includes an unambiguous QName -> URI mapping: > > uri(qname) = concat(nsname(qname), localname(qname)) > > Which is broken... No, it's not. > and does not address XML literal to resource URI > mapping... What "XML literal to resource URI mapping" is that? > > It's a W3C recommendation; that's as official as we get around here. > > Just because it's in a standard doesn't mean it's correct... I certainly agree that endorsement is orthogonal to correctness. But you asked for something official. > > It's not possible to define a URI->Qname mapping, since not > > all URIs end in XML name characters. (This is a limitation > > that designers of RDF vocabularies should be made aware > > of by some NOTE in the spec or something.) > > Exactly! Great! A glimmer of light! At least one problem recognized. > > So in order to re-serialize RDF encoded knowledge for a particular > XML DTD or schema, What does "RDF encoded knowledge for a particular XML DTD or schema" mean? > one must write *custom* code for each transformation > rather than be able to utilize standardized generic tools with > standardized mapping schemas! Subject to the limitation that some URIs aren't usable as RDF 1.0 property names, there are simple, generic approaches. The simplest one I can think of is: 1. scanning from the end if you find an XML name start character, go to step 2 if you find something that's not an XML name character, stop and throw an exception (you've run into a limitation in RDF 1.0 syntax). keep scanning 2. split the string into a namespace name and a localname. So mid:xyz@fooble becomes <e xmlns="mid:xyz@foobl">...</e> and mid:xyz@fooble1 becomes <e1 xmlns="mid:xyz@foobl">...</e1> > If such custom hacking has to happen for any cases where folks aren't > using a particular type of URI scheme with particular fragment syntax, > which are not explicitly defined by the standards, then we have a > hurdle for global acceptance. No custom hacking has to happen. -- Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Thursday, 16 August 2001 09:43:17 UTC