Bug #6054
closed
NamedNodeMap.getNamedItem throw UnsupportedOperationException
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Description
i use the following Code to extract the value of an attribute, it works fine with version 9.9 but with version 11.5 it throw an exception : UnsupportedOperationException: NodePredicate doesn't support this method.
EnterpriseConfiguration config = new EnterpriseConfiguration();
NodeInfo rootNode = config.buildDocumentTree(new StreamSource(resourceAsStream)).getRootNode();
Document document = (Document) DocumentOverNodeInfo.wrap(rootNode);
Element documentElement1 = document.getDocumentElement();
NamedNodeMap attributes1 = documentElement1.getAttributes();
Node namedItem1 = attributes1.getNamedItem("xsi:schemaLocation");
Files
- Category set to DOM Interface
- Status changed from New to In Progress
- Assignee set to Michael Kay
- Priority changed from Low to Normal
Thanks for reporting it. Reproduced as JUnit test DOMTest.testBug6054.
Now fixed. I have to confess the DOM-over-Saxon node wrapper (NodeOverNodeInfo) doesn't have very good test coverage. It was changed a little to adapt to interface changes introduced for C# transpilation, and it looks like this particular path wasn't covered by regression tests. This is one of the few places we try to find an attribute by its lexical QName rather than its namespace URI plus local name, a consequence of DOM not being fully namespace-aware.
- Status changed from In Progress to Resolved
- Applies to branch 12, trunk added
- Fix Committed on Branch 11, 12, trunk added
i downloaded saxon 11.5 ee again, but i still get the same error , does the download jar contains the fix already?
No, sorry, "resolved" means that we have applied and tested a fix. When we issue a maintenance release containing the fix, we'll update the status of the issue to indicate this. (If you're really keen you can build the Saxon-HE product yourself from the source code repository, but it's not something for the faint-hearted).
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in Maintenance Release 12.3 added
Bug fix applied in the Saxon 12.3 maintenance release.
- Status changed from Closed to Resolved
Leaving this bug issue as resolved until resolved against Saxon 11.
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 11.6 added
Bug fix applied in the Saxon 11.6 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF