diff options
author | marha <marha@users.sourceforge.net> | 2011-03-02 08:06:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-02 08:06:29 +0000 |
commit | 56950d7bed70ee82186f44f9333537cdbb33c448 (patch) | |
tree | 92082a5a1556b7ab903a0840cb97e34f23e05d71 /xorg-server/xkeyboard-config/rules/xml2lst.pl | |
parent | a18769801e521ccb5a409c377ac0a6a1141f5776 (diff) | |
download | vcxsrv-56950d7bed70ee82186f44f9333537cdbb33c448.tar.gz vcxsrv-56950d7bed70ee82186f44f9333537cdbb33c448.tar.bz2 vcxsrv-56950d7bed70ee82186f44f9333537cdbb33c448.zip |
xkeyboard-config mesa git update 2 Mar 2011
Diffstat (limited to 'xorg-server/xkeyboard-config/rules/xml2lst.pl')
-rw-r--r-- | xorg-server/xkeyboard-config/rules/xml2lst.pl | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/xorg-server/xkeyboard-config/rules/xml2lst.pl b/xorg-server/xkeyboard-config/rules/xml2lst.pl index 478fce89c..0c6540d1e 100644 --- a/xorg-server/xkeyboard-config/rules/xml2lst.pl +++ b/xorg-server/xkeyboard-config/rules/xml2lst.pl @@ -4,16 +4,10 @@ # # Usage: # -# perl xml2lst.pl [lang] < filename.xml > filename.lst +# perl xml2lst.pl < filename.xml > filename.lst # # author Ivan Pascal -if (@ARGV) { - $lang = shift @ARGV; -} else { - $lang = ''; -} - $doc = new_document( 0, ''); parse('', $doc); @@ -25,22 +19,14 @@ parse('', $doc); print "! model\n"; for $i (@models) { ($name) = node_by_name($i, 'name'); - @desc = node_by_name($i, 'description'); - $descr = with_attribute(\@desc, 'xml:lang='.$lang); - if (! defined $descr) { - $descr = with_attribute(\@desc, 'xml:lang='); - } + ($descr) = node_by_name($i, 'description'); printf(" %-15s %s\n", text_child($name), text_child($descr)); } print "\n! layout\n"; for $i (@layouts) { ($name) = node_by_name($i, 'name'); - @desc = node_by_name($i, 'description'); - $descr = with_attribute(\@desc, 'xml:lang='.$lang); - if (! defined $descr ) { - $descr = with_attribute(\@desc, 'xml:lang='); - } + ($descr) = node_by_name($i, 'description'); printf(" %-15s %s\n", text_child($name), text_child($descr)); } @@ -50,11 +36,7 @@ for $l (@layouts) { @variants = node_by_name($l, '../variantList/variant/configItem'); for $v (@variants) { ($name) = node_by_name($v, 'name'); - @desc = node_by_name($v, 'description'); - $descr = with_attribute(\@desc, 'xml:lang='.$lang); - if (! defined $descr) { - $descr = with_attribute(\@desc, 'xml:lang='); - } + ($descr) = node_by_name($v, 'description'); printf(" %-15s %s: %s\n", text_child($name), text_child($lname), text_child($descr)); } @@ -63,21 +45,13 @@ for $l (@layouts) { print "\n! option\n"; for $g (@options) { ($name) = node_by_name($g, 'name'); - @desc = node_by_name($g, 'description'); - $descr = with_attribute(\@desc, 'xml:lang='.$lang); - if (! defined $descr) { - $descr = with_attribute(\@desc, 'xml:lang='); - } + ($descr) = node_by_name($g, 'description'); printf(" %-20s %s\n", text_child($name), text_child($descr)); @opts = node_by_name($g, '../option/configItem'); for $o (@opts) { ($name) = node_by_name($o, 'name'); - @desc = node_by_name($o, 'description'); - $descr = with_attribute(\@desc, 'xml:lang='.$lang); - if (! defined $descr) { - $descr = with_attribute(\@desc, 'xml:lang='); - } + ($descr) = node_by_name($o, 'description'); printf(" %-20s %s\n", text_child($name), text_child($descr)); } |