File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66# and put their contents into separate files
77#
88# Arnaud Le Hors - lehors@w3.org
9- # $Id: xextr,v 1.2 1998-01-08 13:53:38 ijacobs Exp $
9+ # $Id: xextr,v 1.3 1998-03-20 22:09:14 bbos Exp $
1010
1111$PROGNAME = substr ($0 , rindex ($0 , " /" ) + 1);
1212
@@ -82,14 +82,30 @@ sub process_html_block {
8282}
8383
8484sub process_xml_block {
85- warn " XML extraction not implemented yet...\n " ;
85+ my ($file , $block , $deprecated ) = @_ ;
86+
87+ # comment out undesired block
88+ $block =~ s / <em>(.*?)<\/ em>/ <!-- $1 -->/ sigo ;
89+
90+ # map characters
91+ $block =~ s / </ </ g ;
92+ $block =~ s / >/ >/ g ;
93+ $block =~ s / "/ \" / g ;
94+ $block =~ s / ©/ (C)/ g ;
95+ $block =~ s / &/ \& / g ;
96+
97+ # print file out
98+ print " \t XML extracting $file \n " ;
99+ open (OUTPUT, " > $file " ) || die " failed to create $file \n " ;
100+ print OUTPUT $block ;
101+ close (OUTPUT);
86102}
87103
88104sub process_css_block {
89105 my ($file , $block , $deprecated ) = @_ ;
90106
91107 # comment out undesired block
92- $block =~ s / <em>(.*?)<\ / em>/ <!-- $1 --> / sigo ;
108+ $block =~ s | <em>(.*?)</em>| /* $1 */ | sigo ;
93109
94110 # map characters
95111 $block =~ s / </ </ g ;
Original file line number Diff line number Diff line change 66# and put their contents into separate files
77#
88# Arnaud Le Hors - lehors@w3.org
9- # $Id: xextr,v 1.2 1998-01-08 13:53:38 ijacobs Exp $
9+ # $Id: xextr,v 1.3 1998-03-20 22:09:14 bbos Exp $
1010
1111$PROGNAME = substr ($0 , rindex ($0 , " /" ) + 1);
1212
@@ -82,14 +82,30 @@ sub process_html_block {
8282}
8383
8484sub process_xml_block {
85- warn " XML extraction not implemented yet...\n " ;
85+ my ($file , $block , $deprecated ) = @_ ;
86+
87+ # comment out undesired block
88+ $block =~ s / <em>(.*?)<\/ em>/ <!-- $1 -->/ sigo ;
89+
90+ # map characters
91+ $block =~ s / </ </ g ;
92+ $block =~ s / >/ >/ g ;
93+ $block =~ s / "/ \" / g ;
94+ $block =~ s / ©/ (C)/ g ;
95+ $block =~ s / &/ \& / g ;
96+
97+ # print file out
98+ print " \t XML extracting $file \n " ;
99+ open (OUTPUT, " > $file " ) || die " failed to create $file \n " ;
100+ print OUTPUT $block ;
101+ close (OUTPUT);
86102}
87103
88104sub process_css_block {
89105 my ($file , $block , $deprecated ) = @_ ;
90106
91107 # comment out undesired block
92- $block =~ s / <em>(.*?)<\ / em>/ <!-- $1 --> / sigo ;
108+ $block =~ s | <em>(.*?)</em>| /* $1 */ | sigo ;
93109
94110 # map characters
95111 $block =~ s / </ </ g ;
You can’t perform that action at this time.
0 commit comments