protected void setUp() throws Exception {
   schema = SchemaManager.getSchemaForSchema();
   assertNotNull(schema);
   for (int i = 0; i < elementNames.length; i++) {
     Element elm = schema.getElement(schemaQName(elementNames[i]));
     if (elm == null) throw new AssertionFailedError("Can't get element " + elementNames[i]);
     elementMap.put(elementNames[i], elm);
   }
 }
  public void testElements() {
    Element element = schema.getElement(schemaQName("element"));

    List attribs = element.getAllAttributes();
    checkNameList(element_attribs, attribs, false);

    List arrays = element.getAllArrays();
    checkNameList(element_arrays, arrays, true);
  }
  public void testAttribute() {

    CompositeMap schemaCm = new CompositeMap(null, SchemaConstant.SCHEMA_NAMESPACE, "schema");
    CompositeMap attributes = new CompositeMap(null, SchemaConstant.SCHEMA_NAMESPACE, "attributes");
    schemaCm.addChild(attributes);
    System.out.println("schemaCm:\n" + schemaCm.toXML());

    Element element = schema.getSchemaManager().getElement(attributes);
    assertNotNull(element);

    CompositeMap elementCm = new CompositeMap(null, SchemaConstant.SCHEMA_NAMESPACE, "element");
    CompositeMap newAttributes =
        new CompositeMap(null, SchemaConstant.SCHEMA_NAMESPACE, "attributes");
    elementCm.addChild(newAttributes);
    System.out.println("elementCm:\n" + elementCm.toXML());

    Element newElement = schema.getSchemaManager().getElement(newAttributes);
    //        assertNull(newElement);
    assertNotNull(newElement);
  }