Re: RDF question: accessing xml:lang

Jarno Elovirta wrote:
> ...
> In out project (educational) we are using RDF for communication
> between users and our database and are considering to use SIRPAC/RDF API 1.0
> Draft to parse out documents, but it seems that xml:lang attributes are not
> represented in the model (I am not a coder). The question therefore is what
> kind of modifications would be needed in RDF API 1.0 Draft code to gain
> access to those attributes. If you know a better place to ask this question,
> I would be happy to ask it there also.
> Jarno Elovirta
> Research & Development
> Espoo-Vantaa Institute of Technology


xml:lang is not represented in the RDF model according to RDF M&S 1.0,
which is IMO a bug in the specs. Thus, the model generated for

	<rdf:Description about=".../x.html">
	  <dc:Title xml:lang="fr">Bonjour</dc:Title>

is just

	x.html --dc:Title--> "Bonjour"

A way to keep the language information in the model would be:

	x.html --dc:Title--> 000123
	000123 --rdf:value--> "Bonjour"
	000123 --xml:lang--> "fr"

Note that this behaviour is already built-in in the strawman parser
implementation [1]. The serialization

	<?xml version="1.0"?>

	 <!ENTITY rdf  ''>
	 <!ENTITY dc  ''>

	<dc:Title  xmlns:rdf="&rdf;" xmlns:dc="&dc;"
	           rdf:for="x.html" xml:lang="fr">Bonjour</dc:Title>

produces the second model.

Any opinions about how xml:lang is to be treated correctly?



Received on Wednesday, 19 January 2000 16:43:02 UTC