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