Stuart Barker created XERCESJ-1662:
--------------------------------------
Summary: Xerces creates lazily initialized nodes in read-only DOMs
that are not read-only
Key: XERCESJ-1662
URL: https://issues.apache.org/jira/browse/XERCESJ-1662
Project: Xerces2-J
Issue Type: Bug
Components: Other
Reporter: Stuart Barker
Priority: Minor
If you set a Document to be read-only with deep=true then it is possible for
nodes to be created on later read operations that are not read-only.
This occurs in two cases we have observed:
* conversion of the string value of an attribute to a Text node when calling,
for example, getFirstChild on the Attribute; the text node is not read-only and
you can mutate its value
* creation of a NamedNodeMap when calling getAttributes on an Element where the
attributes object is null (ie an element that has no attributes); the map is
mutable, allowing you to add attributes to the read-only element
This is non-DOM functionality but nevertheless the current behaviour seems
incorrect.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]