patch from Mark Vakoc for regression tests on Windows. the NaN problem
* win32/Makefile.msvc: patch from Mark Vakoc for regression tests
on Windows.
* xpath.c: the NaN problem also shows up on Borland
Daniel
diff --git a/ChangeLog b/ChangeLog
index 9263e59..6d0f51f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Apr 29 17:05:00 CEST 2004 Daniel Veillard <daniel@veillard.com>
+
+ * win32/Makefile.msvc: patch from Mark Vakoc for regression tests
+ on Windows.
+ * xpath.c: the NaN problem also shows up on Borland
+
Mon Apr 26 23:37:12 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xmlregexp.c: enhanced xmlFARegExec range evaluation for min
diff --git a/config.h.in b/config.h.in
index f54d0bf..915ef0c 100644
--- a/config.h.in
+++ b/config.h.in
@@ -256,7 +256,7 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define to 1 if the C compiler supports function prototypes. */
+/* Define if compiler has function prototypes */
#undef PROTOTYPES
/* Determine what socket length (socklen_t) data type is */
@@ -274,9 +274,6 @@
/* Using the Win32 Socket implementation */
#undef _WINSOCKAPI_
-/* Define like PROTOTYPES; this can be used by system headers. */
-#undef __PROTOTYPES
-
/* Win32 Std C name mangling work-around */
#undef snprintf
diff --git a/doc/index.html b/doc/index.html
index 7621bbc..d48e1c3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -12,8 +12,7 @@
H3 {font-family: Verdana,Arial,Helvetica}
A:link, A:visited, A:active { text-decoration: underline }
</style>
- <title>The XML C parser and toolkit of Gnome
-</title>
+ <title>The XML C parser and toolkit of Gnome</title>
</head>
<body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000">
<table border="0" width="100%" cellpadding="5" cellspacing="0" align="center">
@@ -46,10 +45,8 @@
<table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd">
<tr>
<td align="center">
- <h1>The XML C parser and toolkit of Gnome
-</h1>
- <h2>libxml
-</h2>
+ <h1>The XML C parser and toolkit of Gnome</h1>
+ <h2>libxml</h2>
</td>
</tr>
</table>
@@ -72,8 +69,7 @@
<tr>
<td colspan="1" bgcolor="#eecfa1" align="center">
<center>
- <b>Main Menu
-</b>
+ <b>Main Menu</b>
</center>
</td>
</tr>
@@ -85,76 +81,58 @@
</form>
<ul>
<li>
- <a href="index.html">Home
-</a>
+ <a href="index.html">Home</a>
</li>
<li>
- <a href="intro.html">Introduction
-</a>
+ <a href="intro.html">Introduction</a>
</li>
<li>
- <a href="FAQ.html">FAQ
-</a>
+ <a href="FAQ.html">FAQ</a>
</li>
<li>
- <a href="docs.html" style="font-weight:bold">Developer Menu
-</a>
+ <a href="docs.html" style="font-weight:bold">Developer Menu</a>
</li>
<li>
- <a href="bugs.html">Reporting bugs and getting help
-</a>
+ <a href="bugs.html">Reporting bugs and getting help</a>
</li>
<li>
- <a href="help.html">How to help
-</a>
+ <a href="help.html">How to help</a>
</li>
<li>
- <a href="downloads.html">Downloads
-</a>
+ <a href="downloads.html">Downloads</a>
</li>
<li>
- <a href="news.html">News
-</a>
+ <a href="news.html">News</a>
</li>
<li>
- <a href="XMLinfo.html">XML
-</a>
+ <a href="XMLinfo.html">XML</a>
</li>
<li>
- <a href="XSLT.html">XSLT
-</a>
+ <a href="XSLT.html">XSLT</a>
</li>
<li>
- <a href="xmldtd.html">Validation & DTDs
-</a>
+ <a href="xmldtd.html">Validation & DTDs</a>
</li>
<li>
- <a href="encoding.html">Encodings support
-</a>
+ <a href="encoding.html">Encodings support</a>
</li>
<li>
- <a href="catalog.html">Catalog support
-</a>
+ <a href="catalog.html">Catalog support</a>
</li>
<li>
- <a href="namespaces.html">Namespaces
-</a>
+ <a href="namespaces.html">Namespaces</a>
</li>
<li>
- <a href="contribs.html">Contributions
-</a>
+ <a href="contribs.html">Contributions</a>
</li>
<li>
- <a href="examples/index.html" style="font-weight:bold">Code Examples
-</a>
+ <a href="examples/index.html" style="font-weight:bold">Code Examples</a>
</li>
<li>
- <a href="html/index.html" style="font-weight:bold">API Menu
-</a>
+ <a href="html/index.html" style="font-weight:bold">API Menu</a>
</li>
<li>
- <a href="guidelines.html">XML Guidelines
-</a>
+ <a href="guidelines.html">XML Guidelines</a>
</li>
</ul>
</td>
@@ -164,8 +142,7 @@
<tr>
<td colspan="1" bgcolor="#eecfa1" align="center">
<center>
- <b>Related links
-</b>
+ <b>Related links</b>
</center>
</td>
</tr>
@@ -173,44 +150,34 @@
<td bgcolor="#fffacd">
<ul>
<li>
- <a href="http://mail.gnome.org/archives/xml/">Mail archive
-</a>
+ <a href="http://mail.gnome.org/archives/xml/">Mail archive</a>
</li>
<li>
- <a href="http://xmlsoft.org/XSLT/">XSLT libxslt
-</a>
+ <a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a>
</li>
<li>
- <a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2
-</a>
+ <a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a>
</li>
<li>
- <a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec
-</a>
+ <a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a>
</li>
<li>
- <a href="ftp://xmlsoft.org/">FTP
-</a>
+ <a href="ftp://xmlsoft.org/">FTP</a>
</li>
<li>
- <a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries
-</a>
+ <a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a>
</li>
<li>
- <a href="http://garypennington.net/libxml2/">Solaris binaries
-</a>
+ <a href="http://garypennington.net/libxml2/">Solaris binaries</a>
</li>
<li>
- <a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries
-</a>
+ <a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a>
</li>
<li>
- <a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings
-</a>
+ <a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a>
</li>
<li>
- <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker
-</a>
+ <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a>
</li>
</ul>
</td>
@@ -232,227 +199,77 @@
<td bgcolor="#fffacd">
<p></p>
<p style="text-align: right; font-style: italic; font-size: 10pt">"Programming
-with libxml2 is like the thrilling embrace of an exotic stranger."
- <a href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark
-Pilgrim
-</a>
-</p>
+with libxml2 is like the thrilling embrace of an exotic stranger." <a href="http://diveintomark.org/archives/2004/02/18/libxml2">Mark
+Pilgrim</a></p>
<p>Libxml2 is the XML C parser and toolkit developed for the Gnome project
(but usable outside of the Gnome platform), it is free software available
-under the
- <a href="http://www.opensource.org/licenses/mit-license.html">MIT
-License
-</a>
-. XML itself is a metalanguage to design markup languages, i.e.
+under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
+License</a>. XML itself is a metalanguage to design markup languages, i.e.
text language where semantic and structure are added to the content using
extra "markup" information enclosed between angle brackets. HTML is the most
-well-known markup language. Though the library is written in C
- <a href="python.html">a variety of language bindings
-</a>
- make it available in
-other environments.
-</p>
+well-known markup language. Though the library is written in C <a href="python.html">a variety of language bindings</a> make it available in
+other environments.</p>
<p>Libxml2 is known to be very portable, the library should build and work
without serious troubles on a variety of systems (Linux, Unix, Windows,
-CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)
-</p>
+CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, ...)</p>
<p>Libxml2 implements a number of existing standards related to markup
-languages:
-</p>
- <ul> <li>the XML standard:
- <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml
-</a>
-</li>
-
-
- <li>Namespaces in XML:
- <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/
-</a>
-</li>
-
-
- <li>XML Base:
- <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/
-</a>
-</li>
-
-
- <li> <a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396
-</a>
- :
- Uniform Resource Identifiers
- <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt
-</a>
-</li>
-
-
- <li>XML Path Language (XPath) 1.0:
- <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath
-</a>
-</li>
-
-
- <li>HTML4 parser:
- <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/
-</a>
-</li>
-
-
- <li>XML Pointer Language (XPointer) Version 1.0:
- <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr
-</a>
-</li>
-
-
- <li>XML Inclusions (XInclude) Version 1.0:
- <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/
-</a>
-</li>
-
-
- <li>ISO-8859-x encodings, as well as
- <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044
-</a>
- [UTF-8]
- and
- <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781
-</a>
-
- [UTF-16] Unicode encodings, and more if using iconv support
-</li>
-
-
- <li>part of SGML Open Technical Resolution TR9401:1997
-</li>
-
-
- <li>XML Catalogs Working Draft 06 August 2001:
- <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
-</a>
-</li>
-
-
- <li>Canonical XML Version 1.0:
- <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n
-</a>
-
- and the Exclusive XML Canonicalization CR draft
- <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n
-</a>
-</li>
-
-
- <li>Relax NG, ISO/IEC 19757-2:2003,
- <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html
-</a>
-</li>
-
-
- <li>W3C XML Schemas Part 2: Datatypes
- <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
- 2001
-</a>
-</li>
-
-
- <li>W3C
- <a href="http://www.w3.org/TR/xml-id/">xml:id
-</a>
- Working Draft 7
- April 2004
-</li>
-
-
+languages:</p>
+ <ul><li>the XML standard: <a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a></li>
+ <li>Namespaces in XML: <a href="http://www.w3.org/TR/REC-xml-names/">http://www.w3.org/TR/REC-xml-names/</a></li>
+ <li>XML Base: <a href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a></li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc2396.txt">RFC 2396</a> :
+ Uniform Resource Identifiers <a href="http://www.ietf.org/rfc/rfc2396.txt">http://www.ietf.org/rfc/rfc2396.txt</a></li>
+ <li>XML Path Language (XPath) 1.0: <a href="http://www.w3.org/TR/xpath">http://www.w3.org/TR/xpath</a></li>
+ <li>HTML4 parser: <a href="http://www.w3.org/TR/html401/">http://www.w3.org/TR/html401/</a></li>
+ <li>XML Pointer Language (XPointer) Version 1.0: <a href="http://www.w3.org/TR/xptr">http://www.w3.org/TR/xptr</a></li>
+ <li>XML Inclusions (XInclude) Version 1.0: <a href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</a></li>
+ <li>ISO-8859-x encodings, as well as <a href="http://www.cis.ohio-state.edu/rfc/rfc2044.txt">rfc2044</a> [UTF-8]
+ and <a href="http://www.cis.ohio-state.edu/rfc/rfc2781.txt">rfc2781</a>
+ [UTF-16] Unicode encodings, and more if using iconv support</li>
+ <li>part of SGML Open Technical Resolution TR9401:1997</li>
+ <li>XML Catalogs Working Draft 06 August 2001: <a href="http://www.oasis-open.org/committees/entity/spec-2001-08-06.html">http://www.oasis-open.org/committees/entity/spec-2001-08-06.html</a></li>
+ <li>Canonical XML Version 1.0: <a href="http://www.w3.org/TR/xml-c14n">http://www.w3.org/TR/xml-c14n</a>
+ and the Exclusive XML Canonicalization CR draft <a href="http://www.w3.org/TR/xml-exc-c14n">http://www.w3.org/TR/xml-exc-c14n</a></li>
+ <li>Relax NG, ISO/IEC 19757-2:2003, <a href="http://www.oasis-open.org/committees/relax-ng/spec-20011203.html">http://www.oasis-open.org/committees/relax-ng/spec-20011203.html</a></li>
+ <li>W3C XML Schemas Part 2: Datatypes <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/">REC 02 May
+ 2001</a></li>
+ <li>W3C <a href="http://www.w3.org/TR/xml-id/">xml:id</a> Working Draft 7
+ April 2004</li>
</ul>
<p>In most cases libxml2 tries to implement the specifications in a
relatively strictly compliant way. As of release 2.4.16, libxml2 passed all
-1800+ tests from the
- <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
-Suite
-</a>
-.
-</p>
+1800+ tests from the <a href="http://www.oasis-open.org/committees/xml-conformance/">OASIS XML Tests
+Suite</a>.</p>
<p>To some extent libxml2 provides support for the following additional
-specifications but doesn't claim to implement them completely:
-</p>
- <ul> <li>Document Object Model (DOM)
- <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/
-</a>
-
+specifications but doesn't claim to implement them completely:</p>
+ <ul><li>Document Object Model (DOM) <a href="http://www.w3.org/TR/DOM-Level-2-Core/">http://www.w3.org/TR/DOM-Level-2-Core/</a>
the document model, but it doesn't implement the API itself,
- gdome2 does this on top of libxml2
-</li>
-
-
- <li> <a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959
-</a>
- :
- libxml2 implements a basic FTP client code
-</li>
-
-
- <li> <a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945
-</a>
- :
- HTTP/1.0, again a basic HTTP client code
-</li>
-
-
- <li>SAX: a SAX2 like interface and a minimal SAX1 implementation compatible
- with early expat versions
-</li>
-
-
+ gdome2 does this on top of libxml2</li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc959.txt">RFC 959</a> :
+ libxml2 implements a basic FTP client code</li>
+ <li><a href="http://www.cis.ohio-state.edu/rfc/rfc1945.txt">RFC 1945</a> :
+ HTTP/1.0, again a basic HTTP client code</li>
+ <li>SAX: a SAX2 like interface and a minimal SAX1 implementation compatible
+ with early expat versions</li>
</ul>
- <p>A partial implementation of
- <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
-1: Structure
-</a>
- is being worked on but it would be far too early to make any
-conformance statement about it at the moment.
-</p>
- <p>Separate documents:
-</p>
- <ul> <li> <a href="http://xmlsoft.org/XSLT/">the libxslt page
-</a>
- providing an
+ <p>A partial implementation of <a href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schemas Part
+1: Structure</a> is being worked on but it would be far too early to make any
+conformance statement about it at the moment.</p>
+ <p>Separate documents:</p>
+ <ul><li><a href="http://xmlsoft.org/XSLT/">the libxslt page</a> providing an
implementation of XSLT 1.0 and common extensions like EXSLT for
- libxml2
-</li>
-
-
- <li> <a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 page
-</a>
-
- : a standard DOM2 implementation for libxml2
-</li>
-
-
- <li> <a href="http://www.aleksey.com/xmlsec/">the XMLSec page
-</a>
-: an
- implementation of
- <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
- Digital Signature
-</a>
- for libxml2
-</li>
-
-
- <li>also check the related links section below for more related and active
- projects.
-</li>
-
-
+ libxml2</li>
+ <li><a href="http://www.cs.unibo.it/~casarini/gdome2/">the gdome2 page</a>
+ : a standard DOM2 implementation for libxml2</li>
+ <li><a href="http://www.aleksey.com/xmlsec/">the XMLSec page</a>: an
+ implementation of <a href="http://www.w3.org/TR/xmldsig-core/">W3C XML
+ Digital Signature</a> for libxml2</li>
+ <li>also check the related links section below for more related and active
+ projects.</li>
</ul>
- <p>Logo designed by
- <a href="mailto:liyanage@access.ch">Marc Liyanage
-</a>
-.
-</p>
+ <p>Logo designed by <a href="mailto:liyanage@access.ch">Marc Liyanage</a>.</p>
<p>
- <a href="bugs.html">Daniel Veillard
-</a>
+ <a href="bugs.html">Daniel Veillard</a>
</p>
</td>
</tr>
diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
index 17e5df6..83b222e 100644
--- a/win32/Makefile.msvc
+++ b/win32/Makefile.msvc
@@ -297,7 +297,48 @@
# Builds xmllint and friends. Uses the implicit rule for commands.
$(UTILS) : $(UTILS_INTDIR) $(BINDIR) libxml libxmla
-
# Source dependences should be autogenerated somehow here, but how to
# do it? I have no clue.
+# TESTS
+
+tests : XPathtests
+
+XPathtests:
+ @echo. 2> .memdump
+ @echo ## XPath regression tests
+ @-$(BINDIR)\testXPath.exe | find /C "support not compiled in" 1>nul
+ @if %ERRORLEVEL% NEQ 0 @( \
+ echo Skipping debug not compiled in\
+ @exit 0 \
+ )
+ @for %%I in ($(XML_SRCDIR)\test\XPath\expr\*.*) do @( \
+ @IF NOT EXIST $(XML_SRCDIR)\result\XPath\expr\%%~nI ( \
+ @echo New test %%~nI &&\
+ @echo %%~nI &&\
+ $(BINDIR)\testXPath.exe -f --expr %%I > $(XML_SRCDIR)/result/XPath/expr/%%~nI &&\
+ findstr /C:"MEMORY ALLOCATED : 0" \
+ ) ELSE ( \
+ $(BINDIR)\testXPath.exe -f --expr %%I 2>&1 > result.%%~nI &&\
+ fc $(XML_SRCDIR)\result\XPath\expr\%%~nI result.%%~nI >nul &\
+ iF ERRORLEVEL 1 exit 1 & \
+ findstr "MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" >nul &&\
+ del result.%%~nI \
+ ) \
+ )
+ @for %%I in ($(XML_SRCDIR)\test\XPath\docs\*.*) do @( \
+ for %%J in ($(XML_SRCDIR)\test\XPath\tests\%%~nI*.*) do @( \
+ if not exist $(XML_SRCDIR)\result\XPath\tests\%%~nJ ( \
+ $(BINDIR)\testXPath.exe -f -i %%I %%J > $(XML_SRCDIR)\result\XPath\tests\%%~nJ &&\
+ findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0" > nul \
+ ) ELSE ( \
+ $(BINDIR)\testXPAth.exe -f -i %%I %%J 2>&1 > result.%%~nJ &&\
+ findstr /C:"MEMORY ALLOCATED" .memdump | findstr /C:"MEMORY ALLOCATED : 0">null &&\
+ fc $(XML_SRCDIR)\result\XPath\tests\%%~nJ result.%%~nJ >null & \
+ IF ERRORLEVEL 1 (echo Error: %%I %%J & exit 1) & \
+ del result.%%~nJ \
+ )\
+ )\
+ )
+
+
diff --git a/xpath.c b/xpath.c
index d6d65e7..c964e37 100644
--- a/xpath.c
+++ b/xpath.c
@@ -10922,7 +10922,7 @@
case XPATH_BOOLEAN:
return(res->boolval);
case XPATH_NUMBER:
-#if defined(_MSC_VER) && (_MSC_VER == 1200)
+#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER == 1200))
return((res->floatval == ctxt->context->proximityPosition) &&
(!xmlXPathIsNaN(res->floatval))); /* MSC pbm Mark Vakoc !*/
#else