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:element ref=\"items\"/>" + " </xsd:sequence>" + "</xsd:complexType>" + "<xsd:element name=\"items\" type=\"xsd:string\"/>" + "</xsd:schema>"); XmlTag tag = XmlTestUtil.tag("purchaseOrder", getProject()); XmlElementDescriptor elementDescriptor = NSDescriptor.getElementDescriptor(tag); XmlElementDescriptor[] elements = elementDescriptor.getElementsDescriptors(tag); assertEquals(1, elements.length); assertEquals("items", elements[0].getName()); assertEquals("items", elementDescriptor.getElementDescriptor(XmlTestUtil.tag("items", getProject()), null).getName()); assertNull(elementDescriptor.getElementDescriptor(UNKNOWN_TAG, null)); }