0

I have a Pyramid app that uses Chameleon. I need to declare some attributes in my DOCTYPE, like so:

<!DOCTYPE public html .........
[
    <!ATTLIST tag attributes CDATA #IMPLIED>
]>

When I add this to my template, id doesn't get rendered properly and my browser draws "]>".
When I remove the ATTLIST and only do <!DOCTYPE public html .........>, everything works.

How can I tell Chameleon to not parse the ATTLIST section and copy it as is?

agf
  • 171,228
  • 44
  • 289
  • 238
Aviv
  • 75
  • 7

1 Answers1

2

That has absolutely nothing to do with Chameleon. If I paste that code into a file and open it in my browser, I see ]> as well.

Edit: I figured it out. Rename the file to .xhtml and it will work (at least for me).

If you're receiving it over the network, having the content-type set to application/xhtml+xml would work the same way.

agf
  • 171,228
  • 44
  • 289
  • 238
  • Thanks, but what about this: http://stackoverflow.com/questions/1735230/can-i-add-custom-attribute-to-html-tag supposedly, this should be possible.. is it possible to add to an existing doctype? I don't want to create a custom one all together.. – Aviv Aug 11 '11 at 21:56
  • thanks! the correct content type that solved the problem is "application/xhtml+xml" (not "text/html") – Aviv Aug 11 '11 at 22:34