aboutsummaryrefslogtreecommitdiff
path: root/sort.xsl
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2016-11-02 02:53:46 +0000
committerFelix Hanley <felix@userspace.com.au>2016-11-02 02:53:46 +0000
commit2e2eade6c26ab1826c44d6bdb4b6418619ed5643 (patch)
treedbbdbe339434358b17874e93e7160703b71d53a3 /sort.xsl
parenta454036ac1511b219249176f82ad5a7c66578c20 (diff)
downloadlahu-dictionary-master.tar.gz
lahu-dictionary-master.tar.bz2
Move to XDXF formatHEADmaster
Diffstat (limited to 'sort.xsl')
-rw-r--r--sort.xsl26
1 files changed, 26 insertions, 0 deletions
diff --git a/sort.xsl b/sort.xsl
new file mode 100644
index 0000000..bc75524
--- /dev/null
+++ b/sort.xsl
@@ -0,0 +1,26 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.tei-c.org/ns/1.0">
+
+ <xsl:output encoding="UTF-8" indent="yes" />
+ <xsl:strip-space elements="*"/>
+
+ <xsl:template match="text()[not(string-length(normalize-space()))]"/>
+
+ <xsl:template match="*[local-name() = 'text']/*[local-name() = 'lexicon']">
+ <body>
+ <xsl:apply-templates select="*[local-name() = 'ar']">
+ <xsl:sort select="*[local-name() = 'k']"/>
+ </xsl:apply-templates>
+ </body>
+ </xsl:template>
+
+ <xsl:template match='@*|node()'>
+ <xsl:copy>
+ <xsl:apply-templates select='@*|node()'/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>