[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: print "<DIV ..."
- From: Simon Burr <nospam@thanx>
- Date: Thu, 15 Jul 1999 10:32:13 +0100 (BST)
Rainer Jung said
>I just tried a thing like
><: print "<DIV align=\"right\">"; :>
>It seems that div has already a meaning (Sorry, i am not very concerned with
>WML). The output is then:
I've come across this one before. AFAICT the problem is that meta-HTML (ie
pass 2) does work on DIV tags and does things like put quotes around the
DIV options if they don't already exist.
When working with WML you have to remember that each pass sees the *entire*
file, thus meta-HTML gets the above and sees that the DIV doesn't have the
quotes around the align option (you've escaped them after all), thus it puts
quotes in for you.
The following shows this quite well:
% echo '<: print "<div align=\"right\">"; :>' | /usr/local/lib/wml/exec/wml_p2_mhc
<: print "<DIV align=""right"">"; :>
%
Note the capitialisation of the div tag name as well.
You're solution works as meta-HTML no longer sees the <div ...> tag. The
solution is to use the <verbatim>...</verbatim> tags to get meta-HTML to
leave the ePerl alone. Thus I'll quite often use code like:
<perl><verbatim>
# Perl goes here :)
</verbatim></perl>
Thus:
% cat > t <<EOF
> <perl>
> <verbatim>
> print "<DIV align=\"right\">";
> </verbatim>
> </perl>
> EOF
% /usr/local/lib/wml/exec/wml_p2_mhc t
<perl>
print "<DIV align=\"right\">";
</perl>
%
HTH.
--
Simon the stressed http://www.bpfh.net/ simes@bpfh.net
"So, I'm in the UK, but not a part of a UK group; my boss is in
France and his boss is just up the corridor ? Oh joys"
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com