[redland-dev] [Raptor RDF Syntax Library 0000516]: rdfxml-xmp output generates prohibited syntax
Mantis Bug Tracker
mantis-bug-sender at librdf.org
Mon Jul 16 08:40:10 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://bugs.librdf.org/mantis/view.php?id=516
======================================================================
Reported By: normang
Assigned To:
======================================================================
Project: Raptor RDF Syntax Library
Issue ID: 516
Category: api
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Syntax Name:
======================================================================
Date Submitted: 2012-07-16 12:40
Last Modified: 2012-07-16 12:40
======================================================================
Summary: rdfxml-xmp output generates prohibited syntax
Description:
When converting from Turtle to the XMP profile of RDF/XML, librdf generates
syntax which is prohibited by the XMP standard. See below.
The rdfxml-xmp output contains the rdf:_1... properties which were included in
the input. However, the XMP specification, ISO 16684-1:2011(E) (available at
<http://www.adobe.com/devnet/xmp.html>) says:
7.9.3.3 rdf:_n elements and attributes
RDF allows a sequence of rdf:li elements to be replaced with elements of the
form rdf:_1, rdf:_2, and so on. Because these are unique names,
element-to-attribute substitution similar to 7.9.2.2, “rdf:Description with
property attributes”, is also allowed in general RDF. The rdf:li element shall
be used in XMP and the rdf:_n form shall not be used in XMP.
I believe, therefore, that the rdfxml-xmp serialiser should translate rdf:_n
properties into rdf:li properties.
The workaround is to use rdf:li properties in the input.
Steps to Reproduce:
% cat xmpinput.ttl
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc: <http://purl.org/dc/elements/1.1/>.
<> dc:creator [
a rdf:Seq;
rdf:_1 "First Author";
rdf:_2 "Second Author" ].
% rapper -iturtle -ordfxml-xmp xmpinput.ttl
rapper: Parsing URI file:///checkouts/me/projects/mrd-gw/docs/jisc/xmpinput.ttl
with parser turtle
rapper: Serializing with serializer rdfxml-xmp
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/'>
<rdf:RDF
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="">
<dc:creator>
<rdf:Seq>
<rdf:_1>First Author</rdf:_1>
<rdf:_2>Second Author</rdf:_2>
</rdf:Seq>
</dc:creator>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='r'?>
rapper: Parsing returned 4 triples
% rapper -v
2.0.7
%
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-07-16 12:40 normang New Issue
======================================================================
More information about the redland-dev
mailing list