mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
- valid.c test/VCM/v2[34].xml: Fixed bug #54631 added specific test
case - INSTALL: was empty added stuff from the FAQ Daniel
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Tue May 15 10:52:19 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* valid.c test/VCM/v2[34].xml: Fixed bug #54631 added specific test
|
||||||
|
case
|
||||||
|
* INSTALL: was empty added stuff from the FAQ
|
||||||
|
|
||||||
Fri May 11 19:37:30 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Fri May 11 19:37:30 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* tree.[ch]: fixing bug #54446, by cleaning some bugs in the
|
* tree.[ch]: fixing bug #54446, by cleaning some bugs in the
|
||||||
|
64
INSTALL
64
INSTALL
@ -0,0 +1,64 @@
|
|||||||
|
Extracted from the documentation:
|
||||||
|
http://xmlsoft.org/FAQ.html#Compilatio
|
||||||
|
|
||||||
|
Compilation
|
||||||
|
|
||||||
|
1.What is the process to compile libxml ?
|
||||||
|
|
||||||
|
As most UNIX libraries libxml follows the "standard":
|
||||||
|
|
||||||
|
gunzip -c xxx.tar.gz | tar xvf -
|
||||||
|
|
||||||
|
cd libxml-xxxx
|
||||||
|
|
||||||
|
./configure --help
|
||||||
|
|
||||||
|
to see the options, then the compilation/installation proper
|
||||||
|
|
||||||
|
./configure [possible options]
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
At that point you may have to rerun ldconfig or similar utility to
|
||||||
|
update your list of installed shared libs.
|
||||||
|
|
||||||
|
2.What other libraries are needed to compile/install libxml ?
|
||||||
|
|
||||||
|
Libxml does not requires any other library, the normal C ANSI API
|
||||||
|
should be sufficient (please report any violation to this rule you
|
||||||
|
may find).
|
||||||
|
|
||||||
|
However if found at configuration time libxml will detect and use
|
||||||
|
the following libs:
|
||||||
|
|
||||||
|
libz: a highly portable and available widely compression library
|
||||||
|
http://www.info-zip.org/pub/infozip/zlib/
|
||||||
|
iconv: a powerful character encoding conversion library. It's
|
||||||
|
included by default on recent glibc libraries, so it doesn't
|
||||||
|
need to be installed specifically on linux. It seems it's
|
||||||
|
now part of the official UNIX specification. Here is one
|
||||||
|
implementation of the library which source can be found here.
|
||||||
|
http://clisp.cons.org/~haible/packages-libiconv.html
|
||||||
|
ftp://ftp.ilog.fr/pub/Users/haible/gnu/
|
||||||
|
|
||||||
|
3.libxml does not compile with HP-UX's optional ANSI-C compiler
|
||||||
|
|
||||||
|
this is due to macro limitations. Try to add " -Wp,-H16800 -Ae"
|
||||||
|
to the CFLAGS
|
||||||
|
|
||||||
|
you can also install and use gcc instead or use a precompiled version
|
||||||
|
of libxml, both available from the HP-UX Porting and Archive Centre
|
||||||
|
|
||||||
|
4.make check fails on some platforms
|
||||||
|
|
||||||
|
Sometime the regression tests results don't completely match the
|
||||||
|
value produced by the parser, and the makefile uses diff to print
|
||||||
|
the delta. On some platforms the diff return breaks the compilation
|
||||||
|
process, if the diff is small this is probably not a serious problem
|
||||||
|
|
||||||
|
Daniel
|
||||||
|
veillard@redhat.com
|
||||||
|
|
||||||
|
$Id$
|
||||||
|
10
test/VCM/v23.xml
Normal file
10
test/VCM/v23.xml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE doc [
|
||||||
|
<!ELEMENT doc (a?, (b, c?)?, d)>
|
||||||
|
<!ELEMENT a EMPTY>
|
||||||
|
<!ELEMENT b EMPTY>
|
||||||
|
<!ELEMENT c EMPTY>
|
||||||
|
<!ELEMENT d EMPTY>
|
||||||
|
]>
|
||||||
|
<doc>
|
||||||
|
<d/>
|
||||||
|
</doc>
|
16
test/VCM/v24.xml
Normal file
16
test/VCM/v24.xml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE doc [
|
||||||
|
<!ELEMENT doc (a?, (b, c?, d?)?, (e | f | g)*, (h+ | i | j+))>
|
||||||
|
<!ELEMENT a EMPTY>
|
||||||
|
<!ELEMENT b EMPTY>
|
||||||
|
<!ELEMENT c EMPTY>
|
||||||
|
<!ELEMENT d EMPTY>
|
||||||
|
<!ELEMENT e EMPTY>
|
||||||
|
<!ELEMENT f EMPTY>
|
||||||
|
<!ELEMENT g EMPTY>
|
||||||
|
<!ELEMENT h EMPTY>
|
||||||
|
<!ELEMENT i EMPTY>
|
||||||
|
<!ELEMENT j EMPTY>
|
||||||
|
]>
|
||||||
|
<doc>
|
||||||
|
<i/>
|
||||||
|
</doc>
|
15
valid.c
15
valid.c
@ -23,6 +23,8 @@
|
|||||||
#include <libxml/xmlerror.h>
|
#include <libxml/xmlerror.h>
|
||||||
#include <libxml/list.h>
|
#include <libxml/list.h>
|
||||||
|
|
||||||
|
/* #define DEBUG_VALID_ALGO */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Generic function for accessing stacks in the Validity Context
|
* Generic function for accessing stacks in the Validity Context
|
||||||
*/
|
*/
|
||||||
@ -137,8 +139,6 @@ vstateVPop(xmlValidCtxtPtr ctxt) {
|
|||||||
|
|
||||||
PUSH_AND_POP(static, xmlNodePtr, node)
|
PUSH_AND_POP(static, xmlNodePtr, node)
|
||||||
|
|
||||||
/* #define DEBUG_VALID_ALGO */
|
|
||||||
|
|
||||||
#ifdef DEBUG_VALID_ALGO
|
#ifdef DEBUG_VALID_ALGO
|
||||||
static void
|
static void
|
||||||
xmlValidPrintNode(xmlNodePtr cur) {
|
xmlValidPrintNode(xmlNodePtr cur) {
|
||||||
@ -3278,7 +3278,6 @@ xmlValidateSkipIgnorable(xmlNodePtr child) {
|
|||||||
static int
|
static int
|
||||||
xmlValidateElementType(xmlValidCtxtPtr ctxt) {
|
xmlValidateElementType(xmlValidCtxtPtr ctxt) {
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
int consumed = 1;
|
|
||||||
int determinist = 1;
|
int determinist = 1;
|
||||||
|
|
||||||
NODE = xmlValidateSkipIgnorable(NODE);
|
NODE = xmlValidateSkipIgnorable(NODE);
|
||||||
@ -3306,7 +3305,6 @@ cont:
|
|||||||
DEBUG_VALID_MSG("restaured parent branch");
|
DEBUG_VALID_MSG("restaured parent branch");
|
||||||
DEBUG_VALID_STATE(NODE, CONT)
|
DEBUG_VALID_STATE(NODE, CONT)
|
||||||
ret = 1;
|
ret = 1;
|
||||||
consumed = 0;
|
|
||||||
goto analyze;
|
goto analyze;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3315,8 +3313,7 @@ cont:
|
|||||||
* we may have to save a backup state here. This is the equivalent
|
* we may have to save a backup state here. This is the equivalent
|
||||||
* of handling epsilon transition in NFAs.
|
* of handling epsilon transition in NFAs.
|
||||||
*/
|
*/
|
||||||
if ((consumed) && (CONT != NULL) &&
|
if ((CONT != NULL) &&
|
||||||
(CONT->parent != NULL) &&
|
|
||||||
((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
|
((CONT->ocur == XML_ELEMENT_CONTENT_MULT) ||
|
||||||
(CONT->ocur == XML_ELEMENT_CONTENT_OPT) ||
|
(CONT->ocur == XML_ELEMENT_CONTENT_OPT) ||
|
||||||
((CONT->ocur == XML_ELEMENT_CONTENT_PLUS) && (OCCURENCE)))) {
|
((CONT->ocur == XML_ELEMENT_CONTENT_PLUS) && (OCCURENCE)))) {
|
||||||
@ -3350,7 +3347,6 @@ cont:
|
|||||||
} while ((NODE != NULL) &&
|
} while ((NODE != NULL) &&
|
||||||
((NODE->type != XML_ELEMENT_NODE) &&
|
((NODE->type != XML_ELEMENT_NODE) &&
|
||||||
(NODE->type != XML_TEXT_NODE)));
|
(NODE->type != XML_TEXT_NODE)));
|
||||||
consumed = 1;
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
@ -3381,7 +3377,6 @@ cont:
|
|||||||
} while ((NODE != NULL) &&
|
} while ((NODE != NULL) &&
|
||||||
((NODE->type != XML_ELEMENT_NODE) &&
|
((NODE->type != XML_ELEMENT_NODE) &&
|
||||||
(NODE->type != XML_TEXT_NODE)));
|
(NODE->type != XML_TEXT_NODE)));
|
||||||
consumed = 1;
|
|
||||||
} else {
|
} else {
|
||||||
DEBUG_VALID_MSG("element failed");
|
DEBUG_VALID_MSG("element failed");
|
||||||
ret = 0;
|
ret = 0;
|
||||||
@ -3442,7 +3437,6 @@ analyze:
|
|||||||
}
|
}
|
||||||
if (cur != ctxt->vstate->node)
|
if (cur != ctxt->vstate->node)
|
||||||
determinist = -3;
|
determinist = -3;
|
||||||
consumed = 0;
|
|
||||||
goto cont;
|
goto cont;
|
||||||
case XML_ELEMENT_CONTENT_PLUS:
|
case XML_ELEMENT_CONTENT_PLUS:
|
||||||
if (OCCURENCE == 0) {
|
if (OCCURENCE == 0) {
|
||||||
@ -3454,7 +3448,6 @@ analyze:
|
|||||||
}
|
}
|
||||||
if (cur != ctxt->vstate->node)
|
if (cur != ctxt->vstate->node)
|
||||||
determinist = -3;
|
determinist = -3;
|
||||||
consumed = 0;
|
|
||||||
goto cont;
|
goto cont;
|
||||||
}
|
}
|
||||||
DEBUG_VALID_MSG("Plus branch found");
|
DEBUG_VALID_MSG("Plus branch found");
|
||||||
@ -3569,7 +3562,6 @@ analyze:
|
|||||||
}
|
}
|
||||||
if (cur != ctxt->vstate->node)
|
if (cur != ctxt->vstate->node)
|
||||||
determinist = -3;
|
determinist = -3;
|
||||||
consumed = 0;
|
|
||||||
goto cont;
|
goto cont;
|
||||||
}
|
}
|
||||||
if (ret == 0) {
|
if (ret == 0) {
|
||||||
@ -3581,7 +3573,6 @@ analyze:
|
|||||||
DEBUG_VALID_MSG("exhaustion, failed");
|
DEBUG_VALID_MSG("exhaustion, failed");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
consumed = 0;
|
|
||||||
if (cur != ctxt->vstate->node)
|
if (cur != ctxt->vstate->node)
|
||||||
determinist = -3;
|
determinist = -3;
|
||||||
goto cont;
|
goto cont;
|
||||||
|
Reference in New Issue
Block a user