1212# <span class="propinst-name"><'name'></span>
1313#
1414# Ian Jacobs - ij@w3.org (Based on work by Arnaud Le Hors)
15- # $Id: dextr,v 1.15 1998-03-21 21:18:13 ijacobs Exp $
15+ # $Id: dextr,v 1.16 1998-03-24 16:06:44 bbos Exp $
1616
1717$PROGNAME = substr ($0 , rindex ($0 , " /" ) + 1);
1818
@@ -51,37 +51,53 @@ $blockst = "[/][*]";
5151$blocket = " [*][/]" ;
5252
5353sub format_descriptor {
54- $name = $_ [0];
55- $values = $_ [1];
56- $init = $_ [2];
57- $media = $_ [3];
58- print output " <DIV class=\" descdef\" >\n " ;
54+ my $name = $_ [0];
55+ my $values = $_ [1];
56+ my $init = $_ [2];
57+ my $media = $_ [3];
58+ # Do next three lines in src files to get headings right.
59+ print output " <div class=\" descdef\" >\n " ;
60+ print output " <dl><dt>\n " ;
61+ @names = split (/ [, \t\n ]+/ , $name );
62+ $comma = " " ;
63+ foreach $n (@names ) {
5964if ($noindex ) {
60- print output " <P>< a name=\" descdef-$name \" class=\" descdef-title\" ><strong>'$name '</strong> (Descriptor)</a></P> \n " ;
65+ print output " $comma < a name=\" descdef-$n \" class=\" descdef-title\" ><strong>'$n '</strong> (Descriptor)</a>" ;
6166} else {
62- print output " <P>< span class=\" index-def\" title=\" '$_ [0] ' (descriptor)\" ><a name=\" descdef-$name \" class=\" descdef-title\" ><strong>'$name '</strong> (Descriptor)</a></span></P> \n " ;
67+ print output " $comma < span class=\" index-def\" title=\" '$n ' (descriptor)\" ><a name=\" descdef-$n \" class=\" descdef-title\" ><strong>'$n '</strong> (Descriptor)</a></span>" ;
6368}
69+ $comma = " , " ;
70+ }
71+ print output " \n <dd>\n " ;
72+ print output " <table class=\" descinfo\" cellspacing=0 cellpadding=0>\n " ;
73+
6474# We use cellspacing/cellpadding until more browsers
6575# handle tables correctly.
66- print output " <TABLE class=\" descinfo\" cellpadding=0 cellspacing=0>\n " ;
6776&format_values($values );
6877&format_init($init );
6978&format_media($media );
70- print output " </TABLE>\n " ;
71- print output " </DIV>\n\n " ;
79+ print output " </table>\n " ;
80+ print output " </dl>\n " ;
81+ print output " </div>\n\n " ;
7282}
7383
84+ # Include an nbsp before TD since CSS not used to
85+ # align tables yet.
7486sub format_values {
7587$values = $_ [0];
7688$values =~ s / <([^>']*)>/ <span class=\" value-inst-$1 \" ><$1 ><\/ span>/ g ;
77- print output " <TR valign=\" top\" ><TH align=\" right\" >Specified value: <TD>$values </TR>\n " ;
89+ print output " <tr valign=baseline>" ;
90+ print output " <td><em>Value:</em> " ;
91+ print output " <td>$values \n " ;
7892}
7993
8094sub format_init {
8195$init = $_ [0];
8296$init =~ s / XX/ not defined for shorthand properties/ g ;
8397$init =~ s / <([^>']*)>/ <span class=\" value-inst-$1 \" ><$1 ><\/ span>/ g ;
84- print output " <TR valign=\" top\" ><TH align=\" right\" >Initial value: <TD>$init </TR>\n " ;
98+ print output " <tr valign=baseline>" ;
99+ print output " <td><em>Initial:</em> " ;
100+ print output " <td>$init \n " ;
85101}
86102
87103sub format_media {
@@ -95,15 +111,20 @@ sub format_media {
95111 $fmedia =~ s / all/ <a href=\" media.html#all-media-group\" class=\" noxref\" >all<\/ a>/ ;
96112 $fmedia =~ s / interactive/ <a href=\" media.html#interactive-media-group\" class=\" noxref\" >interactive<\/ a>/ ;
97113 $fmedia =~ s / static/ <a href=\" media.html#static-media-group\" class=\" noxref\" >static<\/ a>/ ;
98- print output " <TR valign=\" top\" ><TH align=\" right\" >Media groups: <TD>$fmedia </TR>\n " ;
114+ print output " <tr valign=baseline>" ;
115+ print output " <td><em>Media:</em> " ;
116+ print output " <td>$fmedia \n " ;
99117}
100118
119+
101120# extract every possible block
102121$_ = $buf ;
103122while (/ $blockst$patt ;;$patt ;;$patt ;;$patt$blocket /s ) {
104123 # Set parameters first (before any modifications)
105124 $placeholder = $' ;
106- $output = " $path$1 .srb" ;
125+ my @names = split (/ [, \t\n ]+/ , $1 );
126+ my $name = $names [0];
127+ $output = " $path$name .srb" ;
107128 print " \t extracting $output \n " ;
108129 open (output, " > $output " );
109130 &format_descriptor($1 , $2 , $3 , $4 );
0 commit comments