Commit 42fd4126 authored by Daniel Veillard's avatar Daniel Veillard

change --html to make sure we use the HTML serialization rule by default

* xmllint.c: change --html to make sure we use the HTML serialization
  rule by default when HTML parser is used, add --xmlout to allow to
  force the XML serializer on HTML.
* HTMLtree.c: ugly tweak to fix the output on <p> element and
  solve #125093
* result/HTML/*: this changes the output of some tests
Daniel
parent 798ae543
Tue Nov 4 09:38:46 CET 2003 Daniel Veillard <daniel@veillard.com>
* xmllint.c: change --html to make sure we use the HTML serialization
rule by default when HTML parser is used, add --xmlout to allow to
force the XML serializer on HTML.
* HTMLtree.c: ugly tweak to fix the output on <p> element and
solve #125093
* result/HTML/*: this changes the output of some tests
Mon Nov 3 17:51:28 CET 2003 Daniel Veillard <daniel@veillard.com>
* xinclude.c: fixed bug #125812, about XPointer in XInclude
......
......@@ -835,7 +835,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
if ((cur->next->type != HTML_TEXT_NODE) &&
(cur->next->type != HTML_ENTITY_REF_NODE) &&
(cur->parent != NULL) &&
(!xmlStrEqual(cur->parent->name, BAD_CAST "pre")))
(cur->parent->name != NULL) &&
(cur->parent->name[0] != 'p')) /* p, pre, param */
xmlOutputBufferWriteString(buf, "\n");
}
return;
......@@ -860,7 +861,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
if ((cur->next->type != HTML_TEXT_NODE) &&
(cur->next->type != HTML_ENTITY_REF_NODE) &&
(cur->parent != NULL) &&
(!xmlStrEqual(cur->parent->name, BAD_CAST "pre")))
(cur->parent->name != NULL) &&
(cur->parent->name[0] != 'p')) /* p, pre, param */
xmlOutputBufferWriteString(buf, "\n");
}
return;
......@@ -880,14 +882,16 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
(cur->children->type != HTML_TEXT_NODE) &&
(cur->children->type != HTML_ENTITY_REF_NODE) &&
(cur->children != cur->last) &&
(!xmlStrEqual(cur->name, BAD_CAST "pre")))
(cur->name != NULL) &&
(cur->name[0] != 'p')) /* p, pre, param */
xmlOutputBufferWriteString(buf, "\n");
htmlNodeListDumpOutput(buf, doc, cur->children, encoding, format);
if ((format) && (info != NULL) && (!info->isinline) &&
(cur->last->type != HTML_TEXT_NODE) &&
(cur->last->type != HTML_ENTITY_REF_NODE) &&
(cur->children != cur->last) &&
(!xmlStrEqual(cur->name, BAD_CAST "pre")))
(cur->name != NULL) &&
(cur->name[0] != 'p')) /* p, pre, param */
xmlOutputBufferWriteString(buf, "\n");
}
xmlOutputBufferWriteString(buf, "</");
......@@ -902,7 +906,8 @@ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,
if ((cur->next->type != HTML_TEXT_NODE) &&
(cur->next->type != HTML_ENTITY_REF_NODE) &&
(cur->parent != NULL) &&
(!xmlStrEqual(cur->parent->name, BAD_CAST "pre")))
(cur->parent->name != NULL) &&
(cur->parent->name[0] != 'p')) /* p, pre, param */
xmlOutputBufferWriteString(buf, "\n");
}
}
......
......@@ -46,8 +46,7 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
</td>
</tr>
<tr><td bgcolor="#003399" colspan="2">
<p align="right">
<img align="right" border="0" height="18" hspace="0" src="doc3_files/trcorner.gif" width="20"><img align="left" border="0" height="18" hspace="0" src="doc3_files/tlcorner.gif" width="20"><font face="Verdana" size="2">Monday, July 31st, 2000</font> </p>
<p align="right"><img align="right" border="0" height="18" hspace="0" src="doc3_files/trcorner.gif" width="20"><img align="left" border="0" height="18" hspace="0" src="doc3_files/tlcorner.gif" width="20"><font face="Verdana" size="2">Monday, July 31st, 2000</font> </p>
</td></tr>
<tr><td colspan="2">
<table bgcolor="#003399" border="0" cellpadding="0" cellspacing="4" width="100%"><tbody><tr><td bgcolor="#666666" width="100%">
......@@ -58,38 +57,31 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
<img height="1" src="doc3_files/spacer.gif" width="738"><br><center>
<table border="0" cellpadding="2" cellspacing="0" width="91%"><tbody><tr>
<td valign="top" width="15%">
<p align="center">
<a href="http://bp6.gamesquad.net/specs.phtml"><img align="bottom" alt="Abit BP6 Motherboard specification and information." border="0" height="45" src="doc3_files/bp6icon.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/specs.phtml"><font color="white" face="Verdana" size="1">BP6 Specs</font></a>
<p align="center"><a href="http://bp6.gamesquad.net/specs.phtml"><img align="bottom" alt="Abit BP6 Motherboard specification and information." border="0" height="45" src="doc3_files/bp6icon.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/specs.phtml"><font color="white" face="Verdana" size="1">BP6 Specs</font></a>
</p>
</td>
<td valign="top" width="15%">
<p align="center">
<a href="http://bp6.gamesquad.net/bxcool.phtml"><img align="bottom" alt="How to cool the BX Chipset on your BP6." border="0" height="45" src="doc3_files/bxcool.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">BX Cooling</font></a>
<p align="center"><a href="http://bp6.gamesquad.net/bxcool.phtml"><img align="bottom" alt="How to cool the BX Chipset on your BP6." border="0" height="45" src="doc3_files/bxcool.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">BX Cooling</font></a>
</p>
</td>
<td valign="top" width="15%">
<p align="center">
<a href="http://bp6.gamesquad.net/contest.phtml"><img align="bottom" alt="The U;timate Gaming Contest - Coming Soon!" border="0" height="45" src="doc3_files/ugmcontest.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/contest.phtml"><font color="white" face="Verdana" size="1">UGM Contest</font></a>
<p align="center"><a href="http://bp6.gamesquad.net/contest.phtml"><img align="bottom" alt="The U;timate Gaming Contest - Coming Soon!" border="0" height="45" src="doc3_files/ugmcontest.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/contest.phtml"><font color="white" face="Verdana" size="1">UGM Contest</font></a>
</p>
</td>
<td valign="top" width="15%">
<p align="center">
<a href="http://bp6.gamesquad.net/uc.phtml"><img align="bottom" alt="Cooling &amp; Heatsink review for the BP6." border="0" height="45" src="doc3_files/alpha.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Heatsinks</font></a>
<p align="center"><a href="http://bp6.gamesquad.net/uc.phtml"><img align="bottom" alt="Cooling &amp; Heatsink review for the BP6." border="0" height="45" src="doc3_files/alpha.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/uc.phtml"><font color="white" face="Verdana" size="1">Heatsinks</font></a>
</p>
</td>
<td valign="top" width="15%">
<p align="center">
<a href="http://bp6.gamesquad.net/101.phtml"><img align="bottom" alt="BP6 101 - Class is now in session. Welcome newbies!" border="0" height="45" src="doc3_files/bp6101.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/101.phtml"><font color="white" face="Verdana" size="1">BP6 101</font></a>
<p align="center"><a href="http://bp6.gamesquad.net/101.phtml"><img align="bottom" alt="BP6 101 - Class is now in session. Welcome newbies!" border="0" height="45" src="doc3_files/bp6101.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/101.phtml"><font color="white" face="Verdana" size="1">BP6 101</font></a>
</p>
</td>
<td valign="top" width="15%">
<p align="center">
<a href="http://bp6.gamesquad.net/win2k_install.phtml"><img align="bottom" alt="Install guide for installing Windows 2000 on the BP6 " border="0" height="45" src="doc3_files/win2kht.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/win2k_install.phtml"><font color="white" face="Verdana" size="1">Win2k Install</font></a>
<p align="center"><a href="http://bp6.gamesquad.net/win2k_install.phtml"><img align="bottom" alt="Install guide for installing Windows 2000 on the BP6 " border="0" height="45" src="doc3_files/win2kht.gif" width="70"></a><font face="Verdana" size="1"><br></font><a href="http://bp6.gamesquad.net/win2k_install.phtml"><font color="white" face="Verdana" size="1">Win2k Install</font></a>
</p>
</td>
<td valign="top" width="15%">
<p align="center">
<a href="http://www.gentus.com/"><img align="bottom" alt="Taking a first look at the Abit Linux release called " border="0" height="45" src="doc3_files/gentusbox.gif" width="70" gentus></a><br><a href="http://www.gentus.com/"><font color="white" face="Verdana" size="1">Gentus</font></a>
<p align="center"><a href="http://www.gentus.com/"><img align="bottom" alt="Taking a first look at the Abit Linux release called " border="0" height="45" src="doc3_files/gentusbox.gif" width="70" gentus></a><br><a href="http://www.gentus.com/"><font color="white" face="Verdana" size="1">Gentus</font></a>
</p>
</td>
</tr></tbody></table>
......@@ -163,12 +155,9 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
error.<br>And 1 more person, THANK YOU TIM for letting me borrow
your server space ;-)<br><br>If you need a weird resolution, feel
free to <a href="mailto:Holodeck2@home.com">e-mail</a> me requesting
for one.<br>If you have ideas or more errors to point out, <a href="mailto:Holodeck2@home.com">mailto:Holodeck2@home.com</a><br><br><a href="doc3_files/3-800.jpg" target="800">800x600 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1024.jpg" target="800">1024x768 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1152.jpg" target="800">1152x864 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1280x1024.jpg" target="800">1280x1024 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1600.jpg" target="800">1600x1200 </a><br><p>Enjoy :-)<br>
</p>
<p>
<a href="mailto:Holodeck2@home.com">Holodeck2,</a><br>[H]ard at
work on the Brand Spanking New Wallpaper.<br>
</p></font><br><br><a name="newsitem964762841,25865,"></a><b><u><font color="#003366" face="Verdana, Arial" size="2">Seti update</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 10:40PM
for one.<br>If you have ideas or more errors to point out, <a href="mailto:Holodeck2@home.com">mailto:Holodeck2@home.com</a><br><br><a href="doc3_files/3-800.jpg" target="800">800x600 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1024.jpg" target="800">1024x768 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1152.jpg" target="800">1152x864 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1280x1024.jpg" target="800">1280x1024 </a><br><a href="http://www.bp6.com/pics/holodeck2/wallpaper/3-1600.jpg" target="800">1600x1200 </a><br><p>Enjoy :-)<br></p>
<p><a href="mailto:Holodeck2@home.com">Holodeck2,</a><br>[H]ard at
work on the Brand Spanking New Wallpaper.<br></p></font><br><br><a name="newsitem964762841,25865,"></a><b><u><font color="#003366" face="Verdana, Arial" size="2">Seti update</font></u></b><br><font color="#0066cc" face="Arial" size="1"><small>Posted by <a class="nav" href="mailto:Holodeck@bp6.com">Holodeck2</a> @ 10:40PM
PDT</small> <a href="http://bp6.gamesquad.net/news/964762841,25865,.html"><img border="0" src="doc3_files/comments.gif">5 comments</a>
|<a href="http://bp6.gamesquad.net/#news_top">top</a></font> <br><font color="black" face="Arial" size="2"><img height="54" src="doc3_files/setiupdate.jpg" width="400"><br>You like the
pic?<br><br>Bp6 User Group Update:<br>Completed 61531
......@@ -427,10 +416,8 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
</script><b><noscript></noscript></b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank"><img align="bottom" border="0" height="90" ismap src="doc3_files/100x90.gif" width="100"></a><b><a href="http://www.goto.com/d/search/ssn/?fromGIF=true" target="_blank">
</a></b><b></b><b><!-- END GoTo.com Search Box --></b><!-- Pricewatch Search Box --><form action="http://www.pricewatch.com/search/search.asp" method="get" target="_Blank">
<center>
<p>
<b><font color="white" face="ARIAL, HELVETICA" size="1">PC Price
Search<br></font></b><input maxlength="30" name="criteria" size="10"><br><input name="submit" style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type="submit" value="Search">
</p>
<p><b><font color="white" face="ARIAL, HELVETICA" size="1">PC Price
Search<br></font></b><input maxlength="30" name="criteria" size="10"><br><input name="submit" style="BACKGROUND-COLOR: #000000; COLOR: #ffffff; FONT-FAMILY: Verdana; FONT-SIZE: xx-small; FONT-WEIGHT: bold" type="submit" value="Search"></p>
</center>
</form>
<!-- Pricewatch Search Box --><a href="http://www.puicorp.com/bp6specials.htm" target="_BLANK"><img src="doc3_files/puibp6.gif"></a><br><br><br><br><a href="http://store.yahoo.com/dunamis-site/maxtor.html" target="_BLANK"><img alt="BP6.com Special - Enter CODE: BP6-hd in the order (notes) to receive a discount" src="doc3_files/hd5.gif"><font size="1"><br>BP6.COM
......@@ -444,8 +431,7 @@ eval("page" + id + " = window.open(URL, '" + id + "', 'toolbars=0, scrollbars=0,
<td colspan="3" valign="TOP" height="70"></td> </tr>
<table border="0" width="780"><tbody>
<tr><td width="780">
<p align="center">
<font color="#999999" face="verdana,arial" size="1">Copyright
<p align="center"><font color="#999999" face="verdana,arial" size="1">Copyright
1999-2000 BP6.com, All rights reserved.<br>Got news? Send it to </font><a href="mailto:tim@bp6.com"><font color="white" face="Verdana" size="1">Tim</font></a> </p>
</td></tr>
<!-- <TR> <TD WIDTH="780"> <P ALIGN="CENTER"><FONT SIZE="1" COLOR="#999999" FACE="Verdana,arial">Site design by Tim Brinkley</FONT> </TD> </TR> -->
......
......@@ -30,9 +30,7 @@
<p>This section provides complementary or late-breaking
information to supplement the Microsoft FrontPage Server Extensions documentation.</p>
<p>
<a href="#apache">Apache 1.3.4 Support</a><br><a href="#upgrading">Upgrading from previous version of FrontPage Server Extensions</a><br><a href="#executables">Uploading files into executable folders</a>
</p>
<p><a href="#apache">Apache 1.3.4 Support</a><br><a href="#upgrading">Upgrading from previous version of FrontPage Server Extensions</a><br><a href="#executables">Uploading files into executable folders</a></p>
<p align="right"><font size="1"><a href="#top">Top of Page</a></font></p>
......@@ -106,9 +104,7 @@ see the FrontPage 2000 Server Extensions Resource Kit at <a href="http://officeu
<p>This section lists sources of more information about the
FrontPage Server Extensions.</p>
<p>
<a href="#serk">Server Extensions Resource Kit</a><br><a href="#serkupdate">Server Extensions Resource Kit Update</a><br><a href="#kb">Knowledge Base</a>
</p>
<p><a href="#serk">Server Extensions Resource Kit</a><br><a href="#serkupdate">Server Extensions Resource Kit Update</a><br><a href="#kb">Knowledge Base</a></p>
<p align="right"><font size="1"><a href="#top">Top of Page</a></font></p>
......
......@@ -254,8 +254,7 @@
<p>
<font size="1" face="Verdana, Arial, Helvetica, " color="#000000">Powered by <a href="http://r.wired.com/r/wn_nav_c_bn/http://barnesandnoble.bfast.com/booklink/click?sourceid=383471">barnesandnoble.com</a>
</font>
<br clear="all">
</p>
<br clear="all"></p>
</td>
</tr>
</table>
......@@ -352,8 +351,7 @@ or <a href="/news/pointcast/0,1366,,00.html">PointCast</a></font><br><!-- TRACKI
<td align="left" valign="top">
<img src="http://static.wired.com/news/images/spacer.gif" height="5" width="5" alt=""><br><!-- 31942 --><font size="2" face="Arial, Helvetica, sans-serif" color="#000000"><b>F&uuml;hrer Furor</b></font><br><font size="1" face="Arial, Geneva, sans-serif" color="#000000"><p>
Contruction workers in Berlin opened an old wound in the German psyche this week when they accidentally stumbled across Adolf Hitler's bunker while excavating near the Brandenburg Gate. The bunker, just south of the Gate, was where Hitler and his closest associates barricaded themselves as the Red Army approached Berlin in the waning days of World War II. It is also where the F&uuml;hrer and his bride, Eva Braun, committed suicide rather than fall into the hands of the Russians. Although the bunker's location has never been a mystery, it has been sealed off since the end of the war to keep neo-Nazis from turning it into a shrine.
<br>
</p>
<br></p>
<li>More from <a href="http://www.lycos.com/news/flash/hitlerbunker.html?v=wn1015&amp;lpv=1">Lycos</a>
</li></font><br><br>
</td>
......@@ -368,8 +366,7 @@ Contruction workers in Berlin opened an old wound in the German psyche this week
<tr>
<td valign="TOP" align="LEFT">
<img src="http://static.wired.com/news/images/spacer.gif" height="1" width="280" alt=""><br><!-- FOOTER --><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" border="0" usemap="#navstrip.map" alt=""><br><img src="http://static.wired.com/news/images/navstrip_off.gif" height="17" width="126" usemap="#navstrip.map" border="0" alt=""><br><br><p>
<font face="Verdana, Arial, Geneva, sans-serif" size="1">
<img src="http://static.wired.com/news/images/spacer.gif" height="1" width="280" alt=""><br><!-- FOOTER --><br><img src="http://static.wired.com/news/images/pix155.gif" height="10" width="155" border="0" usemap="#navstrip.map" alt=""><br><img src="http://static.wired.com/news/images/navstrip_off.gif" height="17" width="126" usemap="#navstrip.map" border="0" alt=""><br><br><p><font face="Verdana, Arial, Geneva, sans-serif" size="1">
<a href="http://www.wired.com/news/feedback.html">Send us feedback</a>
&nbsp;|&nbsp;
<a href="http://www.hotwired.com/jobs/">Work at Wired Digital</a>
......@@ -381,15 +378,13 @@ Contruction workers in Berlin opened an old wound in the German psyche this week
</p>
<p>
<font face="Verdana, Arial, Geneva" size="1"><a href="http://www.wired.com/home/copyright.html">Copyright</a> &copy; 1994-99 Wired Digital Inc. All rights reserved.</font>
<p><font face="Verdana, Arial, Geneva" size="1"><a href="http://www.wired.com/home/copyright.html">Copyright</a> &copy; 1994-99 Wired Digital Inc. All rights reserved.</font>
<br><!-- TRACKING --><img src="http://www.wired.com/special/modx/news.gif" height="1" width="1" alt=""><map name="navstrip.map"><area shape="rect" coords="0,0,14,16" href="/news">
<area shape="rect" coords="15,0 31,16" href="/news/business/">
<area shape="rect" coords="32,0,48,16" href="/news/culture/">
<area shape="rect" coords="49,0,65,16" href="/news/technology/">
<area shape="rect" coords="66,0,83,16" href="/news/politics/"></map>
</p>
<area shape="rect" coords="66,0,83,16" href="/news/politics/"></map></p>
</td>
<td valign="TOP" align="LEFT">
<img src="http://static.wired.com/news/images/spacer.gif" height="1" width="5" alt="">
......
......@@ -128,6 +128,7 @@ static int repeat = 0;
static int insert = 0;
#ifdef LIBXML_HTML_ENABLED
static int html = 0;
static int xmlout = 0;
#endif
static int htmlout = 0;
#ifdef LIBXML_PUSH_ENABLED
......@@ -1052,6 +1053,45 @@ static void parseAndPrintFile(char *filename, xmlParserCtxtPtr rectxt) {
if ((timing) && (!repeat)) {
startTimer();
}
#ifdef LIBXML_VALID_ENABLED
if ((html) && (!xmlout)) {
if (compress) {
htmlSaveFile(output ? output : "-", doc);
}
else if (encoding != NULL) {
if ( format ) {
htmlSaveFileFormat(output ? output : "-", doc, encoding, 1);
}
else {
htmlSaveFileFormat(output ? output : "-", doc, encoding, 0);
}
}
else if (format) {
htmlSaveFileFormat(output ? output : "-", doc, NULL, 1);
}
else {
FILE *out;
if (output == NULL)
out = stdout;
else {
out = fopen(output,"wb");
}
if (out != NULL) {
if (htmlDocDump(out, doc) < 0)
progresult = 6;
if (output != NULL)
fclose(out);
} else {
fprintf(stderr, "failed to open %s\n", output);
progresult = 6;
}
}
if ((timing) && (!repeat)) {
endTimer("Saving");
}
} else
#endif
#ifdef HAVE_SYS_MMAN_H
if (memory) {
xmlChar *result;
......@@ -1390,6 +1430,7 @@ static void usage(const char *name) {
#endif /* LIBXML_OUTPUT_ENABLED */
#ifdef LIBXML_HTML_ENABLED
printf("\t--html : use the HTML parser\n");
printf("\t--xmlout : force to use the XML serializer when using --html\n");
#endif
#ifdef LIBXML_PUSH_ENABLED
printf("\t--push : use the push mode of the parser\n");
......@@ -1521,6 +1562,10 @@ main(int argc, char **argv) {
(!strcmp(argv[i], "--html"))) {
html++;
}
else if ((!strcmp(argv[i], "-xmlout")) ||
(!strcmp(argv[i], "--xmlout"))) {
xmlout++;
}
#endif /* LIBXML_HTML_ENABLED */
else if ((!strcmp(argv[i], "-loaddtd")) ||
(!strcmp(argv[i], "--loaddtd"))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment