[Nml-wg] id/idRef

Roman Łapacz romradz at man.poznan.pl
Fri Jul 20 09:31:47 EDT 2012


W dniu 2012-07-20 14:24, Freek Dijkstra pisze:
> Hi Aaron and Roman,
>
> Thanks for your input on id/idRef.
>
>>> On 18-07-2012 16:11, Aaron Brown wrote:
>>>
>>>> I think the difference is in saying "i've created a new element right
>>>> here with id X" vs. "i'm referencing an element with id X that is
>>>> defined elsewhere". I think this is where it dovetails with inheritence.
>>>> It's basically letting people know "i'm defining 0 or more attributes
>>>> about this element, but you need to go elsewhere to find the rest of the
>>>> attributes".
> [...]
>> Instead of saying "i'm authoritative" or "i'm not authoritative". How
>> about making inheritance a first-order relationship? e.g.
>>
>> <nml:BidirectionalLink id="urn:ogf:network:example.net:2012:mylink">
>>   <nml:Link><nml:Relation type="inherits">urn:ogf:network:example.net:2012:mylink-a-to-b</Relation></nml:Link>
>>   <nml:Link><nml:Relation type="inherits">urn:ogf:network:example.net:2012:mylink-b-to-a</Relation></nml:Link>
>> </nml:BidirectionalLink>
>> <nml:Link id="urn:ogf:network:example.net:2012:mylink-a-to-b">
>>   <nml:name>A to B</nml:name>
>> </nml:Link>
>> <nml:Link id="urn:ogf:network:example.net:2012:mylink-b-to-a">
>>   <nml:name>B to A</nml:name>
>> </nml:Link>
>>
>> The idRef thing could get used as a shortcut if we wanted to simplify it
>> in the XML-case.
> This seems a useful definition and concept, although I propose two
> changes to it.
>
> 1. I prefer Roman's name "reference" over my "non-authoritative" or
> Aaron's "inherits". At least, I think that word is the best match with
> Aaron's explanation above.
>
> 2. One of RDFs limitations rose its ugly head with the above syntax,
> since it's not possible to add an attribute (like "inherits" here) to a
> relation in RDF. But since the "inherits" really applies to the Link,
> not to the relation, this can be remedied by the following syntax:
>
> <nml:Link id="urn:ogf:network:example.net:2012:mylink-a-to-b">
>    <nml:property name="isReference">true</nml:name>
> </nml:Link>
>
> which is equivalent to:
>
> <nml:Link idRef="urn:ogf:network:example.net:2012:mylink-a-to-b" />
>
>
> If this seems OK to both of you, I'll make a formal proposal.
>
> Note that the "isReference" in this proposal is only use to signal that
> a the object is defined _in another document_.

Fine by me. The only small possible problem I see is that this solution 
makes topology document quite static (not sure it's the right word; 
maybe less flexible to manipulate). I can imagine that a topology 
storage is split (even automatically) because of some reason and then 
we've got more than one document. During this operation references would 
have to be added in the right places.

Roman

> So for references within
> a document, "id" should be used. E.g.:
>
> <nml:BidirectionalLink id="urn:ogf:network:example.net:2012:mylink">
>    <nml:Link id="urn:ogf:network:example.net:2012:mylink-a-to-b" />
>    <nml:Link id="urn:ogf:network:example.net:2012:mylink-b-to-a" />
> </nml:BidirectionalLink>
> <nml:Link id="urn:ogf:network:example.net:2012:mylink-a-to-b">
>    <nml:name>A to B</nml:name>
> </nml:Link>
> <nml:Link id="urn:ogf:network:example.net:2012:mylink-b-to-a">
>    <nml:name>B to A</nml:name>
> </nml:Link>
>
>
> Regards,
> Freek
>
> (PS: Maybe the isReference in nml:property should be a full URI, just as
> in a nml:Relation)



More information about the nml-wg mailing list