While I work upon an example that illustrates my Cocoon/Saxon/XInclude
problem I'd like to pose the following questions.

What should the behaviour be when resolving an XInclude href in a
document that has no explicit base URI (xml:base)?

Location of the following 'including' document is
$TOMCAT_HOME/webapps/cocoon/xinclude/interface/config/example.xml

<example xmlns:xi="http://www.w3.org/2001/XInclude";>
  <statement>Now you see me,</statement>
  <xi:include href="../../content/resources/site/response.xml">
    <xi:fallback><response>now you don't!</response></xi:fallback>
  </xi:include>
</example>

Location of the following 'included' document is
$TOMCAT_HOME/webapps/cocoon/xinclude/content/resources/site/response.xml

<response>you do indeed!</response>

If the above 'example' document is processed as the source of a request
then the xi:include/@href is relative to the source document and should
be resolved accordingly by the Cocoon XInclude transformer.

But what if I generate a result tree within an XSLT transform that
embeds the 'example' document inside it and then passes this result tree
on to Cocoon's XInclude transformer (within the same pipeline):

<map:match pattern="**.xml">
  <map:generate type="request" src="{1}.xml"/>
  <map:transform src="system/transforms/request2Envelope.xsl"/> <!--
this transform embeds the request src in a new result tree -->
  <map:transform type="xinclude"/>
  <map:serialize type="xml"/>
</map:match>

In this case the document that is being processed (stream of sax events
if you want to be precise) has no real physical location as it is
generated by the XSLT transform. What is the base URI of the document
when Cocoon comes to resolve the xi:include/@href attribute?

Is it the webapp context - $TOMCAT_HOME/webapps/cocoon/xinclude?
Is it the Servlet context - $TOMCAT_HOME?



-- 
Regards

Philip Fennell

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