[redland-dev] Abbreviating URIs in XML Attribute Values

David Phillips dphillips at janya.com
Thu Jun 16 15:00:55 CEST 2011


Hello.

I'm trying to get my RDF to be as little bloated as possible.  One way
of doing this is by setting namespaces on the RDF serializer.  But the
XML namespace spec only covers XML elements and XML attribute names.
It does not cover XML attribute values.  That is, you can't use a
qname in a context such as:

<element attname="prefix:localname" />

However, I've come across XML documents (in particular, OWL
ontologies) which have the following:

<element attname="&prefix;localname" />

Instead of the prefix being defined with a namespace declaration it's
defined with an entity declaration in the document's DOCTYPE.

My question is: Is there any way of getting a librdf serializer to
generate RDF with this sort of abbreviated attribute values?

Thanks in advance!

-Dave Phillips


More information about the redland-dev mailing list