[XML-SIG] Re: [4suite] (no subject)
Alexandre
Alexandre.Fayolle@logilab.fr
Tue, 27 Aug 2002 18:04:58 +0200
On Tue, Aug 27, 2002 at 05:30:15PM +0200, Tommy Sundström wrote:
> Newbie question.
Hi, this is not the right mailing list. You should ask questions about
pyxml on the xml-sig mailing list (cc'ed to this answer)
> Running this code:
>
> ---
> import xml.dom.ext.reader.Sax2
> from xml.dom.ext import PrettyPrint
>
> str = '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <h3><a href='page.htm'>Text</a></h3>'''
>
> doc = xml.dom.ext.reader.Sax2.FromXml(str)
> PrettyPrint(doc.documentElement)
> ---
>
> gives this result:
> ---
> <h3><a href='page.htm' shape='rect'>Text</a></h3>
> ---
This is perfectly normal
> My question: where does the "shape='rect'" comes from (It's not added
> unless the DOCTYPE element is there.)
It comes from the DTD. Download it from the url in the doctype and see
for yourself that the <a> element has a shape attribute with a default
value of 'rect'.
> Can it do any harm? Is there any way of surpressing it?
Not that I know of, but the gurus on xml-sig may.
Alexandre Fayolle
--
LOGILAB, Paris (France).
http://www.logilab.com http://www.logilab.fr http://www.logilab.org
Narval, the first software agent available as free software (GPL).