Bruce D'Arcus wrote:
On this example ...
On May 2, 2007, at 9:29 AM, Svante Schubert wrote:
Here an example of binding ODF elements from
the pacakge to RDF IRIs:
<odf:Package
rdf:about="urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3"
xmlns:odf="http://docs.oasis-open.org/opendocument/meta/package#"
xmlns:dct="http://purl.org/dc/terms/">
<dct:hasPart>
<odf:ContentFile
rdf:about="urn:uuid:321fc314-69d3-4019-859d-29a5dc2721a0"
odf:path="content.xml">
<dct:hasPart>
<odf:Element
rdf:about="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"
odf:idref="someID"/>
</dct:hasPart>
</odf:ContentFile>
</dct:hasPart>
<dct:hasPart>
<odf:File rdf:about="http://rdf-named-graph/calendar/vcard"
odf:path="meta/calendar/vcard.rdf">
<rdf:type
rdf:resource="http://www.w3.org/2006/vcard/ns#"/>
<rdf:type rdf:resource="http://calendar/data"/>
<dct:references>
<odf:Element rdf:about="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"/>
</dct:references>
</odf:File>
</dct:hasPart>
</odf:Package>
Wouldn't it be better to encode this like so; as a proper graph, rather
than using so many blank nodes?
<rdf:RDF
xmlns:odf="http://docs.oasis-open.org/opendocument/meta/package#"
xmlns:dct="http://purl.org/dc/terms/">
<odf:Package
rdf:about="urn:uuid:224ab023-77b8-4396-a75a-8cecd85b81e3">
<odf:hasPart
rdf:resource="urn:uuid:321fc314-69d3-4019-859d-29a5dc2721a0"/>
<odf:hasPart
rdf:resource="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"/>
</odf:Package>
<odf:ContentFile
rdf:about="urn:uuid:321fc314-69d3-4019-859d-29a5dc2721a0"
odf:path="content.xml"/>
<odf:Element
rdf:about="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"
odf:idref="someID"/>
<odf:File rdf:about="http://rdf-named-graph/calendar/vcard"
odf:path="meta/calendar/vcard.rdf">
<rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#"/>
<rdf:type rdf:resource="http://calendar/data"/>
<dct:references
rdf:resource="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d">
</odf:File>
</rdf:RDF>
Not sure I have the details precisely right (am in a hurry) but this
general approach is cleaner, simpler, and also less verbose ...
I am sure this approach will provide a similar proper RDF graph as the
one before when some minor details were fixed (e.g. the statement that
the element is part of the content file got lost, it's required as the
element needs the path of the file aside of it's ID).
I further believe the new graph will provide a similar amount of blank
nodes and be similar verbose, but the earlier used 'normalized' RDF/XML
has the advantage to ease XML processing and comes closer to the
locical nested view of a package.
Is there really a benefit in the alternate approach?
PS:
Fixed my earlier typo of
<odf:Element rdf:resource="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"/>
to
<odf:Element rdf:about="urn:uuid:afdc453c-5dc8-4988-8dab-fc378bd9e73d"/>
Svante
|