W3C home > Mailing lists > Public > w3c-translators@w3.org > April to June 2003

Re: renewal of the W3C Translation pages (lang query)

From: <jaccoud@petrobras.com.br>
Date: Fri, 9 May 2003 15:58:40 -0300
To: Dan Connolly <connolly@w3.org>
Cc: Chris Lilley <chris@w3.org>, Ivan Herman <ivan@w3.org>, w3t@w3.org, w3c-translators@w3.org
Message-ID: <OFF71DF13E.3D39FB56-ON83256D21.006733B3-83256D21.0068205A@petrobras.com.br>




>Hmm... that's an interesting idea... what sort of query did
>you have in mind?

The trick is restricting the check in xml:lang attribute to just the number
of characters present in the query. This way, a query to "pt" would return
any documents tagged with either "pt", "pt-BR", or "pt-anything". If you go
a step further and restrict the test to the minimum number of charaters of
either the query string and the testes string, then it would also return
"pt" documents when asked for "pt-PT", but not "pt-BR". I think this
behaviour is exactly what is expected from xml:lang.
This is easy to implement, just tweak the XPath expression in the query
using the string-length() and starts-with() functions.

=============================================
Marcelo Jaccoud Amaral
mailto:jaccoud@petrobras.com.br
voice: +55 21 2534-3485
fax: +55 21 2534-1809
=============================================
There are only 10 kinds of people in the world: those who understand binary
and those who don't.
Received on Friday, 9 May 2003 15:06:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 28 August 2007 15:50:01 GMT