Thanks Jeroen, works a treat!
>>> "Jeroen Reijn" <[EMAIL PROTECTED]> 2006/10/20 02:11 PM >>>
Hi Derek,
one of the nice features of resources is that you can call them with a
parameter:
So in your case:
<map:match pattern="docs/s*.htm">
<map:generate src="docs/{1}.xml"/>
<map:call resource="page2html">
<map:parameter name="url" value="{1}"/>
</map:call>
<map:serialize/>
</map:match>
<map:resource name="page2html">
<map:transform src="stylesheets/main.xsl">
<map:parameter name="use-request-parameters" value="true"/>
<map:parameter name="document" value="{url}"/>
</map:transform>
</map:resource>
Kind regards,
Jeroen Reijn
Hippo
-----Original Message-----
From: Derek Hohls [mailto:[EMAIL PROTECTED]
Posted At: Friday, October 20, 2006 2:04 PM
Posted To: Cocoon User List
Conversation: Accessing URI in a map:resource?
Subject: Accessing URI in a map:resource?
I have a case where I need access to the URI match used by
Cocoon for a map:resource pipeline.
i.e. a simple case might have:
<map:match pattern="docs/s*.htm">
<map:generate src="docs/{1}.xml"/>
<map:transform src="stylesheets/main.xsl">
<map:parameter name="use-request-parameters" value="true"/>
<map:parameter name="document" value="show-{1}"/>
</map:transform>
<map:serialize/>
</map:match>
which works just fine.
However, in some cases I need :
<map:match pattern="docs/s*.htm">
<map:generate src="docs/{1}.xml"/>
<map:call resource="page2html"/>
<map:serialize/>
</map:match>
BUt when I try:
<map:resource name="page2html">
<map:transform src="stylesheets/main.xsl">
<map:parameter name="use-request-parameters" value="true"/>
<map:parameter name="document" value="{1}"/>
</map:transform>
</map:resource>
then the value of {1} seems undefined?
How do I get to pass it to the map resource?
Thanks
Derek
--
This message is subject to the CSIR's copyright, terms and conditions
and
e-mail legal notice. Views expressed herein do not necessarily
represent the
views of the CSIR.
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html
For electronic copies of the CSIR Copyright, Terms and Conditions and
the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject
line to
[EMAIL PROTECTED]
This message has been scanned for viruses and dangerous content by
MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
[EMAIL PROTECTED]
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]