Graham wrote:

Proposals for a new XML namespace mechanism should be directed to an XML WG, surely?

You seem to think XML Namespaces have properties they don't possess. Besides, we're talking about attribute values.


If we must put up with this nonsense, I need to ask, is rel="http://www.iana.org/assignments/TBD/related"; a valid value? What about "../TBD/related"?

I would use your friendly neighborhood library, examples below.

I don't see the benefit of mapping them onto a default namespace, so if those 2 are valid then doing a mapping the relative URI onto a base and doing URI comparison is a waste of cycles.

I don't see why you would make a big stink about this. Pretty much everyone else has said this is a reasonable compromise, and the code for Shrook would be totally trivial.


---------------------------------
#import <Foundation/Foundation.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

    NSURL * baseURL = [NSURL
                 URLWithString:@"http://www.iana.org/assignments/TBD/";];

    NSLog([[NSURL
            URLWithString:@"alternate"
            relativeToURL:baseURL] absoluteString]);

    NSLog([[NSURL
            URLWithString:@"http://www.iana.org/assignments/TBD/related";
            relativeToURL:baseURL] absoluteString]);

    NSLog([[NSURL
            URLWithString:@"../TBD/alternate"
            relativeToURL:baseURL] absoluteString]);

    NSLog([[NSURL
            URLWithString:@"http://franklinmint.fm/foo";
            relativeToURL:baseURL] absoluteString]);

    NSLog([[NSURL
            URLWithString:@"../../assignments/TBD/alternate"
            relativeToURL:baseURL] absoluteString]);

    NSLog([[NSURL
            URLWithString:@"vemmi://franklinmint.fm/foo";
            relativeToURL:baseURL] absoluteString]);

    NSLog([[NSURL
            URLWithString:@".././.././assignments/TBD/alternate"
            relativeToURL:baseURL] absoluteString]);

    [pool release];
    return 0;
}

---------------------------------
Output:

[Session started at 2004-11-09 19:35:40 -0500.]
... 19:35:41.050 ... http://www.iana.org/assignments/TBD/alternate
... 19:35:41.051 ... http://www.iana.org/assignments/TBD/related
... 19:35:41.051 ... http://www.iana.org/assignments/TBD/alternate
... 19:35:41.052 ... http://franklinmint.fm/foo
... 19:35:41.052 ... http://www.iana.org/assignments/TBD/alternate
... 19:35:41.052 ... vemmi://franklinmint.fm/foo
... 19:35:41.052 ... http://www.iana.org/assignments/TBD/alternate

Executable “PaceFieldingLinks” has exited with status 0.

----------------------------------

If there's a bottleneck here, it's probably NSLog().

Robert Sayre







Reply via email to