[xsl] XInclude in Cocoon

Subject: [xsl] XInclude in Cocoon
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 6 Feb 2001 16:05:40 +0000
Hi Dylan,

>>No doubt eventually you'll be able to use XInclude (see
>>http://www.w3.org/TR/xinclude) or perhaps even XLink instead but I
>>don't think that any of the XSLT processors/XML parsers support this
>>at the moment.
>
> The Cocoon framework has XInclude.

Excellent :) Can you explain how to use it? I couldn't find anything
about it anywhere immediately obvious in the documentation. Plus I'm
running Cocoon 1.8 and I get nowhere with either:

----
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:x="http://www.w3.org/1999/XML/xinclude";
                extension-element-prefixes="x">

<xsl:template match="/">
   <html>
      <head>
         <title>Test</title>
         <style><x:include href="test.css" parse="text" /></style>
      </head>
      <body>
         <h1>Test</h1>
      </body>
   </html>
</xsl:template>

</xsl:stylesheet>
----

(the x:include is just ignored) or:

----
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                xmlns:x="http://www.w3.org/1999/XML/xinclude";>

<xsl:template match="/">
   <html>
      <head>
         <title>Test</title>
         <style><x:include href="test.css" parse="text" /></style>
      </head>
      <body>
         <h1>Test</h1>
      </body>
   </html>
</xsl:template>

</xsl:stylesheet>
----

(the x:include is outputted into the HTML).

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread