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:complexContent>" + " <xsd:restriction base=\"PurchaseOrderType2\">" + " <xsd:attribute name=\"orderDate2\" type=\"xsd:date\"/>" + " <xsd:attribute name=\"name\" type=\"xsd:date\"/>" + " </xsd:restriction>" + " </xsd:complexContent>" + "</xsd:complexType>" + "<xsd:complexType name=\"PurchaseOrderType2\">" + " <xsd:sequence>" + " <xsd:attribute name=\"orderDate\" type=\"xsd:date\"/>" + " <xsd:attribute name=\"name\" type=\"xsd:string\"/>" + " </xsd:sequence>" + "</xsd:complexType>" + "</xsd:schema>"); final XmlTag tag = XmlTestUtil.tag("purchaseOrder", getProject()); XmlElementDescriptor elementDescriptor = NSDescriptor.getElementDescriptor(tag); XmlAttributeDescriptor[] attributes = elementDescriptor.getAttributesDescriptors(tag); assertEquals(3, attributes.length); assertEquals("orderDate", attributes[0].getName()); assertEquals("orderDate2", attributes[1].getName()); assertEquals("name", attributes[2].getName()); }