Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#596 DOM attributes don\'t have text nodes

v8.8
closed
Michael Kay
5
2012-10-08
2006-09-23
Michael Kay
No

In the DOM wrapper over a Saxon tree structure, an Attr
node does not have any text node children. The DOM
interface requires that an attribute node (which may
represent an attribute or a namespace) has a text node
child. A consequence of this is that applications that
rely on reading the text node children of an attribute
to obtain the attribute's value will appear to read the
value as a zero-length string. One such application is
the implementation of importNode() in the Xerces DOM:
so if Xerces importNode() is used to import a Saxon
tree (via its DOM wrapper), the attributes in the
resulting tree will all be empty.

A patch is being placed in subversion. This involves
revisions to the module
net.sf.saxon.dom.AttrOverNodeInfo, and a new module
net.sf.saxon.dom.TextOverAttrInfo.

Discussion