You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Berin Loritsch <bl...@apache.org> on 2002/01/15 22:23:39 UTC

How do you include braces in an attribute?

I like the ability to do parameter substitution, but how do you pass a
value that does not expand the attribute?

For instance, I have an action that performs redirection to a specific
form.  I want to include the key in the URI, but do the expansion myself.
I have an action set like this:

   <map:action-set name="reports">
     <map:act type="catgroup" src=""/>
     <map:act type="report" action="Run Difference Report">
       <map:parameter name="report" value="store-0/section-{cdlid}/difference-report.pdf"/>
     </map:act>
     <map:act type="report" action="Run Compliance Report">
       <map:parameter name="report" value="section-{cdlid}/compliance.pdf"/>
     </map:act>
   </map:action-set>

The problem is that the "section-{cdlid}" portion of the URI is expanded
before the path is given to my action.  I want to perform the substitution
of {cdlid} myself in the action.  Do we have escape characters for the
braces?  Or do I have to choose a different marker to perform the substitution?


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: How do you include braces in an attribute?

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Berin Loritsch [mailto:bloritsch@apache.org]
> 
> I like the ability to do parameter substitution, but how do you pass a
> value that does not expand the attribute?
> 
> For instance, I have an action that performs redirection to a specific
> form.  I want to include the key in the URI, but do the expansion
myself.
> I have an action set like this:
> 
>    <map:action-set name="reports">
>      <map:act type="catgroup" src=""/>
>      <map:act type="report" action="Run Difference Report">
>        <map:parameter name="report"
value="store-0/section-{cdlid}/difference-
> report.pdf"/>
>      </map:act>
>      <map:act type="report" action="Run Compliance Report">
>        <map:parameter name="report"
value="section-{cdlid}/compliance.pdf"/>
>      </map:act>
>    </map:action-set>
> 
> The problem is that the "section-{cdlid}" portion of the URI is
expanded
> before the path is given to my action.  I want to perform the
substitution
> of {cdlid} myself in the action.  Do we have escape characters for the
> braces? 

IIRC, yes. Escaped string should look like "section-\{cdlid}" (check
XSLTFactoryLoader for details... I did not used this before)

Vadim

> Or do I have to choose a different marker to perform the
> substitution?



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org