Tag names are converted to lower case in XML mode
Bug #572579 reported by
Fred Drake
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.pagetemplate |
Invalid
|
Undecided
|
Unassigned | ||
zope.tal |
Invalid
|
Undecided
|
Unassigned |
Bug Description
In XML mode, zope.tal converts tag and attribute names to lower case.
It should not.
To post a comment you must log in.
This gets to some pathos in the page template API. If we write new source for the template, and then set the content type, we get into a situation where the template won't get re-parsed, and the wrong parsing mode may be used.
Consider:
import zope.pagetempla te.pagetemplate
source = """\
<?xml version="1.0" encoding='UTF-8'?>
<xml>
<TEST aTTr="dfsfsf"/>
</xml>
"""
pt = zope.pagetempla te.pagetemplate .PageTemplate( ) write(source)
pt.
pt.content_type = 'text/xml'
If instead the content_type is set first:
pt.content_type = 'text/xml' write(source)
pt.
or the pt_edit() API is used:
pt. pt_edit( source, 'text/xml')
everything is updated correctly.