[4suite] stylesheet include path

Uche Ogbuji uche.ogbuji at fourthought.com
Sat May 4 19:32:48 MDT 2002


The include paths code never made it through Mike's and Jeremy's latest
changes, for some reason.  I just got around to restoring it.  Let me
know if it works better now.  Thanks.

--Uche


On Thu, 2002-03-28 at 13:58, Sylvain Thenault wrote:
> On Thursday 28 March  17:38, Sylvain Thenault wrote:
> > I have a problem with the stylesheet processor include path. In narval
> > we use the following code:
> > 
> >         self.inputsourcefactory = InputSourceFactory()
> >         uri = 'file://%s/%s/' % (config.get_home(), 'transforms')
> > 	# notice we give a base uri in the include path
> >         self.processor = Processor(stylesheetIncPaths=[uri]) 
> > 	self._register_extensions()
> > 	xpath_lock.acquire()
> > 	try:
> > 	    self.processor.appendStylesheet(self.inputsourcefactory.fromString(
> > 	      self.as_xml(),
> > 	      'narval:transform:%s'%self.eid))#uri+'/'+self.name))#
> > 	except XsltException, e:
> > 	    import traceback
> > 	    traceback.print_exc()
> > 	    raise e
> > 
> > and it gives me the exception
> > 
> >   File "/home/alf/lib/python/narval/core/delegates.py", line 221, in
> >   _execute
> >   File "/home/alf/lib/python/narval/core/delegates.py", line 418, in
> >   _execute_target
> >   File "/home/syt/cvs_work/logilab/Narval/narval/core/ALAbstraction.py",
> >    line 176, in transform
> >   self._mk_processor()
> >   File "/home/syt/cvs_work/logilab/Narval/narval/core/ALAbstraction.py",
> >    line 205, in _mk_processor
> >   raise e
> > XsltException: Unable to open imported or included stylesheet 
> > 	"Selftest/test026-trf2b.xslt", using base URI
> > 	"narval:transform:6", or all base URIs in the include PATH
> 
> maybe is it good to precise that there is an <xsl:include> element in
> the original stylesheet
> 
> > there is a transform "Selftest/test026-trf2b.xslt" in the directory
> > pointed by the uri variable.
> > It works correctly if we give the url of the file instead of an uri to
> > the InputSource constructor. Is this really required ?
> 
> -- 
> Sylvain Thnault 
> _______________________________________________
> 4suite mailing list
> 4suite at lists.fourthought.com
> http://lists.fourthought.com/mailman/listinfo/4suite
-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Track chair, XML/Web Services One (San Jose, Boston):
http://www.xmlconference.com/
DAML Reference - http://www.xml.com/pub/a/2002/05/01/damlref.html
RDF Query using Versa -
http://www-106.ibm.com/developerworks/xml/library/x-think10/index.html
XML, The Model Driven Architecture, and RDF @ XML Europe -
http://www.xmleurope.com/2002/kttrack.asp#themodel




More information about the 4suite mailing list