You have a <map:act/> surrounding not only this <map:generate/>. This <map:act/> makes it necessary to use {../1}:

<map:generate src="docs/{../1}/home.xml" />

Regards,

Joerg

Sliman Bouchareb wrote:
hi cocooners,

i have the following directory structrue:

cocoon:|
         |protected-
                        |-docs -
                                  |-home
                                  |-fr
                                  |.....
                        |-stylsheets
                        |-descriptors
                        |-css

and the followinf sitemap:

<map:match pattern="do-login">
        <!-- first validate whether submitted values are ok -->
        <map:act type="form-validator">
          <map:parameter name="descriptor"
value="context://protected/descriptors/params.xml"/>
          <map:parameter name="validate" value="username"/>
          <!-- now try to log in -->
          <map:act type="db-authenticator">
            <map:parameter name="descriptor"
value="context://protected/descriptors/auth.xml"/>
            <!-- now go to protected area -->
            <map:redirect-to uri="home/home.section"/>
          </map:act>
        </map:act>
        <!-- something was wrong, try it again -->
        <map:redirect-to uri="error"/>
      </map:match>


* after a successfull login i call the uri home/home.section


and then i have the following match:


<map:match pattern="*/*.*"> <!-- first validate whether user has logged in --> <map:act type="session-validator"> <map:parameter name="descriptor" value="context://protected//descriptors/params.xml"/> <map:parameter name="validate" value="username,department_id,theme"/> <!-- generate protected content --> <!-- <map:generate type="serverpages" src="docs/protected.xsp"/> --> <!-- <map:transform src="stylesheets/{theme}-page2html.xsl"/> -->


<map:generate src="docs/home/home.xml"/> <map:transform src="stylesheets/page.xsl"> <map:parameter name="section" value="home"/> <map:parameter name="toc-file" value="../docs/toc.xml"/> <map:parameter name="base-url" value="/cocoon/protected"/> </map:transform>

        <map:transform src="stylesheets/menupage.xsl">
          <map:parameter name="section" value="home"/>
          <map:parameter name="request-url" value="home.section"/>
          <map:parameter name="toc-file" value="../docs/toc.xml"/>
          <map:parameter name="css-stylesheet" value="default.css"/>
          <map:parameter name="base-url" value="/cocoon/protected"/>
        </map:transform>
        <map:serialize/>
        </map:act>
        <!-- something was wrong, redirect to login page -->
        <map:redirect-to uri="login"/>
  </map:match>

* well this works fine, nut i want to substitute <map:generate
src="docs/home/home.xml" /> with <map:generate src="docs/{1}/home.xml" />
because i have many ressources, but this dont work :-(, why that ?


thanx

--


System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to