Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
GPath can address xml nodes with namespaces enabled, but when the node is an attribute (and it belongs to a specific xml namespace) the selection always returns null.
Example xml file:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="#Potato">
</rdf:Description>
<rdf:Description rdf:about="#Salad">
</rdf:Description>
</rdf:RDF>
It is impossible to return all "rdf:about" attribute values with the current implementation of xml namespaces support in gpath. Though, element nodes can be addressed, as well as namespaceless general nodes.
being "xml" the "rdf:RDF" node, we have the following:
xml."http://www.w3.org/1999/02/22-rdf-syntax-ns#:Description"["@http://www.w3.org/1999/02/22-rdf-syntax-ns#:about"] returns [null, null] instead of "#Potato", "#Salad"
Also, GROOVY-1033 addresses a similar issue, regarding xml namespaces aliases.
Attachments
Issue Links
- relates to
-
GROOVY-1040 support namespaced (QName) based navigations in the Node XML model.
- Closed