- xpath.c: trying to get 52979 solved

- tree.c result/ result/noent/: trying to get 52712 solved, this
  also made me clean up the fact that XML output in general should
  not add formating blanks by default, this changed the output of
  a few tests
Daniel
This commit is contained in:
Daniel Veillard 2001-04-10 16:38:06 +00:00
parent 73639a73c5
commit 1731d6ae0a
17 changed files with 34 additions and 67 deletions

View File

@ -1,3 +1,11 @@
Tue Apr 10 18:13:10 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c: trying to get 52979 solved
* tree.c result/ result/noent/: trying to get 52712 solved, this
also made me clean up the fact that XML output in general should
not add formating blanks by default, this changed the output of
a few tests
Tue Apr 10 16:30:20 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr> Tue Apr 10 16:30:20 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c: Bill Brack pointer an error in detecting a null nodeset * xpath.c: Bill Brack pointer an error in detecting a null nodeset

View File

@ -6,8 +6,4 @@
<!ELEMENT c (#PCDATA)> <!ELEMENT c (#PCDATA)>
<!ELEMENT d (#PCDATA)> <!ELEMENT d (#PCDATA)>
]> ]>
<doc> <doc><b>This</b><c> is a</c><d> valid document</d></doc>
<b>This</b>
<c> is a</c>
<d> valid document</d>
</doc>

View File

@ -4,8 +4,4 @@
<!ELEMENT a (#PCDATA)> <!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)> <!ELEMENT b (#PCDATA)>
]> ]>
<doc> <doc><a>This</a><b> is a valid</b><a> document</a></doc>
<a>This</a>
<b> is a valid</b>
<a> document</a>
</doc>

View File

@ -4,7 +4,4 @@
<!ELEMENT a (#PCDATA)> <!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)> <!ELEMENT b (#PCDATA)>
]> ]>
<doc> <doc><a>This</a><b> is a valid document</b></doc>
<a>This</a>
<b> is a valid document</b>
</doc>

View File

@ -6,7 +6,4 @@
<!ELEMENT c (#PCDATA)> <!ELEMENT c (#PCDATA)>
<!ELEMENT d (#PCDATA)> <!ELEMENT d (#PCDATA)>
]> ]>
<doc> <doc><b>This</b><c> is a valid document</c></doc>
<b>This</b>
<c> is a valid document</c>
</doc>

View File

@ -6,7 +6,4 @@
<!ELEMENT c (#PCDATA)> <!ELEMENT c (#PCDATA)>
<!ELEMENT d (#PCDATA)> <!ELEMENT d (#PCDATA)>
]> ]>
<doc> <doc><b>This</b><d> is a valid document</d></doc>
<b>This</b>
<d> is a valid document</d>
</doc>

View File

@ -5,6 +5,4 @@
<!ELEMENT item (para)+> <!ELEMENT item (para)+>
<!ELEMENT para (#PCDATA)> <!ELEMENT para (#PCDATA)>
]> ]>
<item> <item><para>'they called me &sampleEnt;'</para></item>
<para>'they called me &sampleEnt;'</para>
</item>

View File

@ -6,8 +6,4 @@
<!ELEMENT c (#PCDATA)> <!ELEMENT c (#PCDATA)>
<!ELEMENT d (#PCDATA)> <!ELEMENT d (#PCDATA)>
]> ]>
<doc> <doc><b>This</b><c> is a</c><d> valid document</d></doc>
<b>This</b>
<c> is a</c>
<d> valid document</d>
</doc>

View File

@ -4,8 +4,4 @@
<!ELEMENT a (#PCDATA)> <!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)> <!ELEMENT b (#PCDATA)>
]> ]>
<doc> <doc><a>This</a><b> is a valid</b><a> document</a></doc>
<a>This</a>
<b> is a valid</b>
<a> document</a>
</doc>

View File

@ -4,7 +4,4 @@
<!ELEMENT a (#PCDATA)> <!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)> <!ELEMENT b (#PCDATA)>
]> ]>
<doc> <doc><a>This</a><b> is a valid document</b></doc>
<a>This</a>
<b> is a valid document</b>
</doc>

View File

@ -6,7 +6,4 @@
<!ELEMENT c (#PCDATA)> <!ELEMENT c (#PCDATA)>
<!ELEMENT d (#PCDATA)> <!ELEMENT d (#PCDATA)>
]> ]>
<doc> <doc><b>This</b><c> is a valid document</c></doc>
<b>This</b>
<c> is a valid document</c>
</doc>

View File

@ -6,7 +6,4 @@
<!ELEMENT c (#PCDATA)> <!ELEMENT c (#PCDATA)>
<!ELEMENT d (#PCDATA)> <!ELEMENT d (#PCDATA)>
]> ]>
<doc> <doc><b>This</b><d> is a valid document</d></doc>
<b>This</b>
<d> is a valid document</d>
</doc>

View File

@ -6,5 +6,7 @@
]> ]>
<EXAMPLE> <EXAMPLE>
<title>my title</title>
This text is about XML, the Extensible Markup Language and this is an embedded <IMG src="image"/> This text is about XML, the Extensible Markup Language and this is an embedded <IMG src="image"/>
</EXAMPLE> </EXAMPLE>

View File

@ -5,6 +5,4 @@
<!ELEMENT item (para)+> <!ELEMENT item (para)+>
<!ELEMENT para (#PCDATA)> <!ELEMENT para (#PCDATA)>
]> ]>
<item> <item><para>'they called me the hyacinth girl'</para></item>
<para>'they called me the hyacinth girl'</para>
</item>

View File

@ -4,8 +4,6 @@
numerically (&#38;#38;#38;) or with a general entity numerically (&#38;#38;#38;) or with a general entity
(&amp;amp;).</p>"> (&amp;amp;).</p>">
]> ]>
<test> <test><p>An ampersand (&amp;) may be escaped
<p>An ampersand (&amp;) may be escaped
numerically (&amp;#38;) or with a general entity numerically (&amp;#38;) or with a general entity
(&amp;amp;).</p> (&amp;amp;).</p></test>
</test>

14
tree.c
View File

@ -5779,7 +5779,7 @@ xmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,
void void
xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr, xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
int * doc_txt_len, const char * txt_encoding, int * doc_txt_len, const char * txt_encoding,
int format ATTRIBUTE_UNUSED) { int format) {
int dummy = 0; int dummy = 0;
xmlCharEncoding doc_charset; xmlCharEncoding doc_charset;
@ -5842,7 +5842,7 @@ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
return; return;
} }
xmlDocContentDumpOutput(out_buff, out_doc, txt_encoding, 1); xmlDocContentDumpOutput(out_buff, out_doc, txt_encoding, format);
xmlOutputBufferFlush(out_buff); xmlOutputBufferFlush(out_buff);
if (out_buff->conv != NULL) { if (out_buff->conv != NULL) {
*doc_txt_len = out_buff->conv->use; *doc_txt_len = out_buff->conv->use;
@ -5909,7 +5909,7 @@ void
xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr, xmlDocDumpMemoryEnc(xmlDocPtr out_doc, xmlChar **doc_txt_ptr,
int * doc_txt_len, const char * txt_encoding) { int * doc_txt_len, const char * txt_encoding) {
xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len, xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len,
txt_encoding, 1); txt_encoding, 0);
} }
/** /**
@ -6011,7 +6011,7 @@ xmlDocDump(FILE *f, xmlDocPtr cur) {
} }
buf = xmlOutputBufferCreateFile(f, handler); buf = xmlOutputBufferCreateFile(f, handler);
if (buf == NULL) return(-1); if (buf == NULL) return(-1);
xmlDocContentDumpOutput(buf, cur, NULL, 1); xmlDocContentDumpOutput(buf, cur, NULL, 0);
ret = xmlOutputBufferClose(buf); ret = xmlOutputBufferClose(buf);
return(ret); return(ret);
@ -6032,7 +6032,7 @@ xmlSaveFileTo(xmlOutputBuffer *buf, xmlDocPtr cur, const char *encoding) {
int ret; int ret;
if (buf == NULL) return(0); if (buf == NULL) return(0);
xmlDocContentDumpOutput(buf, cur, encoding, 1); xmlDocContentDumpOutput(buf, cur, encoding, 0);
ret = xmlOutputBufferClose(buf); ret = xmlOutputBufferClose(buf);
return(ret); return(ret);
} }
@ -6076,7 +6076,7 @@ xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
buf = xmlOutputBufferCreateFilename(filename, handler, 0); buf = xmlOutputBufferCreateFilename(filename, handler, 0);
if (buf == NULL) return(-1); if (buf == NULL) return(-1);
xmlDocContentDumpOutput(buf, cur, encoding, 1); xmlDocContentDumpOutput(buf, cur, encoding, 0);
ret = xmlOutputBufferClose(buf); ret = xmlOutputBufferClose(buf);
return(ret); return(ret);
@ -6131,7 +6131,7 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) {
buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
if (buf == NULL) return(-1); if (buf == NULL) return(-1);
xmlDocContentDumpOutput(buf, cur, NULL, 1); xmlDocContentDumpOutput(buf, cur, NULL, 0);
ret = xmlOutputBufferClose(buf); ret = xmlOutputBufferClose(buf);
return(ret); return(ret);

View File

@ -164,14 +164,11 @@ xmlXPathInit(void) {
if (initialized) return; if (initialized) return;
xmlXPathNAN = 0; xmlXPathNAN = 0.0 / 0.0;
xmlXPathNAN /= 0;
xmlXPathPINF = 1; xmlXPathPINF = 1 / 0.0;
xmlXPathPINF /= 0;
xmlXPathNINF = -1; xmlXPathNINF = -1 / 0.0;
xmlXPathNINF /= 0;
initialized = 1; initialized = 1;
} }