Ok, now you've jogged my memory: yes it does do substitution even in comments. I'm not sure if it's useful, but that allows you to "generate" comments. But go ahead and remove that behavior if you think that would be better without it.

Regards,
Chris

Upayavira wrote:

On 4 Jul 2003 at 11:53, Christopher Oliver wrote:



Can you explain what you mean in more detail? As far as I can tell
from your description, what you're trying to do should work.



Say I had this jxpath file:


<parameters xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";>
<from>${from}</from>
<to>${to}</to>
<status>${status}</status>
</parameters>


And this SendPage:
sendPage("page.html", {"from": from, "to" : to, "status": status} );

Then you decide you don't need status, so it becomes:

sendPage("page.html", {"from": from, "to" :to} );

And you change your jxpath to:
<parameters xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";>
<from>${from}</from>
<to>${to}</to>
<!-- <status>${status}</status>-->
</parameters>


You'll get an error, as it can't find $status. So it is still trying to do a replacement, even inside the XML comments. I'm wondering if this is the intentional behaviour.

Regards, Upayavira









Reply via email to