Re: rdfs:label and rdfs:comment

Mark Seaborne wrote:
> 
> I have an application of RDF which requires interchangeable, multilingual
> labels and comments. Furthermore labels are reused across a number of
> different classes and properties. Obviously I need to be able to separate
> out the values of labels and comments and store them in another
> rdf:resource. Consequently I find the restriction of range to literal for
> these elements to be rather an obstacle.

So if I get your problem, you want :
* to reuse the same label in multiple resources
  => you can use XML entities
* to store label and resource in different resources
  => you can describe the same resource in multiple rdf-docs
     and even give clue with the 'seeAlso' property

You could do something like

::::::::::::::
: myDefs.rdf :
::::::::::::::
<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF>

  <rdf:Description ID="R1">
    ...
    <rdfs:seeAlso rdf:resource="myLabels.rdf"/>
  </rdf:Description>

  <rdf:Description ID="R2">
    ...
    <rdfs:seeAlso rdf:resource="myLabels.rdf"/>
  </rdf:Description>

</rdf:RDF>

::::::::::::::::
: myLabels.rdf :
::::::::::::::::

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE rdf:RDF [
 <!ENTITY label1  'you can write it like that'>
 <!ENTITY label2  '<rdfs:label xml:lang="en">
                     or even like that
                   </rdfs:label>'>
]>
<rdf:RDF>

  <rdf:Description about="myDefs.rdf#R1">
    <rdfs:label> &label1; </rdfs:label>
    &label2;
  </rdf:Decsription>

  <rdf:Description about="myDefs.rdf#R2">
    <rdfs:label> &label1; </rdfs:label>
    &label2;
  </rdf:Decsription>

</rdf:RDF>
::::::::::::::::::::

you could also import a DTD containing the entities,
so that the same entities can be reused in many "myLabels.rdf" files
or use external entities, and write your labels in separate files.

I even think that it is possible to optimize SiRPAC with a specific DTDHandler
so that entities are guaranteed to be stored only once in memory,
but that's to be verified...

> I am sure that others will encounter the same problem, so rather than have
> lots of different implementations of label and comment, what about simply
> allowing them to point to another rdf:resource?

The more precise a property's domain, the more meaning it carries.
So I think this is a good thing that labels are contrained to be Litterals...

 regards

  Pierre-Antoine

Received on Thursday, 30 September 1999 05:23:37 UTC