Subject: RE: [Ltru] Re: [psg.com #1097] ABNF cleanup in matching draft

From: "Addison Phillips" <[email-masked]>
Date: Tue, 16 Aug 2005 16:09:13 -0700

Maybe a summary is in order.

There are three matching schemes currently.

The one in HTTP is called "Basic Matching" and uses a Basic Language Range. A Basic Language Range is either "*" or a specific tag ("fr-CA"). Wildcards are not permitted in a language range (that is, "fr-*" is illegal). The ABNF for this is simple:

Range = Tag / "*"

Thus:

> With 3066, was it ever allowed or possible to have more
> than one -*- in a range ?  If not, was it ever possible
> or allowed to have a -*- within a range (not at the end) ?

It wasn't possible to have ANY stars in a range. Either the range is star or it is a prefix.

"Extended Ranges" are the ones that can contain a mix of subtags and wildcards and for which a more complex ABNF exists that Kent is commenting on. They are an innovation coupled with draft-registry.

In this scheme, there is a difference between "sr" and "sr-*". A tag that ends with a concrete (non-wildcard) subtag must end with exactly that subtag. Thus "sr" matches exactly one tag: "sr", while "sr-*" matches a plethora of tags (all the ones that start with "sr", including "sr").

This subtlety allows one to be specific: "en-US" matches many tags, but never "en-US-boont".

Kent and others might question why there is no need to have separate wildcards (that is, why we allow the fields to be collapsed). There is a simple reason for this: the subtags in an RFC 3066bis language tag (and thus a range) are distinguishable by length and content. Any concrete subtag that appears in a range is self-identifying. Thus users need not be bothered with counting the stars.

An open question is whether omitting a star should or should not match a given tag (that is, whether "fr-CA" matches "fr-Brai-CA"). The draft currently says that it does.

The last form of matching is something called "scored matching". In that scheme, each field must be specified, either with a subtag or a wildcard.

> If a * or -* was always at the end (and at most one) the
> project "matching-draft" could be really tricky.

Which is why it says the opposite.

I hope this summary helps.

Best Regards,

Addison

Addison P. Phillips
Globalization Architect, Quest Software
Chair, W3C Internationalization Core Working Group

Internationalization is not a feature.
It is an architecture. 

> 
> If a * or -* was always at the end (and at most one) the
> project "matching-draft" could be really tricky.
> 

_______________________________________________
Ltru mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ltru

---

From: Frank Ellermann <[email-masked]>
Date: Wed, 17 Aug 2005 03:02:43 +0200

> I hope this summary helps.

Yes, thanks.  So we have sr-* == sr-*-*-*-*, as soon as
there's one star it's for all available positions.  Same
idea for sr-*-1900 == sr-*-*-*-1900.

But sr-*-CYRL and sr-*-CYRL-*-* are different, correct ?

                       Bye, Frank