ebook
ebook copied to clipboard
BNF for URIs
In the Hypertext Transfer Protocol section, there is a subset of the BNF for URIs. It's a subset, it's not the full description of all URIs but I found it odd that the query and the fragment are included twice.
URI = scheme ":" "//" authority path [ "?" query ] [ "#" fragment ]
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
authority = [ userinfo "@" ] host [ ":" port ]
query = *( pchar / "/" / "?" ) <----------- HERE -----------
fragment = *( pchar / "/" / "?" ) <----------- HERE -----------
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
query = *( pchar / "/" / "?" ) <----------- HERE -----------
fragment = *( pchar / "/" / "?" ) <----------- HERE -----------
pct-encoded = "%" HEXDIG HEXDIG
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
reserved = gen-delims / sub-delims
gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
Agreed, this is an error, feel free to propose an updated text
The error is still there, and there is another inconsistency, the URI scheme that is proposed requires "//", it is also mentioned in the text that The characters : and // follow the scheme of any URI. but then in the URN example in the footnote there is no "//": urn:isbn:0-380-81593-1