Search the web
Sign In
New User? Sign Up
jena-dev · Jena Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
rdf:parseType with xml:lang   Topic List   < Prev Topic  |  Next Topic >
Reply  |  Next Message > 
Re: [jena-dev] rdf:parseType with xml:lang

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





Mon Oct 3, 2005 3:58 pm

jjchplb
Offline Offline
Send Email Send Email

 |  Next Message > 
Expand Messages Author Sort by Date

Hi, We have come across something a bit odd: it seems that rdf:parseType=Literal is interfering with the xml:lang attribute.. Here is my model: <?xml...
katieportwin
Offline Send Email
Oct 3, 2005
3:28 pm

... 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...
Dave Reynolds
derihy
Online Now Send Email
Oct 3, 2005
3:47 pm

... As an example with your data <rdf:RDF xml:base="http://metastore.ingenta.com/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" ...
Jeremy Carroll
jjchplb
Offline Send Email
Oct 3, 2005
4:00 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help