cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mitchell Christensen <>
Subject XInclude and base attribute
Date Thu, 03 Jan 2002 17:08:10 GMT

I'm not sure if this is a bug or feature, but if its a feature, it could
really use documenting.

If no 'base' ( attribute is specified within a
document to be processed by the XInclude transformer, the XInclude
transformer assumes that the href value within the <xi:include/> element is
a relative filename, and prepends the installation directory path ahead of
the href value.  Unfortunately, I was using a full URL to an XML document
(accessed via HTTP), and was getting a runtime exception.  The runtime
exception was happening because the XInclude transformer was turning
'http://myhost/mydoc' into
'/usr/local/tomcat/webapps/cocoon/http://myhost/mydoc'.  This resulted in a
silent runtime exception, with no diagnostics and a couple of days to figure

Setting the 'base' attribute in the parent element to 'http://myhost' and
then setting the <xi:include href="mydoc"/> fixed the problem, but there is
no mention of the base attribute requirement in the documentation.  I
beleive the XInclude transformer is very powerful (and necessary), and
worthy of further documentation.  Maybe just updating the examples to show
inclusion of a remote (HTTP based) document.

In retrospect, the lack of the xmlbase documentation was less of a problem
than the fact the Cocoon thew an obtuse runtime exception with a bogus

Mitch Christensen
Principal Architect
Redknife, Inc.
3095 Independence Dr.
Livermore, CA  94550

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message