[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

AW: [xsl] follow-up: relative URIs


Subject: AW: [xsl] follow-up: relative URIs
From: <christof.hoeke@xxxxxxx>
Date: Tue, 8 Jun 2004 15:39:22 +0200

ok, I understand and I think that will be the problem. 
to be honest i do not understand the Pyana transformation process fully as the documentation is quite weak and its a Xalan-C wrapper my C knowledge is zero. but i try to find out...

thanks
chris


this is probably not the right newsgroup to ask, but just to show how i did the transformation. until now i simply used

>>> import Pyana
>>> [...]
>>> Pyana.transform2String(xml, xsl, params)


there is the possibility to do the following

>>> import Pyana
>>> tf = Pyana.Transformer()
>>> [...]
>>> tf.transform2String(xml, xsl)

unfortunately a Transformer object only seem to have the following methods

>>> dir(tf)
['compileStylesheet', 'installExtension', 'installExtensionWithContext', 'parseSource', 'removeExtension', 'setEntityResolver', 'setErrorHandler', 'setProblemListener', 'setStylesheetParams', 'transform2DOM', 'transform2File', 'transform2String', 'transform2Writer']

so nothing similar to setSystemId.


> -----Ursprüngliche Nachricht-----
> Von: Michael Kay [mailto:mhk@xxxxxxxxx]
> Gesendet: Dienstag, 8. Juni 2004 14:34
> An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Betreff: RE: [xsl] follow-up: relative URIs
> 
> 
> One possibility is that the system doesn't actually know the 
> base URI of the
> stylesheet. This would be the case, for example, if the 
> calling application
> parsed it as a DOM and then passed it to the XSLT engine 
> without supplying a
> base URI, or if it was read into a string. In JAXP it's 
> important to call
> setSystemId() on the Source object.
> 
> That's why it's important to know how the transformation was invoked.
> 
> Michael Kay 
> 
> > -----Original Message-----
> > From: christof.hoeke@xxxxxxx [mailto:christof.hoeke@xxxxxxx] 
> > Sent: 08 June 2004 11:59
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject: AW: [xsl] follow-up: relative URIs
> > 
> > given the following:
> > 
> > path/
> > 	transformer.py
> > 	somepath/
> > 		imports.xsl
> > 		deeper/
> > 			imported.xsl
> > 
> > in imports.xsl I have <xsl:import 
> > href="deeper/imported.xsl"/> and it should work, does it not?
> > sorry about bothering you about this stuff, but thats what in 
> > e.g. Pyana does not seem to work. I have the above directory 
> > structure and need to put href="somepath/deeper/imported.xsl" 
> > to bring it to work, if run.py does the actual 
> > transformation. so the href is actually relative to the 
> > program that does the transformation...
> > 
> > maybe i am still missing something or does not understand 
> > what base URI actually means or maybe this is just how a 
> > specific processor works?
> > 
> > thanks
> > christof hoeke
> > 
> > 
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: Michael Kay [mailto:mhk@xxxxxxxxx]
> > > Gesendet: Dienstag, 8. Juni 2004 13:05
> > > An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > > Betreff: RE: [xsl] follow-up: relative URIs
> > > 
> > > 
> > > > 
> > > > is there any similar rule for xsl:import and xsl:include calls?
> > > > 
> > > 
> > > The rule there is much simpler: they are resolved relative to 
> > > the base URI
> > > of the stylesheet module.
> > > 
> > > Michael Kay
> > > 
> > > 
> > > 
> > > 
> > 
> --+------------------------------------------------------------------
> > > XSL-List info and archive:  
http://www.mulberrytech.com/xsl/xsl-list
> > To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> > or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> > --+--
> > 
> > 
> 
> --+------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
> 
> 



--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
--+--



Current Thread
Keywords