How does this ABNF look for the Media Size Self Describing Name?
We agreed in Portland that if a size was ever smaller than an inch or a mm,
the it would have a single zero for the integer part. Otherwise, the
integer part is without leading zeros. Also the fraction part, if present,
has no trailing zeros. I left the prefix as a separate token because we
probably want to mention it in the text as a separate section:
5.1.1 prefix This string part is present to indicate the name space or
jurisdiction for the size name in order to prevent name clashes. Examples
include "na" for North America, "iso" for the International Standards
Organization, etc.
Thanks,
Tom
media-size-self-describing-name = size-name "_" short-dim "x" long-dim
units
size-name = prefix "-" lowalpha *( lowalpha | digit | "-" )
prefix = lowalpha *lowalpha
short-dim = dim
long-dim = dim
units = "in" | "mm"
dim = integer-part [fraction-part] | "0" fraction-part
integer-part = non-zero-digit *digit
fraction-part = "." *digit non-zero-digit
lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" |
"j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" |
"s" | "t" | "u" | "v" | "w" | "x" | "y" | "z"
non-zero-digit = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"