Show
Ignore:
Timestamp:
05/11/08 17:47:56 (5 months ago)
Author:
oren
Message:

Language fixes;
Ensuring JSON compatibility (removing Unicode line breaks);
Adding recommended schemas section.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/spec/preprocess_fo.pl

    r7 r8  
    55 
    66my $text = ""; 
     7my $in_final_tables = 0; 
    78while (my $line = <>) { 
    89    # Get rid of the URLs of external links 
     
    2526    $line =~ s/<fo:table-row/<fo:table-row keep-together="always"/g; 
    2627    # Add margin and p[adding to preview examples. 
    27     $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ 
    28                               if ($line =~ /fo:block><fo:block wrap-option/); 
     28    $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ if ($line =~ /fo:block><fo:block wrap-option/); 
    2929    # Add margin and padding to syntax examples. 
    30     $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ 
    31                               if ($line =~ /^<fo:block wrap-option/); 
     30    $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ if ($line =~ /^<fo:block wrap-option/); 
    3231    # Fix the disappearing trademark problem. 
    3332    $line =~ s/\(YAML\)/(YAML&#8482;)/g; 
     
    4039        $line =~ s/key="((?:[^" ]+ )+)[ ]+/key="$1/; 
    4140    } 
     41    # Get rid of the non-ASCII characters. 
     42    $line =~ s/\302?\240/&#160;/g; # nbsp 
     43    $line =~ s/\302?\251/&#169;/g; # copyright 
     44    $line =~ s/\302?\260/&#176;/g; # deg 
     45    $line =~ s/\302?\267/&#183;/g; # middot 
     46    $line =~ s/\303?\327/&#215;/g; # times 
     47    $line =~ s/d[^ ]*t Net/d&#246;t Net/g; # ouml 
     48 
     49    $in_final_tables++ if $line =~ /10.2.2.&#160;Resolution</; 
     50    $line =~ s/column-number="1"\//column-number="1" column-width="60%"\// if $in_final_tables > 1; 
     51    $line =~ s/column-number="2"\//column-number="2" column-width="40%"\// if $in_final_tables > 1; 
    4252 
    4353    print $line;