}
public void writeAttributes(XMLPrinter xout) throws RulesException {
RName entities[]= new RName[0];
entities = referenceEntities.keySet().toArray(entities);
Arrays.sort(entities);
for ( RName key : entities ){
IREntity entity = referenceEntities.get(key);
{
String access = entity.isReadOnly()?"r":"rw";
String comment = entity.getComment();
String name = key.stringValue();
xout.opentag("entity","name",name,"access",access,"comment",comment);
}
RName attributes [] = new RName[0];
attributes = entity.getAttributeSet().toArray(attributes);
Arrays.sort(attributes);
for (RName attribute : attributes){
REntityEntry entry = entity.getEntry(attribute);