diff options
author | Eitan Isaacson <eitan@monotonous.org> | 2011-06-16 15:51:37 -0700 |
---|---|---|
committer | Eitan Isaacson <eitan@monotonous.org> | 2011-06-22 11:26:39 -0700 |
commit | ab699e3e6d203e975f99617316e39b77ec76dc56 (patch) | |
tree | 8ccffcdd40dbeaaacfd4c54a2dca68082cbc6b74 /tools | |
parent | dffb9374b4cae0266c0e3c1a4e1a03e7a77383b0 (diff) | |
download | caribou-ab699e3e6d203e975f99617316e39b77ec76dc56.tar.gz |
Use XSLT to make keyboard definitions easier.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/basic.xsl | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/basic.xsl b/tools/basic.xsl new file mode 100644 index 0000000..722bafa --- /dev/null +++ b/tools/basic.xsl @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:gen="dummy-namespace-for-the-generated-xslt"> + + <xsl:namespace-alias stylesheet-prefix="gen" result-prefix="xsl"/> + <xsl:output method="xml" indent="yes"/> + <xsl:template match="/"> + <gen:stylesheet version="1.0"> + <gen:output method="xml" indent="yes"/> + <gen:template match="@*|node()"> + <gen:copy> + <gen:apply-templates select="@*|node()"/> + </gen:copy> + </gen:template> + + <gen:template match="//override"/> + + <xsl:apply-templates/> + </gen:stylesheet> + </xsl:template> + + <xsl:template match="text()"/> + + <xsl:template match="//override"> + <gen:template> + <xsl:attribute name="match"><xsl:value-of select="@xpath"/></xsl:attribute> + <xsl:copy-of select="node()/."/> + </gen:template> + </xsl:template> + +</xsl:stylesheet>
\ No newline at end of file |