public void printEntity(IXMLPrinter rpt, String tag, IREntity e) throws Exception {
if(tag==null)tag = e.getName().stringValue();
IRObject id = e.get(RName.getRName("mapping*key"));
String idString = id!=null?id.stringValue():"--none--";
rpt.opentag(tag,"DTRulesId",e.getID()+"","id",printIds ? idString : "");
Set<RName> names = e.getAttributeSet();
RName keys[] = sort(names);
for(RName name : keys){
IRObject v = e.get(name);