cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 20308] - Stylesheet includes not working with XSLTC
Date Wed, 04 Jun 2003 15:12:05 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20308>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20308

Stylesheet includes not working with XSLTC





------- Additional Comments From cummingscs@netscape.net  2003-06-04 15:12 -------
My test case seems to demonstrate that you can in fact have a very basic include
from the stylesheet off of the sitemap, but that the included stylesheet
including a third or more stylesheets is what causes the problem. Here is a
simple test case.

The sitemap fragment:

      <map:match pattern="test-include">
        <map:generate src="test/test-include.xml"/>
        <map:transform type="xslt" src="test/test-include.xsl"/>
        <map:serialize/>
      </map:match>

test/test-include.xml:

<?xml version="1.0"?>
<page>
  <message>Hello, world!</message>
  <notice>This is a &lt;notice/&gt;</notice>
</page>


test/test-include.xsl:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="html"/>
  <xsl:include href="the-include.xsl"/>
  <xsl:template match="page">
    <html>
      <body>
        <xsl:apply-templates/>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>

test/the-include.xsl:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:include href="the-other-include.xsl"/>
  <xsl:template match="message">
    <b><xsl:value-of select="text()"/></b>
  </xsl:template>
</xsl:stylesheet>

When the above stylesheet doesn't have its own include, as above, the pipeline
works fine. With this include, the error message is Unable to create templates
for stylesheet: file:/path/to/test/test-include.xsl. The full details of the
error are just like what is described in
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=105467465417098&w=2. The
following is the final included stylesheet.

test/the-other-include.xsl:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="notice">
    <font color="blue"><xsl:value-of select="text()"/></font>
  </xsl:template>
</xsl:stylesheet>

Mime
View raw message