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

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