[Zope3-checkins] SVN: Zope3/trunk/src/zope/schema/interfaces.py
add a TODO: need better schema for ITokenizedTerm
Fred Drake
fdrake at gmail.com
Fri Oct 29 12:39:11 EDT 2004
On Fri, 29 Oct 2004 12:20:12 -0400, Stephan Richter
<stephan.richter at tufts.edu> wrote:
> yeah, ASCII, which is a field.
No, ASCII isn't right. Neither is BytesLine, which is about equally
applicable. ASCII doesn't constrain the field enough (it's
multi-line, multi-word), and BytesLine allows any byte other than LF
in the value.
I think we need a field that specifies a more restricted value type.
The type should be supportable as the "value" attribute of a form
<option> element, which is CDATA. Please read the CDATA discussion
here carefully:
http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-cdata
(The paragraph about <script> and <style> elements can be ignored, of
course, since CDATA content is a different thing from CDATA attribute
values.)
I think to be safe an IToken field type should require that whitespace
be normalized to space characters, and runs of whitespace should be
collapsed to a single space character. Leading and trailing spaces
should not be allowed, since UAs are allowed to drop that.
This is something on which we should err on the side of being
restrictive, not permissive.
-Fred
--
Fred L. Drake, Jr. <fdrake at gmail.com>
Zope Corporation
More information about the Zope3-Checkins
mailing list