You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Klaus Drechsler <dr...@gmx.net> on 2001/01/02 19:42:03 UTC

Sitmap question

Hi,

what does {1} stands for?

For example:

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

Bye,
  Klaus

--------------------------------------
Farewell! I will omit no opportunity
That may convey my greetings, love, to thee.
Romeo&Juliet
                         (Act III, Scene V)
--------------------------------------
PGP-Key: http://www.kdnet.de/pgp


Re: Sitmap question

Posted by Giacomo Pati <gi...@apache.org>.
Klaus Drechsler wrote:
> 
> Hi,
> 
> what does {1} stands for?
> 
> For example:
> 
> <map:generate src="docs/samples/sql/{1}.xml"/>

It stands for what the parent matcher has matched, ie:

  <map:match pattern="myuri/*">
    <map:generate src="docs/samples/sql/{1}.xml"/>
  </map:match>

If the requested URI is "myuri/welcome" the {1} would stand for
"welcome" and the generate will get a src attribute with a value of
"docs/samples/sql/welcome.xml"

Giacomo

Re: Sitmap question

Posted by Paul Russell <pa...@luminas.co.uk>.
* Klaus Drechsler (drechsler@gmx.net) wrote :
> Hi,
> what does {1} stands for?
> For example:
> <map:generate src="docs/samples/sql/{1}.xml"/>

The {1} is replaced with the value matched in the surrounding
matcher(s). For example:

<map:match pattern="/foo/*">
	<map:generate src="docs/foo-doc/{1}.xml"/>
	<map:transform src="default.xsl"/>
	<map:serialize/>
</map:match>

with a request for '/foo/bar' would generate from the file
'docs/foo-doc/bar.xml'. Does this help?


Paul

-- 
Paul Russell                                 Email:   paul@luminas.co.uk
Technical Director                             Tel:  +44 (0)20 8553 6622
Luminas Internet Applications                  Fax:  +44 (0)870 28 47489
This is not an official statement or order.    Web:    www.luminas.co.uk