- From: Dave Reynolds <der@hplb.hpl.hp.com>
- Date: Fri, 13 Jul 2007 16:17:04 +0100
- To: Sandro Hawke <sandro@w3.org>
- CC: public-rif-wg@w3.org
Sandro Hawke wrote: > Dave Reynolds <der@hplb.hpl.hp.com> writes: >> In most cases I hope Consts will be IRIs not strings in which case >> presumably they would be: >> >> <Const rdf:about="http://example.com/myrules#book" /> > > I'm kind of confused and undecided about what Consts are or should be. > I've been trying to keep that a separate issue. In fact, I'm going to > reply on that question in a separate e-mail. Just noting this since it may make the next comment less relevant. >> (b) Single serialization >> >>> Also, I'm constraining objects to be >>> serialized in one place in a document -- the value of rdf:about is not >>> allowed to occur twice in a file. (This makes de-serializing and other >>> kinds of XML processing easier and more efficient, I believe.) >> If that is really a goal then there is a problem with Const nodes. All >> IRI Const nodes are likely to be serialized multiple times. >> >> I don't understand why that might be a problem. If it really is a >> problem then there are a couple of solutions which preserve RDF/XML >> compatibility. >> >> (i) Serialize each Const once (e.g. at first occurrence) then all >> references to the same Const would use rdf:resource: >> >> ... >> <Const rdf:about="#book" /> >> ... >> <Uniterm> >> <op rdf:resource="#book"> >> <arg rdf:parsetype="Collection"> >> <Var rif:name="Author" /> >> <Const rif:name="LeRif" /> >> </arg> >> </Uniterm> >> >> (ii) Serialize Consts as blank nodes with a property giving their IRI >> >> <Const rif:iri="#book" /> >> >> From an XML processor's point of view I would have thought the repeated >> rdf:about would be fine. I guess the issue is whether we permit metadata >> annotations on Const nodes. > > Okay, yeah, I guess Consts force the parser output to be a lattice, so > we do need rdf:resource and/or rdf:nodeId. I had that in a draft but > couldn't remember why I needed it. I don't think I'm convinced yet. Form an RDF point of view then multiple copies of: <Const rdf:about="#book" /> are multiple serializations of the same resource but from an XML point of view you don't care surely? They are separate Const nodes which happen to reference the same semantic object. I think I'd like to hear what the problem is with this duplication. Consider: <Var><name>?x</name></Var> In the case of simple string names we know that two occurrences of the same variable name within the same scope refer to the same semantic object but we don't need to turn the parse tree into some parse lattice in order to represent that. The lattice is constructed when you turn the parse tree into your internal rule representation using symbol tables or whatever. Presumably you don't want to use nodeIDs to tie up the Var bNodes? Consts labeled by IRIs seem like the same thing to me. Dave -- Hewlett-Packard Limited Registered Office: Cain Road, Bracknell, Berks RG12 1HN Registered No: 690597 England
Received on Friday, 13 July 2007 15:17:34 UTC