Re: [office] Proposal for language tags according to RFC 4646

From
Dave Pawson <>
Date
2006-11-28T13:32:36+00:00
ID
Thread
Re: [office] Proposal for language tags according to RFC 4646
On 28/11/06, Eike Rathke <> wrote:



> I herewith propose full support of RFC 4646 language tags
> http://tools.ietf.org/html/rfc4646 that obsoletes RFC 3066.

Due caution. IETF is awaiting the acceptance of ISO 693-3 which
seemingly isn't released as yet? I'm not sure of the actual
status, but the ietf lists are full of it.
I really think the fo: namespace could be lost if this gains acceptance.





> The question now is how to do it in the schema.

  public static String langtag="("+language+
    "(-"+script+")?"+
    "(-"+region+")?"+
    "(-"+variant +")?"+
    "(-"+extension + ")?"+
    "(-"+privateuse+")?)|"+irregulars;

etc.
I have the rest of the java regex, which should ship into relax ng quite
happily.
  public static String irregulars ="en-GB-oed|i-ami|i-bnn|i-default" +
    "|i-enochian|i-hak|i-klingon|i-lux|" +
    "|i-mingo|i-navajo|i-pwn|i-tao|i-tay|" +
    "i-tsu|sgn-BE-fr|sgn-BE-nl|sgn-CH-de";
  public static String grandfathered =
"(i([a-zA-Z]{1,2})?)("+s+"("+alphanum+"){2,8}){1,2}";
etc.
Though that's questionnable.

I think it's doable (but a bit messy ;-)

regards
-- 
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk