These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:15 pm Advanced search

Microdata : lang=xxxx

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Microdata : lang=xxxx

Postby timvanoostrom » Thu Nov 26, 2009 2:53 pm

Hey i'm developing a Microdata JSON parser and Ntriple serializer. As i went through the html5 spec i noticed that Microdata doesn't say anything about lang="", the rdf Ntriples have Objects suffixed with for example : @en

Example (without uri's)

[code]
<div itemtype="country" itemscope>
<span itemprop="name" lang="cn">中è
timvanoostrom
<h5>
 
Posts: 10
Joined: Fri Nov 13, 2009 2:14 pm

Postby zcorpan » Thu Nov 26, 2009 4:51 pm

I see "... with the language information set from the language of the element, if it is not unknown." in various places in the RDF section.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby timvanoostrom » Thu Nov 26, 2009 6:44 pm

The RDF section has something about how to handle lang, but the Json section doesn't mention it. Is that because it isn't useful for the Json object values to have language information ? (which in my opion degrades the use of Json for data exchange)

Rdf Ntriples have lang info like this
[code]http://localhost/itemsdev/ <http://xmlns.com/foaf/spec/index.rdf#name> "中è
timvanoostrom
<h5>
 
Posts: 10
Joined: Fri Nov 13, 2009 2:14 pm

Postby zcorpan » Thu Nov 26, 2009 7:04 pm

I guess it wasn't considered needed for JSON use cases; similarly the document title isn't in the JSON output IIRC.

Do you have a use case for language information in the JSON output?
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby timvanoostrom » Fri Nov 27, 2009 9:29 am

Well didn't really thougt about it thoroughly but :
On this page http://www.mail-archive.com/whatwg@list ... 14468.html a few of the use-case requirements say :
The information should be convertible into a dedicated form (RDF, JSON, XML, BibTex) in a consistent manner, so that tools that use this information separate from the pages on which it is found have a standard way of conveying the information.

I can imagine apps storing the JSON serializations of html pages directly into a database for searching, for example couchDB.

Which could lead to the following scenario :
* Mei-Li, from China, is an international exchange student and searches the Amsterdam university (VU) history domain database for Chinese language fragments (maybe to review the quality of translations in the domain) in stored documents

* Lizzy is an Art student and wants to use some Chinese names in here work, she browses the web and clicks a browserbutton with the following function :
Code: Select all
discoverMicrodata({"lang" : ['zh-CN'],"property" : ['http://xmlns.com/foaf/spec/index.rdf#name']}

It would be nice if such a function can make use of the standard JSON serialization

This is all kind of new to me (the whole point of my project) so bear with me if it doesn't make any sense.
timvanoostrom
<h5>
 
Posts: 10
Joined: Fri Nov 13, 2009 2:14 pm


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 0 guests