Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[Wtp-wst-dev] Attribute getSpecified() method.

I've been going through the W3C DOM Test Suite, and running the DOM Level 1 XML core compliance tests against the WTP DOM implementation. Several minor problems, I have been able to fix, but there is one that is driving me batty, and it has to do with the AttrImpl#getSpecified() method in org.eclipse.wst.xml.core.internal.document.

The getSpecified() method is supposed to return the state of the attribute. Whether it's value has been changed or not. Currently this is done by checking to see if the ITextRegion valueRegion is not Null...if it is, it returns false if it isn't it doesn't. Unfortunately, when running through the DOM doesn't appear to be accurate half the time.

When an attribute is removed, the valueRegion should also be removed. If the attribute's value is set, the valueRegion should be updated as well. My question is, when and where is the setValueRegion() method called. As it isn't called within the AttrImpl, so I'm assuming this is something that was called from the StructuredDocument. If so...then we have a timing issue going on between when this value is updated and when the DOM is being read for this value.

Any ideas or thoughts would be appreciated it, this little switch is driving me up a wall.


Back to the top