W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > January 2007

Can a URN-schemed URI have a query component?

From: Grosso, Paul <pgrosso@ptc.com>
Date: Fri, 5 Jan 2007 11:39:40 -0500
Message-ID: <CF83BAA719FD2C439D25CBB1C9D1D30205DEAF9F@HQ-MAIL4.ptcnet.ptc.com>
To: <public-xml-core-wg@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:35 GMT