Tk Library Source Code

View Ticket
Login
Ticket UUID: 470211
Title: urn: scheme handling for uri module
Type: Patch Version: None
Submitter: patthoyts Created on: 2001-10-11 12:58:48
Subsystem: uri Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2001-10-23 10:46:48
Resolution: Accepted Closed By: andreas_kupries
    Closed on: 2001-10-23 03:46:48
Description:
This is a package to extend the uri module of tcllib to
handle the urn: scheme.

package require uri::urn
uri::split urn:uddi-org:app
etc.
User Comments: andreas_kupries added on 2001-10-23 10:46:48:
Logged In: YES 
user_id=75003

New code added to head. Also base module rewritten to make
addition of future sub-packages easier. See new exported
command "uri::register". New code rewritten to use
"uri::register".

patthoyts added on 2001-10-15 23:01:47:

File Added - 11987: urn-scheme.tcl

patthoyts added on 2001-10-15 21:24:38:

File Added - 11986: urn.test

Logged In: YES 
user_id=202636

OK Here is a test suite as per the RFC (I hope). I noticed
that some of the tests fail my original code so I'm
uploading a new version of the urn extension so that you can
examine the differences.

The quote/unquote code just implements the quoting rules
described in the RFC. How relevant this might be to other
URL schemes I am not sure but I imagine the only differences
are in the characters that are required to be quoted or not
quoted.

andreas_kupries added on 2001-10-13 06:19:51:
Logged In: YES 
user_id=75003

I made small change to your code to make it work correctly. 
I moved the uri code to compute schemePattern and various 
maps into a procedure and have your code call that 
procedure so that this information in the overall package 
stays uptodate.

Future: Introduce an official command to register new 
schemas and have that command recompute this information. 
This would also allow us to move the various predefined 
schemas into their own files and thus make the central 
package lighter.

andreas_kupries added on 2001-10-13 06:08:30:
Logged In: YES 
user_id=75003

I have integrated the new code into the uri module.
I would like to extend the testsuite as well, but
lack examples I could use to so.

Are the qoute, unqote commands URN specific or
could they be used to un/quote ftp/http/file urls
as well ?

If not, what about a generic un/quote command
which dispatches to to schema-specific routines
(like we already do for split/join) ?

andreas_kupries added on 2001-10-13 05:57:36:
Logged In: YES 
user_id=75003

I have started the integration into the uri module.

Currently I miss examples I could use to extend the
testsuite.

patthoyts added on 2001-10-11 19:58:56:

File Added - 11850: urn-scheme.tcl

Attachments: