Dave Reynolds wrote:
> katieportwin wrote:
>
>
>>We have come across something a bit odd: it seems that
>>rdf:parseType=Literal is interfering with the xml:lang attribute..
>
>
> See http://www.w3.org/TR/rdf-concepts/#section-literals
>
> Basically only plain literals are allowed an xml:lang tag, XMLLiterals
> count as typed literals and don't inherit an xml:lang. As it says in that
> section:
>
> [[[
> For text that may contain markup, use typed literals with type
> rdf:XMLLiteral. If language annotation is required, it must be explicitly
> included as markup, usually by means of an xml:lang attribute. [XHTML] may
> be included within RDF in this way. Sometimes, in this latter case, an
> additional span or div element is needed to carry an xml:lang or lang
> attribute.
> ]]]
>
> So Jena is just trying to follow the specs.
As an example with your data
<rdf:RDF
xml:base="http://metastore.ingenta.com/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#">
<rdf:Description
rdf:about="http://metastore.ingenta.com/content/test" >
<rdfs:label xml:lang='fr'>chat in french </rdfs:label>
<rdfs:label rdf:parseType='Literal'><xhtml:span
xml:lang='en'>chat in eng - with literal</xhtml:span></rdfs:label>
<rdfs:label xml:lang='en'>chat in eng - without
literal</rdfs:label>
</rdf:Description>
</rdf:RDF>
Andy suggested that the parser could emit a warning when an explicit
xml:lang is present with rdf:parseType="Literal", a more sophisticated
warning would be for any xml:lang that made no change to the data.
Jeremy