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

Folks,

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>
	</rdf:Description>

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"?>

	<!DOCTYPE RDF [
	 <!ENTITY rdf  'http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
	 <!ENTITY dc  'http://purl.org/dc/elements/1.1/'>
	]>

	<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?

Sergey

[1] http://www-db.stanford.edu/~melnik/rdf/api.html

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