David,

The <map:act> creates its own set of parameters, as a child of the <map:match>'s
set.

So you need to refer to your parameter as {../1}, like this:

<map:redirect-to uri="print/flyer/{../1}.pdf" />

with one exception: the <map:parameter> tag is not a part of the child, even
though it's contained within <map:act>, so in that case the parameter reference
needs to remain {1} :

<map:parameter name="id" value="{1}"/>

Hope this helps.

Jeff Jones
TWC Interactive



                                                                                       
                                     
                      "David Merrilees"                                                
                                     
                      <[EMAIL PROTECTED]        To:       <[EMAIL PROTECTED]>          
                               
                      enc.org.uk>               cc:                                    
                                     
                                                Subject:  Using wildcards within 
map:select                                 
                      09/01/2004 09:53                                                 
                                     
                      AM                                                               
                                     
                      Please respond to                                                
                                     
                      users                                                            
                                     
                                                                                       
                                     
                                                                                       
                                     




I've written an action to retrieve a value from a database and set it to
a sitemap parameter, then I'm performing a select based on the value of
the parameter.

I've found i'm unable to retrieve the value of the wildcard from the
map:match pattern attribute within the map:select collection; the {1}
token has no value (see code excerpt below).

Why is this? Is there any way around it?

Thanks

David Merrilees

<map:match pattern="*.xsp">
             <map:act type="printOption">
                         <map:parameter name="id" value="{1}"/>
                         <map:select type="parameter">
                                     <map:parameter name
="parameter-selector-test"
value="{printOption}"/>
                                     <map:when test="2">
                                                 <map:redirect-to
uri="print/flyer/{1}.pdf" />
                                     </map:when>
                                     <map:otherwise>
                                                 <map:generate src
="cocoon:/{1}.xml" />
                                                 <map:transform type="xslt"
src="xsl/fencPage2xhtml.xsl">
                                                             <map:parameter name
="id"
value="{1}"/>
                                                 </map:transform>
                                                 <map:serialize />
                                     </map:otherwise>
                         </map:select>
             </map:act>
</map:match>

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

Reply via email to