Vadim Gritsenko wrote:
Upayavira wrote:
Sjur Nørstebø Moshagen wrote:
Exactly, if no default is given, the matcher doesn't match.På 9. jul. 2004 kl. 14.04 skrev Vadim Gritsenko:
I guess the full list would be: {lang}, {country}, {encoding}, {variant}, {full-locale}, {matched-locale}. {locale} could be a shorthand for {full-locale}.
This list should be compatible with LocaleAction: language (not lang), country, variant.
Agree.
Site default locale is defined within the config of the matcher at the top of the sitemap. It could easily be overridden with a <map:parameter name="default-locale" value="xxxx"/> within the matcher itself.
OK.
If no default is given, it should defaults to empty locale.
Ok, but how do you decide which document version to serve then? Or should Cocoon throw an error ("No resource found")?
No, it should match document without locale - same behavior we have now. Given your example:
file.ru_EE-KOI8.xml file.ru_EE.xml file.ru.xml file.xml
And if none of the files above are present, *then* it should not match.
Hmm. But the matcher says pattern="file.*.xml" where the * is the locale. Now file.xml cannot match that pettern.
So we'd need to build in a special case, which says something like, if the characters before and after the locale are the same, then only use one of those characters when looking for a default file.
This would allow it to cater for:
contents/ru_EE/file.xml contents/file.xml
as well as your naming scheme above.
Does this seem reasonable?
Upayavira