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


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to