[Zope] Re: [Zope-dev] PROPOSAL: html_quote implicit in
entity-reference var tagsyntaxsyntax
Jim Fulton
jim@digicool.com
Thu, 26 Aug 1999 17:04:44 -0400
Jim Fulton wrote:
>
> Mauricio wrote:
> >
> > Evan Simpson wrote:
> > >
> > > Jim Fulton wrote:
> > >
> > > > I propose that:
> > > >
> > > > &dtml-name;
> > > >
> > > > should be equivalent to:
> > > >
> > > > <dtml-var name html_quote>
> > > >
> > > > Can anyone think of a case where you need the entity-reference
> > > > syntax and wouldn't want html_quote?
> > >
> > > I had entirely forgotten that syntax. The only time you would want your
> > > text unquoted (in HTML, anyway) is if you're constructing tags or parts
> > > of tags, in which case <dtml-var> should be a good substitute.
> > >
> > > With this change, I might actually *use* &dtml-name; instead of
> > > forgetting it.
> > Or, we can create a new sintax like:
> > &dtml-name#html_quote;
> > equivalent to:
> > <!--#var name html_quote-->
> >
> > this can be useful to others formations as:
> >
> > &dtml-name#lower;
> > &dtml-name#captalize;
> > etc...
> >
> > Is this insane or a good idea?
>
> I considered this, however, one of the goals of the entity-reference
> syntax was to conform to the SGML/HTML/XML syntax for entity references.
> I don't think that '#' is valid in an entity reference. Further, I don't
> think you could identify a delimiter character that is valid in an
> entity reference and that is not likely to occur in a name.
Actually, you can come up with a delimiter of you put it on the other
end, as in:
&dtml.lower-name;
&dtml.capitalize-name;
I will probably include this in Zope 2.1. This is *needed* for
URLs, as in:
<a href="&dtml.url_quote-name;">
When you use a dot, then you won't get html_quote unless you ask
for it. You'll also be able to combine things:
&dtml.lower.html_quote-name;
The default will be to use html_quote, so (in the
coming beta 6 release):
&dtml-name;
is equivalent to
<dtml-var name html_quote>
Jim
--
Jim Fulton mailto:jim@digicool.com Python Powered!
Technical Director (888) 344-4332 http://www.python.org
Digital Creations http://www.digicool.com http://www.zope.org
Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission. Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.