Index: source/tools/templatessorter/templatessorter.xsl
===================================================================
--- source/tools/templatessorter/templatessorter.xsl	(revision 0)
+++ source/tools/templatessorter/templatessorter.xsl	(revision 0)
@@ -0,0 +1,23 @@
+<xsl:stylesheet
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output indent="yes"/>
+
+  <xsl:template match="@* | node()">
+    <xsl:copy>
+      <xsl:apply-templates select="@* | node()"/>
+    </xsl:copy>
+  </xsl:template>
+
+  <xsl:template match="Entity">
+    <xsl:copy>
+      <xsl:apply-templates select="@*"/>
+      <xsl:apply-templates select="*">
+        <xsl:sort select="local-name()"/>
+      </xsl:apply-templates>
+    </xsl:copy>
+  </xsl:template>
+
+</xsl:stylesheet> 
+
Index: source/tools/templatessorter/templatessorter.sh
===================================================================
--- source/tools/templatessorter/templatessorter.sh	(revision 0)
+++ source/tools/templatessorter/templatessorter.sh	(revision 0)
@@ -0,0 +1,11 @@
+#!/bin/bash
+# check arguments count
+if [ $# -ne 1 ]; then
+  echo 'usage: '$0' directory'
+  exit
+fi
+# assign arguments to variables with readable names
+input_directory=$1
+# perform work
+find $input_directory -name \*.xml -exec xsltproc -o {} templatessorter.xsl {} \;
+

Property changes on: source/tools/templatessorter/templatessorter.sh
___________________________________________________________________
Added: svn:executable
   + *

