Hi,
yes, of course there is hope :-)
>
> Here's what I'd like to be able to do, making up some syntax on the
> fly. (Including a new kind of sub declaration, but you get the idea.)
>
> <a href="/index.html" eplsub=pagelink>Home</a>
>
> [$ sub pagelink($tagname, $tagarray, $taghash, $tagstring,
> $content, $endtag) $]
>....
Here is what can be done at the moment. Look if/how this fits to your idea,
then we can see how can evolve it to do the right thing.
You can define a syntax module that is derived from Embperl::Syntax::HTML,
this would could contain something like
sub new
{
my $class = shift ;
my $self = Embperl::Syntax::HTML::new ($class) ;
if (!$self -> {-xxxInit})
{
$self -> {-xxxInit} = 1 ;
Init ($self) ;
}
return $self ;
}
sub Init
{
my ($self) = @_ ;
$self -> AddTagBlock ('a', ['eplsub'], ['href'], undef,
removenode => 42,
perlcode => {},
perlcodeend => q{
{
my $txt = XML::Embperl::DOM::Node::iChildsText (%$n%) ;
# here $txt contains the text between <a> and </a>
my $href = %&'href% ;
# here we have href
# here we could modify the result by calling subs in
XML::Embperl::DOM::....
}) ;
}
},
}) ;
}
This is of course not exactly what you want, but I think (at least hope) we
can extent it in the way so it fit's your needs
Gerald
-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting
Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice: +49 6133 925131
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]