diff options
author | marha <marha@users.sourceforge.net> | 2010-08-02 08:29:58 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-08-02 08:29:58 +0000 |
commit | d2758df0a0091496717fe7a65c3e7563e7c82785 (patch) | |
tree | 5cb4f95ca29e85f6f732ef4a25e417ed5c2b8d54 /xorg-server/xkeyboard-config/xslt | |
parent | 022d9c6cf6a67385d84ff33ce095f5c7f9f6d0cc (diff) | |
download | vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.tar.gz vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.tar.bz2 vcxsrv-d2758df0a0091496717fe7a65c3e7563e7c82785.zip |
xserver libX11 libXdmcp git update 2-8-2010
Diffstat (limited to 'xorg-server/xkeyboard-config/xslt')
-rw-r--r-- | xorg-server/xkeyboard-config/xslt/reg2ll.xsl | 23 | ||||
-rw-r--r-- | xorg-server/xkeyboard-config/xslt/xfree86.xsl | 50 |
2 files changed, 73 insertions, 0 deletions
diff --git a/xorg-server/xkeyboard-config/xslt/reg2ll.xsl b/xorg-server/xkeyboard-config/xslt/reg2ll.xsl new file mode 100644 index 000000000..5cb4c8bec --- /dev/null +++ b/xorg-server/xkeyboard-config/xslt/reg2ll.xsl @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="text"
+ encoding="UTF-8"
+ doctype-system="xkb.dtd"
+ indent="no"/>
+
+<xsl:template match="modelList|optionList|name|description|shortDescription|configItem"/>
+<xsl:strip-space elements="*"/>
+
+<xsl:template match="layoutList"><xsl:apply-templates select="./layout"/></xsl:template>
+
+<xsl:template match="variantList"><xsl:apply-templates select="./variant"/></xsl:template>
+
+<xsl:template match="layout"><xsl:text>
+</xsl:text><xsl:value-of select="./configItem/name"/>:"<xsl:value-of select="./configItem/description"/>"<xsl:apply-templates match="./variantList/variant"/></xsl:template>
+
+<xsl:template match="variant"><xsl:text>
+</xsl:text><xsl:value-of select="../../configItem/name"/>(<xsl:value-of select="./configItem/name"/>):"<xsl:value-of select="../../configItem/description"/> - <xsl:value-of select="./configItem/description"/>"</xsl:template>
+
+</xsl:stylesheet>
diff --git a/xorg-server/xkeyboard-config/xslt/xfree86.xsl b/xorg-server/xkeyboard-config/xslt/xfree86.xsl new file mode 100644 index 000000000..8b4e84976 --- /dev/null +++ b/xorg-server/xkeyboard-config/xslt/xfree86.xsl @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ >
+<xsl:output method="xml"
+ encoding="UTF-8"
+ doctype-system="xkb.dtd"
+ indent="yes"/>
+
+ <!-- Transform all "simple" elements as they are -->
+ <xsl:template match="@*|xkbConfigRegistry|layout|layoutList|model|modelList|group|option|optionList|variant|variantList">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*"/>
+ </xsl:copy>
+ </xsl:template>
+
+ <!-- Tricky business: configItem -->
+ <xsl:template match="configItem">
+ <configItem xsl:space="preserve">
+ <name><xsl:value-of select="./name"/></name>
+ <!-- If there are some shortDescriptions -->
+ <xsl:if test="count(./shortDescription)!=0">
+ <!-- First, put the non-translated version -->
+ <shortDescription><xsl:value-of select="./shortDescription[not(@xml:lang)]"/></shortDescription>
+ <!-- For all translated versions ... -->
+ <xsl:for-each select="./shortDescription[@xml:lang]">
+ <!-- ... which are different from non-translated one ... -->
+ <xsl:if test="../shortDescription[not(@xml:lang)]/text() != ./text()">
+ <!-- ... - output! -->
+ <shortDescription xml:lang="{./@xml:lang}"><xsl:value-of select="./text()"/></shortDescription>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+ <!-- If there are some descriptions -->
+ <xsl:if test="count(./description)!=0">
+ <!-- First, put the non-translated version -->
+ <description><xsl:value-of select="./description[not(@xml:lang)]"/></description>
+ <!-- For all translated versions ... -->
+ <xsl:for-each select="./description[@xml:lang]">
+ <!-- ... which are different from non-translated one ... -->
+ <xsl:if test="../description[not(@xml:lang)]/text() != ./text()">
+ <!-- ... - output! -->
+ <description xml:lang="{./@xml:lang}"><xsl:value-of select="./text()"/></description>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+ </configItem>
+ </xsl:template>
+
+</xsl:stylesheet>
|