*/
public void testAnnotations() {
XSModel model = fSchemaLoader
.loadURI(getResourceURL("XSAttributeGroupAnnotationsTest02.xsd"));
XSAttributeGroupDefinition AG = model.getAttributeGroup("AG",
"XSAttributeGroupAnnotationsTest");
XSObjectList annotations = AG.getAnnotations();
String expectedResult = "<annotation id=\"ANNOT1\" "
+ "xmlns=\"http://www.w3.org/2001/XMLSchema\" "
+ "xmlns:sv=\"XSAttributeGroupAnnotationsTest\" >"
+ "<appinfo source=\"None\">"
+ "<!-- No Appinfo -->"
+ "</appinfo><documentation>ANNOT1 should be seen</documentation>"
+ "</annotation>";
for (int i = 0; i < annotations.getLength(); i++) {
XSAnnotation annotation = (XSAnnotation) annotations.item(i);
String actual = annotation.getAnnotationString();
assertEquals(trim(expectedResult), trim(actual));
}
AG = model.getAttributeGroup("AG2", "XSAttributeGroupAnnotationsTest");
annotations = AG.getAnnotations();
expectedResult = "<annotation id=\"ANNOT2\" "
+ "xmlns=\"http://www.w3.org/2001/XMLSchema\" "
+ "xmlns:sv=\"XSAttributeGroupAnnotationsTest\" >"
+ "</annotation>";