cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Sexton <jsex...@odshp.com>
Subject Confused about xsl:include
Date Thu, 12 Dec 2002 18:12:05 GMT

This should be simple, but I'm not able to make it work.

Here's an xsl file, working fine:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="Now">
    <b>Date/Time:</b><xsl:apply-templates/>
  </xsl:template>

  ... More templates ...

</xsl:stylesheet>

So what I do is take the "Now" template and put it in a separate file
called "other.xsl" and add an include like this:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:include href="stylesheets/other.xsl"/>

  ... More templates ...

</xsl:stylesheet>

Here's other.xsl:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="Now">
    <b>Date/Time:</b><xsl:apply-templates/>
  </xsl:template>

</xsl:stylesheet>

I know it's finding the other.xsl file because I get an exception if I use
an incorrect href.  However, when using an include cocoon no longer
applies the "Now" template.  This must be simple.  What am I doing wrong?
Thanks for any and all tips!




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

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message