cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@infoplanning.com>
Subject Re: URGENT: Bug/special case in document() function when Xalan is used in Cocoon
Date Tue, 01 Aug 2000 18:39:29 GMT
Ed Staub wrote:

> In order to support document(), Xalan needs the source URI to be associated
> with the document within the XMLParserLiaisonDefault, using code like that
> in Xalan's XSLTEngineImpl.setSourceDocument().
> 
> There probably should be a setSourceDocument() method on
> XMLParserLiaisonDefault.
> 
> XalanTransformer never sets the source URI, but it can't anyway because the
> URI is not accessible to it, either.  The Transformer interface might have
> to be modified to support this.
> 
> I'm still digging upstream into Cocoon, to try to come up with a suggested
> fix.
> -Ed

I have used relative URI's with Cocoon/Xalan with good success. For instance,

If I used the document("../menu.xml") function it always found what I am looking
for.  Anytime you use absolute path/URLs in a web context you are asking for
trouble, and in this case you have found it.

The only way around it if you want absolute paths (relative to the document
root) is to have Cocoon modify the requested URI.  When it is embedded in
XSL like that, it makes it impracticle because a file: URI always goes directly
to the filesystem--Cocoon has no interaction with it.

Mime
View raw message