cocoon-dev mailing list archives

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

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

If no 'base' (http://www.w3.org/TR/xmlbase/) 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
out.

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
stacktrace.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message