void () { XmlNSDescriptor NSDescriptor = createDescriptor( "<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" + "<xsd:element name=\"purchaseOrder\" type=\"PurchaseOrderType\"/>" + "<xsd:complexType name=\"PurchaseOrderType\">" + " <xsd:sequence>" + " <xsd:group ref=\"ddd:mainBookElements\"/>" + " </xsd:sequence>" + "</xsd:complexType>" + "<xsd:group name=\"mainBookElements\">" + " <xsd:sequence>" + " <xsd:element name=\"title\" type=\"nameType\"/>" + " <xsd:element name=\"author\" type=\"nameType\"/>" + " </xsd:sequence>" + "</xsd:group>" + "</xsd:schema>"); XmlTag tag = XmlTestUtil.tag("purchaseOrder", getProject()); XmlElementDescriptor elementDescriptor = NSDescriptor.getElementDescriptor(tag); XmlElementDescriptor[] elements = elementDescriptor.getElementsDescriptors(tag); assertEquals(2, elements.length); assertEquals("title", elements[0].getName()); assertEquals("author", elements[1].getName()); assertEquals("title", elementDescriptor.getElementDescriptor(XmlTestUtil.tag("title", getProject()), null).getName()); assertNull(elementDescriptor.getElementDescriptor(UNKNOWN_TAG, null)); }