On 4/6/25 22:20, Leif Halvard Silli wrote:
I have a Web page where I update the HTML table regularely.

The very section with the HTML table element, I edit in XXE:  I have created an XML document in the HTML namespace, with the following document structure:

<div xmlns="http://www.w3.org/1999/xhtml";><table/></div>

(Thus, there is no DOCTYPE or <html> or <body> —  or any other of the elements that are required in a valid HTML document.)

And thus, every time I need to edit the table, I create a new file with the above document structure, and edit in XXE, before I paste the code into the Web page.

I/We have worked this way for some years.

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 think might be the first time I saw these declarations in the documents of this particular project. But it is not the first time I have seen it, as such.

Anyway, I just wondered if this is due to some XXE setting that I might have edited? Or if it is an XXE bug? Or what? The version XXE where this happened, is version 10.10

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

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".

It's too late to change this in forthcoming 10.11.




--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to