Joshua Chamas wrote:
> 
> I think > is just about the only thing that you can't use as
> a character in the attributes for an XMLSubs and that's because
> it gets parsed with an aggressive ( or stupid ;) regexp like:
> 
>       $$data =~ s|\<\s*($self->{xml_subs_match})([^\>]*)/\>


Pity!
I would like to use XMLSubs to capture some HTML-output and do
postprocess them accoring to the attributes.

Eg. if $Response->{UserName} is "Joshua" then bold part of the page.
It could be done something like this:

<My:tag_it condition="$Response->{UserName} eq 'Joshua'"
    start_tag='<b>' end_tag='</b>'>
  ..some HTML here...
</My:tag_it>             [Stupid example, but I hope you get the idea]

OK the tags are out. I can handle that by making an XMLSub
for every tag-pair that I need, or whatever...
But it is a pian to have to say:

<% $svtwnbu=$Response->{UserName} eq 'Joshua', %>
<My:bold_it condition=$sbtwnbu>
   ...more HTML here...
</My:bold_it>

[Where $svtwnbu is some-variable-that-will-never-be-used elsewhere :-]

Not so neat.

Is there a simpler way of doing this?

---
Henrik Tougaard, FOA, Denmark.

Reply via email to