Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-125

MyEl.type.qnameSetForWildcardAttributes() does not work

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Version 2 Beta 1
    • Fix Version/s: Version 2
    • Component/s: None
    • Labels:
      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)

      { throw new DeploymentException("Unexpected count of xs:any elements in xml-attribute " + anys.length + " qnameset: " + XmlAttributeType.type.qnameSetForWildcardElements()); }

      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.

        Attachments

          Activity

            People

            • Assignee:
              radup Radu Preotiuc
              Reporter:
              djencks David Jencks
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: