Hello everybody.

I'm trying to set up a "page" macro that includes the <!DOCTYPE ...> in it, 
like this:

<metal:block xmlns:metal="http://xml.zope.org/namespaces/metal";
             metal:define-macro="page">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";
      xmlns:tal="http://xml.zope.org/namespaces/tal";>
...
</html>
</metal:block>

However, chameleon complains about the <!DOCTYPE ...> line:

  File 
"/home/elbixio/venv/lib/python2.5/site-packages/Chameleon-1.2.3-py2.5.egg/chameleon/zpt/language.py",
 line 351, in parse
    tree = super(Parser, self).parse(body)
  File 
"/home/elbixio/venv/lib/python2.5/site-packages/Chameleon-1.2.3-py2.5.egg/chameleon/core/etree.py",
 line 381, in parse
    tree, self.doctype = parse(body, parser, self.validate)
  File 
"/home/elbixio/venv/lib/python2.5/site-packages/Chameleon-1.2.3-py2.5.egg/chameleon/core/etree.py",
 line 98, in parse
    raise xml.parsers.expat.ExpatError(error_msg)
RuntimeError: Caught exception rendering template.
 - Filename:   /home/elbixio/viejo/viejo/templates/master.pt

ExpatError: not well-formed (invalid token): line 3, column 3
----------------------------------------

This way used to work when I used ZPT in Grok 1.0. Is it possible to include 
the <!DOCTYPE ...> in a macro using chameleon?

Thanks.

Douglas

"... allí­ es cuando te das cuenta que las cosas malas pueden resultar bastante 
buenas..." - Lionel Messi

Por favor, evite enviarme adjuntos de Word, Excel o PowerPoint.
Vea http://www.gnu.org/philosophy/no-word-attachments.es.html

_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to