vb@0: include yslt.yml2 vb@0: vb@0: decl UML is textstylesheet( vb@0: xmlns:uml="http://schema.omg.org/spec/UML/2.1", vb@0: xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" vb@0: ) { vb@0: output *output; vb@0: const "space", !"'" + " " * 200 + "'"!; vb@0: param "autoindent", 4; vb@0: template "text()"; vb@0: content; vb@0: }; vb@0: vb@0: decl Root is template(match="/xmi:XMI/uml:Model/packagedElement"), vb@0: All is template(%match="*", match="//[%match]"); vb@0: vb@0: decl Package is template( vb@0: %match="true()", vb@0: match="packagedElement[@xmi:type='uml:Package' and (%match)]" vb@0: ); vb@0: vb@0: decl applyPackages is apply ( vb@0: %match="true()", vb@0: select="packagedElement[@xmi:type='uml:Package' and (%match)]" vb@0: ); vb@0: vb@0: decl Class is template( vb@0: %match="true()", vb@0: match="packagedElement[@xmi:type='uml:Class' and (%match)]" vb@0: ); vb@0: vb@0: decl applyClasses is apply ( vb@0: %match="true()", vb@0: select="packagedElement[@xmi:type='uml:Class' and (%match)]" vb@0: ); vb@0: vb@0: decl Attribute is template( vb@0: %match="true()", vb@0: match="ownedAttribute[@xmi:type='uml:Property' and type/@xmi:type='uml:PrimitiveType' and (%match)]" vb@0: ); vb@0: vb@0: decl applyAttributes is apply ( vb@0: %match="true()", vb@0: select="ownedAttribute[@xmi:type='uml:Property' and type/@xmi:type='uml:PrimitiveType' and (%match)]" vb@0: ); vb@0: