[redland-dev] Redland and OS X default libxslt

Norman Gray norman at astro.gla.ac.uk
Thu Jul 12 10:47:22 BST 2007


Greetings.

The libxslt available by default in OS X 10.4.10[1] can cause rapper  
to produce rather garbled results; the MacPorts library set[2] works  
fine.  This isn't a librdf bug, of course, but instead a warning that  
the system libxslt should probably (currently, still) be avoided.   
Consequently, I haven't included a detailed bug reduction below.

The thread including message <http://lists.usefulinc.com/pipermail/ 
redland-dev/2004-November/000691.html> describes a broken libxml2 in  
10.3.  This isn't that problem.

The symptom is that when Redland is built with the system libxslt, it  
can produce output like the following:

% $T/redland-1.0.6/bin/rapper -igrddl cvsprimer.html http://example.org
rapper: Parsing file cvsprimer.html with base URI http://example.org
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http:// 
www.w3.org/1999/XSL/TransformDescription> .
_:genid1 <http://www.w3.org/1999/XSL/Transformabout> "" .
rapper: Error - URI http://example.org:4 - Literal property element  
'modified' has property attributes
_:genid2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http:// 
www.w3.org/1999/XSL/TransformDescription> .

Note the error message, and the garbled rdf:Description and rdf:about  
predicates: the XSLT namespace is being used instead of the RDF one.   
I haven't worked out precisely what it is about the transformation or  
the source document that triggers this, nor can I find a specific  
corresponding bug in the libxslt bugparade, but it does appear to  
have been fixed already.  So that's nice.

When built with the MacPorts version:

% $T/redland-1.0.6-local/bin/rapper -igrddl cvsprimer.html http:// 
example.org
rapper: Parsing file cvsprimer.html with base URI http://example.org
<http://example.org> <http://purl.org/dc/elements/1.1/modified>  
"2006-04-03T15:11:27"^^<http://www.w3.org/2000/01/rdf-schema#Literal> .
<http://example.org> <http://purl.org/dc/elements/1.1/identifier>  
<http://purl.org/nxg/note/cvsprimer> .

It's clearly the XSL transform to blame:

% /usr/bin/xsltproc RDFa2RDFXML.xsl cvsprimer.html
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
xmlns:h="http:/
/www.w3.org/1999/xhtml">
<!--Could not produce the triple for:  - stylesheet - UNKOWN  
ROOTstyle/base.css-
->
   <rdf:Description xmlns:rdf="http://www.w3.org/1999/XSL/Transform"  
rdf:about=""
 >
     <dc:modified xmlns:dc="http://purl.org/dc/elements/1.1/"  
rdf:datatype="http:
//www.w3.org/2000/01/rdf-schema#Literal">2006-04-03T15:11:27</ 
dc:modified>
   </rdf:Description>

(note the incorrectly redefined rdf namespace prefix in the third  
line) versus

% /opt/local/bin/xsltproc RDFa2RDFXML.xsl cvsprimer.html
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"  
xmlns:h="http://www.w3.org/1999/xhtml">
   <!--Could not produce the triple for:  - stylesheet - UNKOWN  
ROOTstyle/base.css-->
   <rdf:Description rdf:about="">
     <dc:modified xmlns:dc="http://purl.org/dc/elements/1.1/"  
rdf:datatype="http://www.w3.org/2000/01/rdf- 
schema#Literal">2006-04-03T15:11:27</dc:modified>
   </rdf:Description>

I'll submit an OS X bug asking them to update the default library.   
In the meantime, it seems best to use a fully up-to-date libxslt with  
Redland on OS X.

Best wishes,

Norman


[1] Using libxml 20616, libxslt 10111 and libexslt 809
[2] Using libxml 20628, libxslt 10120 and libexslt 813


-- 
------------------------------------------------------------
Norman Gray  :  http://nxg.me.uk
eurovotech.org  :  University of Leicester, UK




More information about the redland-dev mailing list