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

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

From: Chris Lilley <chris@w3.org>
Date: Fri, 9 May 2003 21:50:18 +0200
Message-ID: <39335789921.20030509215018@w3.org>
To: jaccoud@petrobras.com.br
CC: Dan Connolly <connolly@w3.org>, Ivan Herman <ivan@w3.org>, w3t@w3.org, w3c-translators@w3.org

On Friday, May 9, 2003, 8:58:40 PM, jaccoud wrote:





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

jpcb> The trick is restricting the check in xml:lang attribute to just
jpcb> the number of characters present in the query. This way, a query
jpcb> to "pt" would return any documents tagged with either "pt",
jpcb> "pt-BR", or "pt-anything". If you go a step further and restrict
jpcb> the test to the minimum number of charaters of either the query
jpcb> string and the testes string, then it would also return "pt"
jpcb> documents when asked for "pt-PT", but not "pt-BR".

Right. And further, it has to be seen as a hyphen-separated list of
tokens. Its not a substring match. So "p" or "pt-b" should not match
anything.

jpcb>  I think this
jpcb> behaviour is exactly what is expected from xml:lang.

Yes.

jpcb>  This is
jpcb> easy to implement, just tweak the XPath expression in the query
jpcb> using the string-length() and starts-with() functions.

Possibly.

-- 
 Chris                            mailto:chris@w3.org
Received on Friday, 9 May 2003 22:49:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:27:34 UTC