cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sliman Bouchareb" <sli...@gmx.de>
Subject newbie question with wildcard in sitemap
Date Tue, 01 Jul 2003 10:04:57 GMT
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



---------------------------------------------------------------------
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