Hi,

Please try to use the just uploaded Embperl 2.3.0 and set output mode 1 
(xml). This should do the trick without the need of your custom syntax

Gerald


------------------------------------------------------------------------
Besuchen Sie unseren Messestand auf der SYSTEMS vom 23. - 26.10. in
München, Halle B3, Stand 425 www.ecos.de/messen-events/systems-2007.html
------------------------------------------------------------------------
Gerald Richter       ECOS electronic communication services GmbH
*******************  SECURING YOUR NETWORK  ********************

Post:       Tulpenstrasse 5            D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]            Voice:   +49 6133 939-122
WWW:        http://www.ecos.de         Fax:     +49 6133 939-333

Sitz der Gesellschaft: Dienheim; AG Mainz HRB 6889; GF: W.Heck,G.Richter
------------------------------------------------------------------------
 
  

> -----Original Message-----
> From: Villu Roogna [mailto:[EMAIL PROTECTED] 
> Sent: Friday, September 07, 2007 9:45 PM
> To: embperl@perl.apache.org
> Subject: Re: Problems customizing selected form elements output
> 
> Hi again,
> 
> Well I have partially achieved what I want. I took a good 
> look on the Embperl::Syntax::* code and documentation again 
> and figured out that I can do what I want by using _ep_sa 
> (XML::Embperl::DOM::Element::iSetAttribut in DOM.xs) function 
> instead of Embperl::Cmd::InputCheck.
> 
> In case anyone is interested I give here original and 
> replaced code from EmbperlHTML.pm  (actually I made a new 
> syntax to prevent overwriting core).
> 
> original: 
> 
> $self -> AddTag ('input', ['type', 'name', 'value'], ['src'], 
> ['checked'], 
>                 { 
>                 perlcode =>
>                     [ 
>                     'Embperl::Cmd::InputCheck (%$n%, 
> %&*\'name%, %&*\'value%, %&\'checked%) ;  %&=-type:radio|checkbox% ', 
>                     #'_ep_sa(%$n%, \'checked\', \'checked\') 
> if($fdat{%&*\'name%}); %&=-type:radio|checkbox% ',
>                     '$idat{%&*\'name%}=$fdat{%&*\'name%} ; 
> _ep_sa(%$n%, \'value\', exists 
> ($fdat{%&*\'name%})?$fdat{%&*\'name%}:\'\') ;   %&!-value%', 
>                     '$idat{%&*\'name%}=%&*\'value% ; ',
>                     ]
>                 }) ;
> 
> replaced:
> 
>  $self -> AddTag ('input', ['type', 'name', 'value', 
> 'checked'], ['src'], undef, 
>                 { 
>                 perlcode =>
>                     [ 
>                     #'Embperl::Cmd::InputCheck (%$n%, 
> %&*\'name%, %&*\'value%, %&\'checked%) ;  %&=-type:radio|checkbox% ', 
>                     '_ep_sa(%$n%, \'checked\', \'checked\') 
> if($fdat{%&*\'name%}); %&=-type:radio|checkbox% ',
>                     '$idat{%&*\'name%}=$fdat{%&*\'name%} ; 
> _ep_sa(%$n%, \'value\', exists 
> ($fdat{%&*\'name%})?$fdat{%&*\'name%}:\'\') ;   %&!-value%', 
>                     '$idat{%&*\'name%}=%&*\'value% ; ',
>                     ]
>                 }) ;
> 
> 
> 
> But now I have another problem.
> 
> When I write my html "xhtml" way (I need to do this because I 
> want to send embperl output to XSLT processor) then checked 
> or checked="checked" in replaced EmbperlHTML syntax is 
> inserted at the wrong place 
> 
> For example
> 
> <input type="checkbox"  name="c1" value="v1" />
> 
> now when I use %fdat magic to check the checkbox embperl generates:
> 
> old syntax:
> <input type="checkbox" name="c1" value="v1" / checked> my new 
> modified syntax:
> <input type="checkbox" name="c1" value="v1" / checked="checked">
> 
> but I need it to generate:
> 
> old syntax:
> <input type="checkbox" name="c1" value="v1" checked /> my new 
> modified syntax:
> <input type="checkbox" name="c1" value="v1" checked="checked" />
> 
> So the "checked" is inserted after slash "/", it should be 
> inserted before it.
> 
> What would I have to change  (Embperl::Syntax ?) or something 
> else to insert slash in correct place?
> 
> With kind regards,
> Villu
> 
> 
> 

** Virus checked by BB-5000 Mailfilter **

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to