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

RE: Calumet and relative URIs

From: <Toman_Vojtech@emc.com>
Date: Wed, 29 Jul 2009 02:16:57 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7871055EAAF@CORPUSMX10A.corp.emc.com>
To: <xproc-dev@w3.org>
Hi all,
 
As of version 1.0.9 (to be released soon), Calumet allows you to specify
(both through the command-line and the API) the base URI for resolving
relative pipeline/input/extension library URIs. Calumet also supports
the "classpath:" URI scheme by default, so if you set the base URI to
classpath:/something, you get the behavior you want.
 
In a J2EE environment, you would probably use the API, so you should be
able to do something like:
 
XProc xproc = XProcFactory.newXProc();
XProcConfiguration config = xproc.getXProcConfiguration();
config.setBaseURI("classpath:/resources/");
...
 
The default behavior in 1.0.9 is that if you don't specify any base URI,
Calumet will use cwd.
 
Regards,
Vojtech


________________________________

	From: David A. Lee [mailto:dlee@calldei.com] 
	Sent: Wednesday, July 29, 2009 1:57 AM
	To: Florent Georges
	Cc: Michael Sokolov; Toman, Vojtech; xproc-dev@w3.org
	Subject: Re: Calumet and relative URIs
	
	
	This makes good sense to me, it depends on the context.
	I could imagine a context where it should be relative to a DB
(say in eXists or ML).
	
	
	
	
	
	David A. Lee
	dlee@calldei.com  
	http://www.calldei.com
	http://www.xmlsh.org
	812-482-5224


	Florent Georges wrote: 

		2009/7/29 David A. Lee wrote:
		
		  

			I've done this before in custom code, and its a
great idea to
			be able to bundle "script data" (say xproc,
xquery, xslt) with
			the JAR files.  It was particularly useful when
I had an
			.xquery file that needed to load a module but
insisted on
			looking in the current directory instead of the
.jar file !
			ug.
			    

		
		  

			But should it be the "default"? That would add
yet more
			confusion, IMHO.
			    

		
		  Depends on the context IMHO.  That should be the
default in the
		Facade class aimed to be used in a Java EE environment,
and the
		current directory should be used in the Facade class
used by the
		command line frontend.
		
		  IMHO.  Regards,
		
		  
Received on Wednesday, 29 July 2009 06:32:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 29 July 2009 06:32:07 GMT