Can a URN-schemed URI have a query component?

I've been asked the following:

---

It's understood that a URI can contain a query after 
the path as in the URL below, but can a URN contain 
a query as in the URN below:

  foo://example.com:8042/over/there?name=ferret#nose
  \_/   \______________/\_________/ \_________/ \__/
   |           |            |            |        |
scheme     authority       path        query   fragment
   |   _____________________|__
  / \ /                        \
  urn:example:animal:ferret:nose?type=blue;etc.  

---

Since a URN is a URI, I see nothing in 3986 [1] preventing 
a URN-schemed URI from having the optional query part.

RFC 2141 [2] defines a URN as:

   <URN> ::= "urn:" <NID> ":" <NSS>

and

   <NSS>         ::= 1*<URN chars>

   <URN chars>   ::= <trans> | "%" <hex> <hex>

   <trans>       ::= <upper> | <lower> | <number> | <other> | <reserved>

   <hex>         ::= <number> | "A" | "B" | "C" | "D" | "E" | "F" |
                     "a" | "b" | "c" | "d" | "e" | "f"

   <other>       ::= "(" | ")" | "+" | "," | "-" | "." |
                     ":" | "=" | "@" | ";" | "$" |
                     "_" | "!" | "*" | "'"

   <reserved>    ::= '%" | "/" | "?" | "#"

Given the productions, it looks like an <NSS> could consist
of "?type=blue;etc." (without the quotes), so again I see
nothing in 2141 preventing a URN-schemed URI from having 
the optional query part, but I wonder what others think.

Of course, whether there is a UA that would actually do what
the user wants with such a URI is another question, but I
was wondering what others in this WG think about what the
specs are saying.

paul


[1] ftp://ftp.ietf.org/rfc/rfc3986.txt
[2] ftp://ftp.ietf.org/rfc/rfc2141.txt

Received on Friday, 5 January 2007 16:40:15 UTC