[Zope-Checkins] CVS: Zope3/lib/python/Zope/PageTemplate - TALES.py:1.3

Fred L. Drake, Jr. fdrake@acm.org
Fri, 14 Jun 2002 15:12:47 -0400


Guido asked:
 > An XML attribute name?

Stephan responded:
 > Definitely, since the XML standard says that everything in XML can contain 
 > unicode strings. (I think.)

Huh.  That depends on what you mean "everything in XML" and "unicode
strings".  ;-)

There is *nothing* in XML that can contain arbitrary Unicode
characters; there are many control characters which are simply illegal
in XML.

For those Unicode characters which legel, there are constraints on
which are valid where.  Encoding names used in the XML declaration
(the optional <?xml ...?> at the top of the file) must be convertible
to ASCII.  Element and attribute names are limited as well, but to a
large subset of Unicode, so they should be Unicode strings.  Character
data and attribute values should be Unicode strings as well.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation