lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [5579] Sort <cell> subelements


From: Greg Chicares
Subject: [lmi-commits] [5579] Sort <cell> subelements
Date: Tue, 23 Oct 2012 00:08:27 +0000

Revision: 5579
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5579
Author:   chicares
Date:     2012-10-23 00:08:24 +0000 (Tue, 23 Oct 2012)
Log Message:
-----------
Sort <cell> subelements

Added Paths:
-----------
    lmi/trunk/sort_cell_subelements.xsl

Added: lmi/trunk/sort_cell_subelements.xsl
===================================================================
--- lmi/trunk/sort_cell_subelements.xsl                         (rev 0)
+++ lmi/trunk/sort_cell_subelements.xsl 2012-10-23 00:08:24 UTC (rev 5579)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+    Sort subelements of a <cell> element.
+
+    Copyright (C) 2012 Gregory W. Chicares.
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License version 2 as
+    published by the Free Software Foundation.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software Foundation,
+    Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+
+    http://savannah.nongnu.org/projects/lmi
+    email: <address@hidden>
+    snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+-->
+<!-- $Id$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">
+
+    <xsl:strip-space elements="*"/>
+    <xsl:output method="xml" indent="yes"/>
+
+    <xsl:template match="@*|node()">
+        <xsl:copy>
+            <xsl:apply-templates select="@*|node()"/>
+        </xsl:copy>
+    </xsl:template>
+
+    <xsl:template match="cell">
+        <xsl:copy>
+            <xsl:apply-templates select="@*"/>
+            <xsl:apply-templates select="node()">
+                <xsl:sort select="local-name()"/>
+            </xsl:apply-templates>
+        </xsl:copy>
+    </xsl:template>
+</xsl:stylesheet>
+


Property changes on: lmi/trunk/sort_cell_subelements.xsl
___________________________________________________________________
Added: svn:keywords
   + Id




reply via email to

[Prev in Thread] Current Thread [Next in Thread]