Matt Sergeant wrote:
>
> First off, it's <tag %args>[$string]</tag> or <tag %args/> - the syntax is
> extremely strict and I'll come down on you like a ton of bricks if you
> don't stick to it :)
>
> A valid regexp for ascii and Latin-1 only XML parsing is:
>
> while ($contents =~ /([^<]*)<(\/)?([^>]+)>/) {
>
Thanks, that would have been bad to get wrong.
> Well, overall I think it's a bad idea. Sorry. I've just had (like 10
> minutes ago) this discussion on Perl-XML. I think that you shouldn't be
> extending a perfectly good system with this cruft - not only do you have to
> parse <% %> (easy) but now have to look out for all sorts of special tags?
>
> My personal preference would perhaps be a separate module that processed an
> XML based CFML type page - in that system you could implement this - go for
> your life, but I don't think it works particularly well as part of the
> design of ASP.
There would be no performance hit for current users, just
if someone defined some config like XMLSubs would this extra
compilation parsing be used.
Since compile time is is amortized over the running of the
pre-compiled scripts, it shouldn't be that big a hit for
those who wanted to use the feature, and should be as
fast to compile as any other embedded template language,
like HTML::Template or CFML.
>
> Hope I haven't put you off.
>
No, but your +++ would have made me more eager to get
busy on it.
> Also, I don't see the benefit between what you've proposed and:
>
> <%= msg($string) %>
>
<%=msg('hey')%>
<msg>hey</msg>
<%=msg('hey')%>
<msg>hey</msg>
hmmm... I like typing <msg>hey</msg> more, but that's just
me, a plain text old school HTML coder. Paul Linder made
the point that graphics designers don't like <%= x('y') %> constructs
because they feel like programming, which I think is the
same argument made for using HTML::Template.
> That seems far more logical to me.
>
> Keep the declarative stuff in declaritive languages and keep ASP procedural.
>
> If someone wants to see an interesting XML based little language written in
> about 200 lines of code give me a shout.
>
Why not evolve Apache::ASP? Even if you wouldn't use it, seems like
"There is more than one way to do it" is in keeping with the whole
perl ideology, and it makes sense to me to extend Apache::ASP over
time to be a better enabler, not just sticking to whatever platform
Microsoft proposed a few years ago. I have been trying to figure
out how XML makes sense in the context of Apache::ASP, and think
this would be good start.
Thanks for your feedback, and I appreciate your honest discourse.
-- Joshua
_________________________________________________________________
Joshua Chamas Chamas Enterprises Inc.
NodeWorks >> free web link monitoring Huntington Beach, CA USA
http://www.nodeworks.com 1-714-625-4051