#993 Missing namespaces in .NET DOM constructed programmatically

v9.2
closed
Michael Kay
.NET API (34)
5
2012-10-08
2009-10-12
Michael Kay
No

When a .NET DOM (XmlDocument) is wrapped as a Saxon NodeInfo, Saxon assumes that all namespaces used in the DOM will be represented as attribute nodes named xmlns or xmlns:. While this is true of a DOM created directly by parsing a source document, it is not necessarily true in a DOM that is created programmatically. A patch is being raised on the 9.1 and 9.2 branches to address this: when determining the in-scope namespaces of an element, as well as examining attributes named xmlns or xmlns:, it also looks at the prefix/uri pairs of the element and all its attributes (and similarly for its ancestors). The patch also causes a NamespaceReducer to be added when copying an element, to get rid of the duplicate namespaces that this process is likely to introduce.

Discussion

  • Michael Kay
    Michael Kay
    2009-10-22

    Fixed in 9.2.0.3