Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Version 2 Beta 1
-
None
-
None
Description
MyEl.type.qnameSetForWildcardAttributes() does not work. There are no tests for it and it is not returning any qnames for me. Constructing a QNameSet explicitly to match the schema gives the expected results from selectChildren.
schema:
<xs:complexType name="xml-attributeType">
<xs:sequence>
<xs:any namespace="##other"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
code:
//does NOT work:
XmlObject[] anys = xmlAttributeType.selectChildren(XmlAttributeType.type.qnameSetForWildcardElements());
//Does work:
// String uri = "http://geronimo.apache.org/xml/ns/deployment";
// XmlObject[] anys = xmlAttributeType.selectChildren(QNameSet.forWildcardNamespaceString("##other", uri));
if (anys.length != 1)
results in:
org.apache.geronimo.common.DeploymentException: Unexpected count of xs:any elements in xml-attribute 0 qnameset: QNameSet+()
Fetching "anys" with the commented out lines works fine.