RE: RDF and xml:base

Graham Klyne wrote:
> Can I, or can I not do this:
>
>    <rdf:RDF xmlns:rdf='...' xmlns:ex='http://example.org/'
>             xml:base='http://example.org/Base/' >
>      <rdf:Description rdf:ID='localID'>
>        <ex:property>PropVal</ex:property>
>      </rdf:Description>
>    </rdf:RDF>
>


An example I am currently interested in is the use of ID on property
productions as an abbreviation for reification.


 [6.12] propertyElt    ::= '<' propName idAttr? '>' value '</' propName '>'
                         | '<' propName idAttr? parseLiteral '>'
                               literal '</' propName '>'
                         | '<' propName idAttr? parseResource '>'
                               propertyElt* '</' propName '>'
                         | '<' propName idRefAttr? bagIdAttr? propAttr* '/>'


and again from M&S:

http://www.w3.org/TR/REC-rdf-syntax/ says:

"Within propertyElt (production [6.12]), [...] [t]he value of the ID
attribute, if specified, is the identifier for the resource that represents
the reification of the statement."


The scenario that interests me is file merging.

I have RDF data from two sources, which I merge to create a third RDF data
store that I wish to serialise using the abbreviated syntax. Reifications of
statments that were created using this production appear not to be
serialisable except in full. The problem is that the ID attribute that
created them was local to the originating store, and the production doesn't
let me use a non-local reference. If I have understood this thread correctly
then not even xml:base saves me, since it doesn't apply to local ID's.

Personally I would like to be able to merge:


<Description about="http://something.somewhere/interesting">
  <p:prop1 ID="Prop1">Value1</p:prop1>
</Description>

in http://something.somewhere/source1

with

<Description about="http://something.somewhere/interesting">
  <p:prop2 ID="Prop2">Value2</p:prop2>
</Description>

in http://something.somewhere/source2


to create
<Description about="http://something.somewhere/interesting">
  <p:prop1 xml:base="http://something.somewhere/source1"
        ID="Prop1">Value1</p:prop1>
  <p:prop2 xml:base="http://something.somewhere/source2"
        ID="Prop2">Value2</p:prop2>
</Description>


although I would be happy with a "resource=" attribute instead.


Jeremy Carroll
HP Labs

Received on Wednesday, 30 May 2001 10:46:48 UTC