[xml] DOM modifying XML without permission



Hello list,

I'm not sure if this is the correct place to ask this question, please
feel free to redirect me if this is the case.

I've noticed that when using (libxml2) DomDocument::load(), the XML
loaded (simple docbook xml with DTD specified) does not match the XML
entered.

A specific example of this is the addition of 'float="0"' to
<figure>'s. <figure id="foobar"> is loaded, but <figure id="foobar"
frame="0"> is output with DomDocument::saveXml().

A quick look at the docbook spec,
http://www.docbook.org/tdg/en/html/figure.html, shows that frame="0"
is a default value. That's nice, but why does Dom feel the need to add
it to my XML? Can I disable it?

I'd turn off resolveExternals, but I need entities to be parsed.

Kind regards,
Aidan Lister



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]