|
LookaheadExample
An example of lookahead on execute statements
LookaheadLookahead allows rcor to reference a concordion variable before its definition. The definition must be in a tag nested inside the enclosing tag containing the reference. In rcor lookahead is only implemented for concordion:execute commands, and only looks ahead for nested concordion:set commands. The following example demonstrates how lookahead can be useful to interpret "unusual sentence structures". The html is copied verbatim from the java concordion tutorial. nested_element_lookahead.html<html xmlns:concordion="http://www.concordion.org/2007/concordion">
<body>
<p concordion:execute="#greeting = greetingFor(#firstName)">
The greeting "<span concordion:assertEquals="#greeting">Hello Bob!</span>"
should be given to user <span concordion:set="#firstName">Bob</span>
when he logs in.
</p>
</body>
</html>nested_element_lookahead_test.rbclass NestedElementLookaheadTest < ConcordionTestCase
def greetingFor(name)
"Hello #{name}!"
end
endCaveatsNote that this is not the preferred way to instrument tables. Table instrumentation is copied from headers into row elements. |
Sign in to add a comment
hello..
rcor yet..please give me some more examples to know about this..
With regards, Poornima.D