215 |
* i) title title of this page |
* i) title title of this page |
216 |
* i) place SUBDIR: this page is in sub directory |
* i) place SUBDIR: this page is in sub directory |
217 |
* TOPDIR: this page is in the top directory |
* TOPDIR: this page is in the top directory |
218 |
|
* i) use_frameset |
219 |
|
* use frameset document type or not |
220 |
*/ |
*/ |
221 |
const char * |
const char * |
222 |
gen_page_begin(title, place) |
gen_page_begin(title, place, use_frameset) |
223 |
const char *title; |
const char *title; |
224 |
int place; |
int place; |
225 |
|
int use_frameset; |
226 |
{ |
{ |
227 |
STATIC_STRBUF(sb); |
STATIC_STRBUF(sb); |
228 |
const char *dir = (place == SUBDIR) ? "../" : ""; |
const char *dir = (place == SUBDIR) ? "../" : ""; |
239 |
} |
} |
240 |
/* |
/* |
241 |
* If the --frame option are specified then we take |
* If the --frame option are specified then we take |
242 |
* 'XHTML 1.0 Frameset', else if the config variable |
* 'XHTML 1.0 Frameset' for index.html |
243 |
* 'xhtml_version' is set to '1.1' then we take 'XHTML 1.1', |
* and 'XHTML 1.0 Transitional' for other files, |
244 |
|
* else if the config variable 'xhtml_version' is |
245 |
|
* set to '1.1' then we take 'XHTML 1.1', |
246 |
* else 'XHTML 1.0 Transitional'. |
* else 'XHTML 1.0 Transitional'. |
247 |
*/ |
*/ |
248 |
if (Fflag) |
if (use_frameset) |
249 |
strbuf_puts_nl(sb, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Frameset//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd'>"); |
strbuf_puts_nl(sb, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Frameset//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd'>"); |
250 |
else if (strict_xhtml) |
else if (!Fflag && strict_xhtml) |
251 |
strbuf_puts_nl(sb, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>"); |
strbuf_puts_nl(sb, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.1//EN' 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'>"); |
252 |
else |
else |
253 |
strbuf_puts_nl(sb, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd'>"); |
strbuf_puts_nl(sb, "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-Transitional.dtd'>"); |