Actions
Support #5059
closedNS default empty declaration added by transformer
Start date:
2021-08-10
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
10
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
Taking a document with a default namespace and sub-element in its scope without a specified namespace, the serialization of this document will conduct to the addition of an empty namespace inside the sub-elements with saxon > 10.X
Example, build of the document below
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg"><title>a_title</title></svg>
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
Document dom = dbf.newDocumentBuilder().newDocument();
Element rootEle = dom.createElement("svg");
rootEle.setAttribute("xmlns", "http://www.w3.org/2000/svg");
Element titleEem = dom.createElement("title");
titleEem.setTextContent("a_title");
rootEle.appendChild(titleEem);
dom.appendChild(rootEle);
The serialization of this document with version => 10.X (10.2 and 10.5 tested) adds a default namespace empty for the title element, which is wrong,
<?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg"><title xmlns="">a_title</title></svg>
This code is OK in version 9.9.1-5.
Files
Please register to edit this issue
Actions