You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Franco Andrao <fr...@gruppo4.com> on 2005/07/21 13:08:36 UTC

sitemap match and path

Hi,
I'm trying to simplify my sitemap but something is wrong!!
the directory structure that I have is like this
mdg
       |__xml_
       |         |__docA_
       |         |           | xml files
       |         |__docB_
       |         |           | xml files
       |__stylesheets_
       |                 | xslt files
       |__css_
       |         | css files
...

In the sitemap I have this maches:

     <map:match pattern="gusto.css">
         <map:read src="css/gusto.css" mime-type="text/css"/>
     </map:match>

     <map:match pattern="banner">
         <map:generate src="xml/banner.xml"/>
         <map:transform src="stylesheets/banner.xsl"/>
         <map:serialize/>
     </map:match>

     <map:match pattern="menu/*">
         <map:generate src="xml/menuindex.xml"/>
         <map:transform src="stylesheets/menu.xsl"/>
         <map:serialize/>
     </map:match>

     <map:match pattern="home">
         <map:generate src="xml/home.xml"/>
         <map:transform src="context://mdg/stylesheets/page.xsl"/>
         <map:serialize/>
     </map:match>

....

     <map:match pattern="*/docA/*">
         <map:aggregate element="index">
           <map:part src="cocoon:/banner" element="banners"/>
           <map:part src="cocoon:/menu/{1}" element="sx"/>
           <map:part src="cocoon:/home" element="chiSiamo"/>
         </map:aggregate>
         <map:transform src="stylesheets/index.xsl" />
         <map:serialize/>
     </map:match>

Processing the URI  http://myserver/cocoon/xml/docA/page i retreive  
the content of the xml but not the css style that is defined in  
index.xsl:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/ 
Transform"
                               xmlns:sql="http://apache.org/cocoon/ 
SQL/2.0">

     <xsl:template match="index">
         <html>
          <head>
           <meta http-equiv="content-type" content="text/ 
html;charset=iso-8859-1"/>
           <title>I Maestri del Gusto</title>
           <link rel="stylesheet" href="gusto.css" type="text/css"/>
          </head>
             <body>
            <div class="mainbox">
         <div class="contentbox">
          <xsl:apply-templates select="banners"/>
          <xsl:apply-templates select="chiSiamo"/>
         </div>
         <div class="leftbox">
          <xsl:apply-templates select="sx"/>
         </div>
        </div>

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

     <xsl:template match="@*|*|node()" priority="-1">
         <xsl:copy>
             <xsl:apply-templates select="@*|*|node()"/>
         </xsl:copy>
     </xsl:template>

</xsl:stylesheet>

Thanks in advance for any help
cheers

:-)Franco Andrao
franco.andrao@gruppo4.com