W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2009

Re: Calumet and relative URIs

From: David A. Lee <dlee@calldei.com>
Date: Thu, 23 Jul 2009 10:10:21 -0400
Message-ID: <4A686F4D.4090104@calldei.com>
To: Toman_Vojtech@emc.com
CC: xproc-dev@w3.org
I agree your argument is better.
Especially in the light of a command line interface like

calumet -i source=../data/doc.xml http://foo/pipelines/pipeline.xpl

and the coresponding Java.

new Source("../data/doc.xml")

both "seem like they should" come from the filesystem.

Now there's always room for a "third way", that is from the command line 
allow a -baseuri used for resolution.
I do that in many xmlsh commands to allow "both ways" to be used so I'm 
always right :) (or always wrong ... :)


calumet -baseuri http://foo/pipelines -i source=../data/doc.xml pipeline.xpl

In the java code this would do the appropriate URI resolution against an 
explicit base.

David A. Lee

Toman_Vojtech@emc.com wrote:
> (I am changing the subject because to avoid confusion.)
>>   I would say the above description is not correct neither, for
>> the same reason (well, for a proper definition of "wrong.")  If I
>> see Source("../data/doc.xml") in my Java code, I would expect the
>> input to be read from my filesystem, not from an HTTP server...
> I think you may be right. It actually becomes even more confusing if you
> use the command-line interface:
> calumet -i source=../data/doc.xml http://foo/pipelines/pipeline.xpl
> In the command-line Calumet *does* resolve against the current working
> directory. That means that in this case, ../data/doc.xml will be
> resolved to something like /path/to/cwd/..data/doc.xml
> So now I tend to think the Java API should probably be consistent with
> this, if only just to reduce the confusion.
>>   Of course, if the pipeline definition itself contains such a
>> URI, that's another story...
> Then it automatically resolves against the base URI of the contianing
> element, which is the base URI of the pipeline in most cases. I think
> that in this case, the behavior is clear (and also what we want).
> Regards,
> Vojtech
Received on Thursday, 23 July 2009 14:11:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:16:48 UTC