module postprocessing; create OUT: UML refining IN: UML, PRO: UML, BDT: UML; helper def: getStereotype ... rule EnumerateProperties { from cl:UML!Class using { counter:Integer = 0; t:UML!Property = OclUndefined; } to c2:UML!Class() do { for (a in cl.getAllAttributes()){ t <- a; thisModule.debug(t.getAppliedStereotypes()); if(t.isStereotypeApplied(thisModule.getStereotype('xsdElement')))){ thisModule.debug('adding position ' + counter + ' to attribute ' + a.name + ' in class ' + cl.name); a.setValue(thisModule.getStereotype('xsdElement'), 'position', counter); counter <- counter + 1; } } } }