public void setPrimarySchema(String schemaStr) throws YSchemaBuildingException, YSyntaxException {
//first of all check that the schema itself is valid
SchemaForSchemaValidator tmp = SchemaForSchemaValidator.getInstance();
String results = tmp.validateSchema(schemaStr);
if (results.length() > 0) {
throw new YSyntaxException(results);
}
//now set the schema
Document document = null;
DOMParser parser = new DOMParser();