[Zope-dev] Help! Why is my XML content being munged by <dtml-var>?
hnorris norris
hnorrisalt@yahoo.com
Mon, 3 Dec 2001 13:01:22 -0800 (PST)
(using friend's email, please reply to
cstrong@arielpartners.com )
I am noticing the following behavior:
I have created lots of content in XML using my own
personal DTD.
Certain of my XML tags happen to be the same as XHTML
tags, except that they are upper case--
for example, <Title></Title> and <P></P>.
When I refer to my XML content (contained in a
DTMLDocument or some such) using dtml-var,
The tags that look like HTML tags are lowercased!
Even worse, ONLY the closing tags are
lowercased. Needless to say, this drives my
validating parser crazy :-{
It seems Zope is too clever by half: parsing the tags,
looking for "HTML" tags, and lowercasing them.
I saw some parsing code in DocumentTemplate/DT_HTML.py
Is this where it is happening?
How can I turn this off?
Or, must I use a namespace prefix like
<ariel:P></ariel:P>
Or not use any tags in XML that look like XHTML
<Para></Para>
Does anyone have advice for me? Please help!
TIA,
--Craeg
BTW, Here is my XML code:
<?xml version="1.0"?>
<!DOCTYPE Document
PUBLIC "-//ArielPartners//DTD XML Block V1.0//EN"
"http://www.arielpartners.com/dtd/block.dtd">
<Document>
<MetaData>
<Author>
<PersonName firstName="Brad" lastName="Stern"/>
<Affiliation>Ariel Partners</Affiliation>
</Author>
<Title>Products</Title>
<Date m="11" d="21" y="2001"/>
<Comment>
This is a blurb for xyz
</Comment>
</MetaData>
<Block>
<P>
this is a block of text. blah blah blah.
</P>
</Block>
</Document>
This is stored in my own product, or a DTMLDocument
(same behavior either way) called foo.
Anyway, when I refer to this via <dtml-var foo>, I get
the following:
<?xml version="1.0"?>
<!DOCTYPE Document
PUBLIC "-//ArielPartners//DTD XML Block V1.0//EN"
"http://www.arielpartners.com/dtd/block.dtd">
<Document>
<MetaData>
<Author>
<PersonName firstName="Brad" lastName="Stern"/>
<Affiliation>Ariel Partners</Affiliation>
</Author>
<Title>Products</title> <--- munged
<Date m="11" d="21" y="2001"/>
<Comment>
This is a blurb for xyz
</Comment>
</MetaData>
<Block>
<P>
this is a block of text. blah blah blah.
</p> <--- munged
</Block>
</Document>
__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com