[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xml-dev] [Summary] Best Practice for URI construction?
- To: Pete Cordell <petexmldev@...>
- Subject: Re: [xml-dev] [Summary] Best Practice for URI construction?
- From: Richard Lainchbury <freexe@...>
- Date: Wed, 21 Dec 2005 16:16:56 +0000
- Cc: "Costello, Roger L." <costello@...>, XML Developers List <xml-dev@...>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WB9KGqSnsfrG+2rq1JnHWuVWowKdunOBGiBd2SVNnSv3HJ972qtz8TWV386kjH51OTAbEkZdyyOPTXg1gvrz1JvoKfqPS7hVA5IMNAu1cCAjAunG/dvj27WZFhDMvfYjleT+afdi72tKjruFoSOGgUcOBC5qromUpRQfFKnclR8=
- In-reply-to: <002701c60647$1c6fee20$b100a8c0@RW>
- References: <B8415163A689094689542C617ECA03665836EE@...> <002701c60647$1c6fee20$b100a8c0@RW>
I presume that it is a illegal uri, but my thoughts are that it should
be obvious enough not to be need.
http://www.example.com/country:US/state:MA/city:Boston
would be more correct.
[quote]
The protocol-identifier is a simple identifier that names a
URI-protocol handler. It is up to the named handler to interpret the
uri-body and return the value of the URI expression. The value of a
URI expression will usually depend on which protocol handler is named.
The URI body must begin with one of these characters:
a-z, A-Z, 0-9, any of ;/?@&+$-_.!~*'().%#\|
After the first character, the URI body consists of characters from
this set, plus "=" and ":".
[/quote]
not sure how upto date that is though
On 21/12/05, Pete Cordell <petexmldev@...> wrote:
> Just a thought...
>
> are there any merits in doing:
>
> http://www.location.org/country=US/state=MA/city=Boston
>
> This has the potential to provide more documentation to a human than:
>
> http://www.location.org/US/MA/Boston
>
> where the hierarchy may not be obvious.
>
> Naturally country=US is a single token rather than two tokens separated by
> an =. Does this make it mis-leading?
>
> Pete.
> ----- Original Message -----
> From: "Costello, Roger L." <costello@...>
> To: "XML Developers List" <xml-dev@...>
> Sent: Wednesday, December 21, 2005 2:01 PM
> Subject: [xml-dev] [Summary] Best Practice for URI construction?
>
>
> Hi Folks,
>
> Excellent discussions!
>
> I have carefully read all the messages. Below I have attempted to
> summarize what seem to be the conclusions of the group. If I have
> totally missed it, please let me know.
>
> Issue: When constructing a URL, should the "path form" be favored, or
> should the "query form" be favored?
>
> Here's an example of the path form of URL construction:
>
> http://www.location.org/US/MA/Boston
>
> Here's an example of the query form of URL construction:
>
> http://www.location.org?country=US&state=MA&city=Boston
>
> Best Practice: there is no definitive "best practice" mandating a
> certain form should always be be used when constructing a URL. Always
> consider the whole system when constructing a URL. That said, there
> are some general guidelines to follow when constructing URLs:
>
> 1. When hierarchy is intrinsic in the identification (naming) of a
> resource then favor the path form of URL construction.
>
> Example: Boston is within Massachusetts, which is within the USA.
> There exists a natural hierarchy in the identification (naming) of the
> Boston resource. Thus, the path form of URL should be favored, e.g.,
>
> http://www.location.org/US/MA/Boston
>
> This query form is less favorable:
>
> http://www.location.org?country=US&state=MA&city=Boston
>
> This hybrid form is also less favorable:
>
> http://www.location.org/US/MA?city=Boston
>
> 2. When there is no intrinsic hierarchy in the identification or naming
> of a resource then the query form is favored, e.g.,
>
> Boston may be identified by its latitude and longitude (42.358N,
> -71.06W). There is no intrinsic, natural hierarchy between latitude
> and longitude. So, when using the latitude and longitude to identify
> (name) the Boston resource then use the query form:
>
> http://www.location.org?latitude=42.358N&longitude=-71.06W
>
> Comments? /Roger
>
> --
> =============================================
> Pete Cordell
> Tech-Know-Ware Ltd
> for XML to C++ data binding visit
> http://www.tech-know-ware.com/lmx
> (or http://www.xml2cpp.com)
> =============================================
>
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
|