Added word ICU config for da (Danish).
[idzebra-moved-to-github.git] / util / abs2dom
1 #!/usr/bin/perl -w
2
3 # $Id: abs2dom,v 1.1 2007-12-17 11:48:14 sondberg Exp $
4 # ----------------------------------------------------------------------------
5 # Generate a dom-filter indexing stylesheet based upon an .abs file
6
7 use strict;
8
9 my $xslt_header = <<END_OF_XSLT;
10 <?xml version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
11                     xmlns:z="http://indexdata.com/zebra-2.0"
12                     version="1.0">
13
14   <xsl:output indent="yes"
15         method="xml"
16         version="1.0"
17         encoding="UTF-8"/>
18 END_OF_XSLT
19
20
21 while (<>) {
22     chomp;
23     s/^\s+//;
24     s/\s+$//;
25     next unless s/^xelm\s+//;
26     my ($indexes) = (/(\S+)$/);
27     s/\s+\Q$indexes\E$//;
28     my $xpath = $_;
29
30     print "XPATH='$xpath', INDEX='$indexes'\n"; 
31 }