On 2025-04-15 11:46 Hussein Shafie wrote:
On 2025-04-06 22:20, Leif Halvard Silli wrote:
... snip ...
But this week, I noticed that even when I open old documents, extra
namespace declarations are added, like so:
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:xxe="http://www.xmlmind.com/xmleditor/namespace/extension"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:ns="http://www.w3.org/1999/xhtml"
xmlns:mml="http://www.w3.org/1998/Math/MathML">
I managed to reproduce this behavior by setting <saveOptions>
favorInteroperability attribute to "false" in
XXE_INSTALL_DIR/addon/config/xhtml/xhtml_common.incl
By default, this save option is "true":
---
<cfg:saveOptions favorInteroperability="true" omitXMLDeclaration="auto"
cdataSectionElements="html:script html:style" />
---
See
https://www.xmlmind.com/xmleditor/_distrib/doc/configure/saveOptions.html
Aha. I can confirm that the «Override settings specified in config.
files» setting was enabled.
And I can also confirm that when I disable the same setting, then the
superfluous namespace declarations do not apapper.
It is good to know that it was enablement of this setting that caused
this.
Another way to reproduce this behavior with XHTML documents is to set
Java system property XXE_PREDECLARE_NAMESPACE_PREFIXES to any value,
e.g. -DXXE_PREDECLARE_NAMESPACE_PREFIXES=1
See "XXE_PREDECLARE_NAMESPACE_PREFIXES" in
https://www.xmlmind.com/xmleditor/_distrib/doc/help/system_properties.html
We'll see if we can improve this in version 10.12 not only for XHTML5
documents but also for all the document types, that is, never have
namespace prefixes which are predeclared "just in case".
Great!
It's too late to change this in forthcoming 10.11.
Understandable.
Leif Halvard Silli
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support