1:
2eval 'exec perl -wS $0 ${1+"$@"}'
3        if 0;
4
5#**************************************************************
6#
7#  Licensed to the Apache Software Foundation (ASF) under one
8#  or more contributor license agreements.  See the NOTICE file
9#  distributed with this work for additional information
10#  regarding copyright ownership.  The ASF licenses this file
11#  to you under the Apache License, Version 2.0 (the
12#  "License"); you may not use this file except in compliance
13#  with the License.  You may obtain a copy of the License at
14#
15#    http://www.apache.org/licenses/LICENSE-2.0
16#
17#  Unless required by applicable law or agreed to in writing,
18#  software distributed under the License is distributed on an
19#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20#  KIND, either express or implied.  See the License for the
21#  specific language governing permissions and limitations
22#  under the License.
23#
24#**************************************************************
25
26
27
28while (<>) {
29
30  if( /<prop/ ) {
31    $prop = $_;
32    next if( /Text/ || /Bubble/ );
33  }
34
35  if( /<\/prop>/ ) {
36    next if( $prop =~ /Text/ || $prop =~ /Bubble/ );
37  }
38
39  if( /xml:lang/ ) {
40    $lang = $_;
41    $lang =~ s/.*xml:lang=\"//;
42    $lang =~ s/\".*//;
43    chomp $lang;
44    $line = $prop;
45    $line =~ s/\" oor:type/_$lang\" oor:type/;
46    print $line;
47    $line = $_;
48    $line =~ s/ xml:lang=\".*\"//;
49    print $line;
50    $line = $prop;
51    $line =~ s/<prop.*/<\/prop>/;
52    print $line;
53    next;
54  }
55
56  print;
57}