cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathaniel Alfred" <Alfred.Nathan...@swx.com>
Subject RE: sitemap match and path
Date Thu, 21 Jul 2005 12:44:56 GMT
The browser requests the absolute URL http://myserver/cocoon/xml/docA/gusto.css.
So you have to match pattern="**/gusto.css".
 
HTH, Alfred.
 
-----Original Message-----
From: Franco Andrao [mailto:franco.andrao@gruppo4.com]
Sent: Donnerstag, 21. Juli 2005 13:09
To: users@cocoon.apache.org
Subject: 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
 
 
This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your system. Please also immediately
destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the intended recipient.
The sender's company reserves the right to monitor all e-mail communications through their
networks. Any views expressed in this message are those of the individual sender, except where
the message states otherwise and the sender is authorised to state them to be the views of
the sender's company.

Mime
View raw message