Error in ABNF:
localized-folder vs. locale-folder

Error with ABNF
utf8-chars       = safe-chars / U+0080 and beyond
"and beyond" does not fit here
Section 2. of RFC2279 shows that all UTF-8 characters above U+0080 are encoded 
with byte values over 0x80.
So utf-8 production equals to cp437 production on the byte level within the 
context that is important for us.
So both productions can be equalized and removed, since allowed-char may be 
used.
I think the problem is similar to this one about encoding (I just had a brief 
look on it):
http://lists.w3.org/Archives/Public/public-html/2009May/0643.html

Error with ABNF
cp437-chars      = safe-chars / x80-FF
should be according to RFC2234:
cp437-chars      = safe-chars / %x80-FF

Due to many issues I would rewrite the whole ABNF as follows.
ABNF issues, additionally to the above, are:
1. plural form used for just "one-of" value
2. the zip-rel-path may have problems with existence, since all productions are 
optional. The below format seems equal and is
shorter
3. the production of file-name is wrongly specified, since there file-extension 
could appear up to 254 times in a file name
4. I am not sure whether the file extension could be more than 3 chars or not 
in the existing ABNF?
If so, the actual file name shall match 2 rules simultaneously, e.g.:
file-name1       = 1*allowed-char [ "." 1*allowed-char ]
file-name2       = 1*254 ( allowed-char )
Matching of those 2 rules is not expressible in ABNF, so prose would be needed.

New ABNF (problem of file extension length as above still remains):
**************
A valid Zip relative path is one that case-insensitively matches the production 
of Zip-rel-path in the following [ABNF] that
operates on bytes, not on characters, i.e. after any encoding (CP437 or UTF-8) 
has been applied:

zip-rel-path     = [ locale-folder ] [ *folder-name ] [ file-name ]

locale-folder    = "locales" "/" Language-Tag "/"
folder-name      = file-name "/"
file-name        = base-name [ file-extension ]
file-extension   = "." 1*3 ( allowed-char )

base-name        = 1*250( allowed-char )
allowed-char     = safe-char / %x80-FF
safe-char        = ALPHA / DIGIT / SP / "$" / "%"
                    / "'" / "-" / "_" / "@"
                    / "~" / "(" / ")" / "&" / "+"
                    / "," / "." / "=" / "[" / "]"
**************

Authors need to keep path lengths below 250 bytes. Unicode code points can 
require more than one byte to encode, which can result in
a path whose length is less than 250 characters.
should be
Authors need to keep path lengths below 250 bytes. Unicode code points may 
require more than one byte to encode a character, which
can result in a path whose length is less than 250 characters to be represented 
in more than 250 bytes.

UTF8-chars
should be
utf8-chars or utf8-char or something new (after the ABNF is updated) .

________________________________________

Access Systems Germany GmbH
Essener Strasse 5  |  D-46047 Oberhausen
HRB 13548 Amtsgericht Duisburg
Geschaeftsfuehrer: Michel Piquemal, Tomonori Watanabe, Yusuke Kanda

www.access-company.com

CONFIDENTIALITY NOTICE
This e-mail and any attachments hereto may contain information that is 
privileged or confidential, and is intended for use only by the
individual or entity to which it is addressed. Any disclosure, copying or 
distribution of the information by anyone else is strictly prohibited.
If you have received this document in error, please notify us promptly by 
responding to this e-mail. Thank you.

Reply via email to