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

Re: Calabash: Java API

From: David A. Lee <dlee@calldei.com>
Date: Thu, 23 Jul 2009 08:26:31 -0400
Message-ID: <4A6856F7.4010007@calldei.com>
To: Florent Georges <fgeorges@gmail.com>
CC: Toman_Vojtech@emc.com, xproc-dev@w3.org
I belive the reason for this is because that document might not come 
from the filesystem.
This tripped me up bigtime originally when implementing the Test driver 
(in xmlsh).
For example, an entire test might come from the web at say 
http://test.foo.com/test1.xml
Then inside that test is a reference to "testpipe.xml" (the xproc source).
test1.xml opens testpipe.xml using the base URI of 
http://test.foo.com/test1.xml  which resolves to 
http://test.foo.com/testpipe.xml
If this was instead relative to the current directory then it wouldnt 
find "testpipe.xml" at all.
While this is a tad tedious to implmenet, I belive it is correct and 
very useful.
When done consistantly and end-to-end through both calabash AND any code 
calling it (say the test drivers or your own code),
all relative paths work right.   
xmlsh has a similar problem/solution.   Different threads in xmlsh have 
their own "current directory" but java doesnt support per-thread pwd's,
so if calabash had resolved all relative URI's to the process-global PWD 
it would  break given any relative paths.

So I think this is the correct way to go both from an XML perspective 
and from a Java perspective.


> and that's a good thing I think.
>
>   I noticed that when you use a Source with a system ID as input
> for a port, when it is relative it is resolved using the pipeline
> document system ID as base URI.  Not sure this the best choice.
> Why do not use the current directory instead (as it is done for
> the pipeline document's Source itself?)
>
>   Regards,
>
>   
Received on Thursday, 23 July 2009 12:27:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 23 July 2009 12:27:18 GMT