Fennell, Philip wrote:
> I was previously using Saxon 8.6 as the default XSLT processor and I
> make use of the XInclude transformer as follows:
> 
> Sitemap fragment
> ----------------
> 
> <map:match pattern="content/resources/site/*.html">
>   <map:generate type="request" src="content/resources/site/{1}.xml"/>
>   <map:transform src="system/transforms/request2Envelope.xsl"/>
>   <map:transform type="xinclude"/>
>   <map:transform src="interface/transforms/xhtml/screen.xsl"/>
>   <map:serialize type="xhtml"/>
> </map:match>
> 
> 
> Source fragment
> ---------------
> 
> <content id="login">
>   <xi:include href="../../content/resources/site/login.xml">
>     <xi:fallback>login.xml not included.</xi:fallback>
>   </xi:include>
> </content>
> 
> 
> Now in this example the xinclude's @href is resolved relative to the
> source documents location.

What do you mean by "source documents location"?  What is the source
document?  The src used by the generator?  The XSL?

> However, if I replace Saxon 8.6 with Saxon
> 8.7.1 (I don't know if the '.1' makes a difference) the @href gets
> resolved relative to the webapp context. Therefore, I need to use this
> source fragment instead:
> 
> <content id="login">
>   <xi:include href="content/resources/site/login.xml">
>     <xi:fallback>login.xml not included.</xi:fallback>
>   </xi:include>
> </content>
> 
> 
> Is there a reason for this change?
> 
> 
> I'm currently using Cocoon 2.1.8 configured to use Saxon as the default
> XSLT processor running under Tomcat 5 and Java 1.5.0_05.

My guess is that Saxon 8.6 was actually performing the XInclude
inclusions, not the xinclude transformer, since as far as I know the
transformer doesn't have a concept of "source document location" and
resolves relative paths from the sitemap context.  Perhaps something
changed with Saxon 8.7.x so that it no longer evaluates XIncludes, so
now you're seeing the transformer in action.

Perhaps you could handle both cases by using:
 <xi:include href="context:/content/resources/site/login.xml">

--Jason


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

Reply via email to