void () { XmlNSDescriptor NSDescriptor = createDescriptor( "<xsd:schema targetNamespace=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" >" + "<xsd:element name=\"purchaseOrder\" type=\"PurchaseOrderType\"/>" + "<xsd:complexType name=\"PurchaseOrderType\">" + " <xsd:sequence>" + " <xsd:element ref=\"xsd:items\"/>" + " </xsd:sequence>" + "</xsd:complexType>" + "<xsd:element name=\"items\" type=\"xsd:string\"/>" + "</xsd:schema>"); XmlTag tag = XmlTestUtil.tag("purchaseOrder", "http://www.w3.org/2001/XMLSchema", getProject()); XmlElementDescriptorImpl elementDescriptor = (XmlElementDescriptorImpl)NSDescriptor.getElementDescriptor(tag); XmlElementDescriptor[] elements = elementDescriptor.getElementsDescriptors(tag); assertEquals(1, elements.length); assertEquals("items", elements[0].getName()); assertEquals("items", elementDescriptor.getElementDescriptor("items").getName()); assertNull(elementDescriptor.getElementDescriptor("xxx")); }