On Feb 26, 2005, at 2:05 PM, Leszek Gawron wrote:
Glen Ezkovich wrote:On Feb 26, 2005, at 7:18 AM, Sylvain Wallez wrote:<jx:withParam> is overly verbose, "p" is not verbose enough. How about "param". How are multiple parameters to be handled?
Another question: Do you think this syntax would be useful? <jx:call macro="${macroName}" p="bar"> <content b="${2+3}"/> </jx:call>
Do you mean the "p" param as attribute? Yes, it's useful, because IMO <jx:withParam> is just as overly verbose as XSLT, to which JXTG is supposed to provide a simpler replacement ;-)
thing is that every instruction is matched to a class. so you have:
<jx:macro name="something"> <!-- matched to StartDefine --> <jx:parameter name="param1" default="abc"/> <!-- matched to StartParameter --> ${param1} <jx:evalBody/> </jx:macro>
then when calling: <jx:call name="something"> <!-- matched to StartCall --> <jx:withParam name="param1" value="bcd"/> <!-- matched to StartParameterInstance --> <jx:withParam name="param2" value="edc"/> <body>here</body> </jx:call>
We cannot have two instructions bound to the same jx:param or we will again introduce dependencies in Parser.
I understand. I think I misunderstood the example. :-(
So <jx:call macro="${macroName}" p="foo" q="bar"> would be how multiple parameters would be handled. Makes perfect sense now.
Been reading to much code with single letter variable names lately. Driving me a bit nuts. 8-)
Glen Ezkovich HardBop Consulting glen at hard-bop.com
A Proverb for Paranoids:
"If they can get you asking the wrong questions, they don't have to worry about answers."
- Thomas Pynchon Gravity's Rainbow
