cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Staub" <est...@mediaone.net>
Subject RE: URGENT: Bug/special case in document() function when Xalan is used in Cocoon
Date Tue, 01 Aug 2000 19:23:19 GMT
Berin,

Please refer to the original problem scenario from Jayme Edwards;
it describes using the second argument of a document() call to obtain the
base URI, per the XSLT spec.

I didn't mean to say that document() always fails under Cocoon.
However, it does fail in the above case.

-Ed Staub

-----Original Message-----
From: Berin Loritsch [mailto:bloritsch@infoplanning.com]
Sent: Tuesday, August 01, 2000 2:39 PM
To: cocoon-dev@xml.apache.org
Subject: Re: URGENT: Bug/special case in document() function when Xalan
is used in Cocoon


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