cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Koberg <...@koberg.com>
Subject multiple XSLTs for the same XML
Date Thu, 23 May 2002 21:00:11 GMT
Hi,

I am having trouble converting a set of XSLTs I have which use 
xsl:include. I want to use a standard cocoon way but i am not finding 
it. I have looked through the docs and searched with google through 
several mailing list threads. From what i can see i have to perform 
multiple transformations in a row all the while using the new result. Is 
there an easier way to combine the stylesheets so they seem like one? 
 Here is an example of what I am trying to discuss:

What is the best way to set up some thing like the following?
<xsl:include href="head.xsl"/>
<xsl:include href="banner.xsl"/>
<xsl:include href="nav.xsl"/>
<xsl:include href="footer.xsl"/>

<!-- the main source document is necessary for head, banner and the 
apply-templates in the second column of the table (index.xml) -->
<!-- I can swap out this XSLT with one that has one or three columns or 
a different structure, while still reusing the common XSLT -->
<xsl:template match="/">
   <html>
      <xsl:call-template name="head"/>
      <body>
       
         <xsl:call-template name="banner"/>
        <table>
           <tr>
               <td>
<!-- the nav's content comes from a separate file (book.xml) -->
                    <xsl:call-template name="nav"/>
               </td>
           </tr>
           <tr>
               <td>
                    <xslapply-templates/>
               </td>
           </tr>
         </table>
         <xsl:call-template name="footer"/>

      </body>
   </html>
</xsl:template>

Thanks for any help,
-Rob


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.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