You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EasyRdf cannot properly serialize data from the EuroVoc thesaurus (see NatLibFi/Skosmos#421 for original issue report).
The problem seems to be that URI namespaces are shortened naively and the shortened URIs (qnames) may contain characters that are invalid in RDF/XML and/or Turtle. EuroVoc has two namespaces, http://eurovoc.europa.eu/ for thesaurus concepts and labels and http://eurovoc.europa.eu/schema# for schema elements such as custom classes and properties. Note that the latter is a sub-namespace of the former.
EasyRdf cannot properly serialize data from the EuroVoc thesaurus (see NatLibFi/Skosmos#421 for original issue report).
The problem seems to be that URI namespaces are shortened naively and the shortened URIs (qnames) may contain characters that are invalid in RDF/XML and/or Turtle. EuroVoc has two namespaces,
http://eurovoc.europa.eu/
for thesaurus concepts and labels andhttp://eurovoc.europa.eu/schema#
for schema elements such as custom classes and properties. Note that the latter is a sub-namespace of the former.Code to demonstrate:
This outputs:
This is invalid XML, as
#
cannot be used in tag names.If I change the output format to
turtle
instead I get this:In my reading of the RDF 1.1 Turtle grammar,
#
is not allowed unescaped in local names. In older Turtle versions it is certainly not allowed.The safest would be to avoid shortening URIs if the result would not be a valid XML QName.
The text was updated successfully, but these errors were encountered: