Commit a464d999 authored by Mike Hommey's avatar Mike Hommey

Load /usr/tmp/tmp.CMoFff/libxml2-2.6.21 into

packages/libxml2/branches/upstream/current.
parent 112cb5bb
This diff is collapsed.
......@@ -192,16 +192,16 @@ htmlnamePop(htmlParserCtxtPtr ctxt)
const xmlChar *ret;
if (ctxt->nameNr <= 0)
return (0);
return (NULL);
ctxt->nameNr--;
if (ctxt->nameNr < 0)
return (0);
return (NULL);
if (ctxt->nameNr > 0)
ctxt->name = ctxt->nameTab[ctxt->nameNr - 1];
else
ctxt->name = NULL;
ret = ctxt->nameTab[ctxt->nameNr];
ctxt->nameTab[ctxt->nameNr] = 0;
ctxt->nameTab[ctxt->nameNr] = NULL;
return (ret);
}
......@@ -964,7 +964,6 @@ NULL
static const char *htmlNoContentElements[] = {
"html",
"head",
"body",
NULL
};
......@@ -2042,6 +2041,7 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
unsigned int i;
int j;
xmlNodePtr lastChild;
xmlDtdPtr dtd;
for (j = 0;j < len;j++)
if (!(IS_BLANK_CH(str[j]))) return(0);
......@@ -2054,8 +2054,17 @@ static int areBlanks(htmlParserCtxtPtr ctxt, const xmlChar *str, int len) {
return(1);
if (xmlStrEqual(ctxt->name, BAD_CAST"head"))
return(1);
if (xmlStrEqual(ctxt->name, BAD_CAST"body"))
return(1);
/* Only strip CDATA children of the body tag for strict HTML DTDs */
if (xmlStrEqual(ctxt->name, BAD_CAST "body") && ctxt->myDoc != NULL) {
dtd = xmlGetIntSubset(ctxt->myDoc);
if (dtd != NULL && dtd->ExternalID != NULL) {
if (!xmlStrcasecmp(dtd->ExternalID, BAD_CAST "-//W3C//DTD HTML 4.01//EN") ||
!xmlStrcasecmp(dtd->ExternalID, BAD_CAST "-//W3C//DTD HTML 4//EN"))
return(1);
}
}
if (ctxt->node == NULL) return(0);
lastChild = xmlGetLastChild(ctxt->node);
while ((lastChild) && (lastChild->type == XML_COMMENT_NODE))
......@@ -2627,12 +2636,12 @@ htmlParsePubidLiteral(htmlParserCtxtPtr ctxt) {
*/
static void
htmlParseScript(htmlParserCtxtPtr ctxt) {
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 1];
xmlChar buf[HTML_PARSER_BIG_BUFFER_SIZE + 5];
int nbchar = 0;
xmlChar cur;
int cur,l;
SHRINK;
cur = CUR;
cur = CUR_CHAR(l);
while (IS_CHAR_CH(cur)) {
if ((cur == '<') && (NXT(1) == '!') && (NXT(2) == '-') &&
(NXT(3) == '-')) {
......@@ -2648,20 +2657,39 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
}
nbchar = 0;
htmlParseComment(ctxt);
cur = CUR;
cur = CUR_CHAR(l);
continue;
} else if ((cur == '<') && (NXT(1) == '/')) {
/*
* One should break here, the specification is clear:
* Authors should therefore escape "</" within the content.
* Escape mechanisms are specific to each scripting or
* style sheet language.
*/
if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) ||
((NXT(2) >= 'a') && (NXT(2) <= 'z')))
break; /* while */
/*
* One should break here, the specification is clear:
* Authors should therefore escape "</" within the content.
* Escape mechanisms are specific to each scripting or
* style sheet language.
*
* In recovery mode, only break if end tag match the
* current tag, effectively ignoring all tags inside the
* script/style block and treating the entire block as
* CDATA.
*/
if (ctxt->recovery) {
if (xmlStrncasecmp(ctxt->name, ctxt->input->cur+2,
xmlStrlen(ctxt->name)) == 0)
{
break; /* while */
} else {
htmlParseErr(ctxt, XML_ERR_TAG_NAME_MISMATCH,
"Element %s embbeds close tag\n",
ctxt->name, NULL);
}
} else {
if (((NXT(2) >= 'A') && (NXT(2) <= 'Z')) ||
((NXT(2) >= 'a') && (NXT(2) <= 'z')))
{
break; /* while */
}
}
}
buf[nbchar++] = cur;
COPY_BUF(l,buf,nbchar,cur);
if (nbchar >= HTML_PARSER_BIG_BUFFER_SIZE) {
if (ctxt->sax->cdataBlock!= NULL) {
/*
......@@ -2673,9 +2701,10 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
}
nbchar = 0;
}
NEXT;
cur = CUR;
NEXTL(l);
cur = CUR_CHAR(l);
}
if (!(IS_CHAR_CH(cur))) {
htmlParseErrInt(ctxt, XML_ERR_INVALID_CHAR,
"Invalid char in CDATA 0x%X\n", cur);
......@@ -2743,6 +2772,8 @@ htmlParseCharData(htmlParserCtxtPtr ctxt) {
}
}
if (nbchar != 0) {
buf[nbchar] = 0;
/*
* Ok the segment is to be consumed as chars.
*/
......@@ -3578,6 +3609,15 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt)
if ((!IS_CHAR_CH(CUR)) || (CUR != '>')) {
htmlParseErr(ctxt, XML_ERR_GT_REQUIRED,
"End tag : expected '>'\n", NULL, NULL);
if (ctxt->recovery) {
/*
* We're not at the ending > !!
* Error, unless in recover mode where we search forwards
* until we find a >
*/
while (CUR != '\0' && CUR != '>') NEXT;
NEXT;
}
} else
NEXT;
......@@ -5176,10 +5216,18 @@ htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,
(ctxt->input->buf != NULL) && (ctxt->instate != XML_PARSER_EOF)) {
int base = ctxt->input->base - ctxt->input->buf->buffer->content;
int cur = ctxt->input->cur - ctxt->input->base;
int res;
xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
res = xmlParserInputBufferPush(ctxt->input->buf, size, chunk);
if (res < 0) {
ctxt->errNo = XML_PARSER_EOF;
ctxt->disableSAX = 1;
return (XML_PARSER_EOF);
}
ctxt->input->base = ctxt->input->buf->buffer->content + base;
ctxt->input->cur = ctxt->input->base + cur;
ctxt->input->end =
&ctxt->input->buf->buffer->content[ctxt->input->buf->buffer->use];
#ifdef DEBUG_PUSH
xmlGenericError(xmlGenericErrorContext, "HPP: pushed %d\n", size);
#endif
......@@ -5777,6 +5825,14 @@ htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)
ctxt->options |= XML_PARSE_NOBLANKS;
} else
ctxt->keepBlanks = 1;
if (options & HTML_PARSE_RECOVER) {
ctxt->recovery = 1;
} else
ctxt->recovery = 0;
if (options & HTML_PARSE_COMPACT) {
ctxt->options |= HTML_PARSE_COMPACT;
options -= HTML_PARSE_COMPACT;
}
ctxt->dictNames = 0;
return (options);
}
......
......@@ -552,6 +552,8 @@ htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
*size = 0;
return;
}
} else {
handler = xmlFindCharEncodingHandler(encoding);
}
}
......@@ -1026,6 +1028,8 @@ htmlDocDump(FILE *f, xmlDocPtr cur) {
handler = xmlFindCharEncodingHandler(encoding);
if (handler == NULL)
return(-1);
} else {
handler = xmlFindCharEncodingHandler(encoding);
}
}
......
......@@ -27,7 +27,8 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
catalog.c globals.c threads.c c14n.c xmlstring.c \
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \
xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c
xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
xmlmodule.c schematron.c
else
libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
......@@ -37,7 +38,7 @@ libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
xmlreader.c relaxng.c dict.c SAX2.c \
xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
xmlmodule.c
xmlmodule.c schematron.c
endif
DEPS = $(top_builddir)/libxml2.la
......@@ -158,7 +159,7 @@ check-local: all tests
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@
tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_SCHEMATRON@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@
@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \
$(MAKE) MAKEFLAGS+=--silent tests ; fi)
@(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
......@@ -821,6 +822,21 @@ Regexptests: testRegexp$(EXEEXT)
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
@echo "## Formal expresssions regression tests"
-@(for i in $(srcdir)/test/expr/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/expr/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i > $(srcdir)/result/expr/$$name; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i 2>&1 > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/expr/$$name result.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
Automatatests: testAutomata$(EXEEXT)
@(echo > .memdump)
......@@ -997,7 +1013,7 @@ Relaxtests: xmllint$(EXEEXT)
> res.$$name 2> err.$$name;\
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\
if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" ] ; then \
if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" ] ; then \
diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
fi ; grep Unimplemented err.$$name`; \
......@@ -1006,6 +1022,35 @@ Relaxtests: xmllint$(EXEEXT)
fi ; fi ; \
done; done)
Schematrontests: xmllint$(EXEEXT)
@(echo > .memdump)
@echo "## Schematron regression tests"
-@(for i in $(srcdir)/test/schematron/*.sct ; do \
name=`basename $$i | sed 's+\.sct++'`; \
for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \
if [ -f $$j ] ; then \
xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \
then \
echo New test file "$$name"_"$$xno" ; \
$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
> $(srcdir)/result/schematron/"$$name"_"$$xno" \
2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
> res.$$name 2> err.$$name;\
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
res.$$name;\
diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
grep Unimplemented err.$$name`; \
if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
rm res.$$name err.$$name ; \
fi ; fi ; \
done; done)
RelaxNGPythonTests:
@(if [ -x $(PYTHON) ] ; then \
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
......@@ -1134,3 +1179,6 @@ install-data-local:
tst: tst.c
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz
sparse: clean
$(MAKE) CC=cgcc
......@@ -88,7 +88,8 @@ am__libxml2_la_SOURCES_DIST = SAX.c entities.c encoding.c error.c \
DOCBparser.c catalog.c globals.c threads.c c14n.c xmlstring.c \
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
xmlreader.c relaxng.c dict.c SAX2.c xmlwriter.c legacy.c \
chvalid.c pattern.c xmlsave.c xmlmodule.c triostr.c trio.c
chvalid.c pattern.c xmlsave.c xmlmodule.c schematron.c \
triostr.c trio.c
@WITH_TRIO_SOURCES_FALSE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \
@WITH_TRIO_SOURCES_FALSE@ encoding.lo error.lo \
@WITH_TRIO_SOURCES_FALSE@ parserInternals.lo parser.lo tree.lo \
......@@ -103,7 +104,7 @@ am__libxml2_la_SOURCES_DIST = SAX.c entities.c encoding.c error.c \
@WITH_TRIO_SOURCES_FALSE@ xmlunicode.lo xmlreader.lo relaxng.lo \
@WITH_TRIO_SOURCES_FALSE@ dict.lo SAX2.lo xmlwriter.lo \
@WITH_TRIO_SOURCES_FALSE@ legacy.lo chvalid.lo pattern.lo \
@WITH_TRIO_SOURCES_FALSE@ xmlsave.lo xmlmodule.lo
@WITH_TRIO_SOURCES_FALSE@ xmlsave.lo xmlmodule.lo schematron.lo
@WITH_TRIO_SOURCES_TRUE@am_libxml2_la_OBJECTS = SAX.lo entities.lo \
@WITH_TRIO_SOURCES_TRUE@ encoding.lo error.lo \
@WITH_TRIO_SOURCES_TRUE@ parserInternals.lo parser.lo tree.lo \
......@@ -119,7 +120,7 @@ am__libxml2_la_SOURCES_DIST = SAX.c entities.c encoding.c error.c \
@WITH_TRIO_SOURCES_TRUE@ xmlreader.lo relaxng.lo dict.lo \
@WITH_TRIO_SOURCES_TRUE@ SAX2.lo xmlwriter.lo legacy.lo \
@WITH_TRIO_SOURCES_TRUE@ chvalid.lo pattern.lo xmlsave.lo \
@WITH_TRIO_SOURCES_TRUE@ xmlmodule.lo
@WITH_TRIO_SOURCES_TRUE@ xmlmodule.lo schematron.lo
libxml2_la_OBJECTS = $(am_libxml2_la_OBJECTS)
testdso_la_LIBADD =
am_testdso_la_OBJECTS = testdso.lo
......@@ -319,6 +320,7 @@ TEST_PUSH = @TEST_PUSH@
TEST_REGEXPS = @TEST_REGEXPS@
TEST_SAX = @TEST_SAX@
TEST_SCHEMAS = @TEST_SCHEMAS@
TEST_SCHEMATRON = @TEST_SCHEMATRON@
TEST_THREADS = @TEST_THREADS@
TEST_VALID = @TEST_VALID@
TEST_VTIME = @TEST_VTIME@
......@@ -354,6 +356,7 @@ WITH_REGEXPS = @WITH_REGEXPS@
WITH_RUN_DEBUG = @WITH_RUN_DEBUG@
WITH_SAX1 = @WITH_SAX1@
WITH_SCHEMAS = @WITH_SCHEMAS@
WITH_SCHEMATRON = @WITH_SCHEMATRON@
WITH_THREADS = @WITH_THREADS@
WITH_TREE = @WITH_TREE@
WITH_TRIO = @WITH_TRIO@
......@@ -438,7 +441,7 @@ libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info
@WITH_TRIO_SOURCES_FALSE@ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
@WITH_TRIO_SOURCES_FALSE@ xmlreader.c relaxng.c dict.c SAX2.c \
@WITH_TRIO_SOURCES_FALSE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
@WITH_TRIO_SOURCES_FALSE@ xmlmodule.c
@WITH_TRIO_SOURCES_FALSE@ xmlmodule.c schematron.c
@WITH_TRIO_SOURCES_TRUE@libxml2_la_SOURCES = SAX.c entities.c encoding.c error.c parserInternals.c \
@WITH_TRIO_SOURCES_TRUE@ parser.c tree.c hash.c list.c xmlIO.c xmlmemory.c uri.c \
......@@ -447,7 +450,8 @@ libxml2_la_LDFLAGS = @CYGWIN_EXTRA_LDFLAGS@ @WIN32_EXTRA_LDFLAGS@ -version-info
@WITH_TRIO_SOURCES_TRUE@ catalog.c globals.c threads.c c14n.c xmlstring.c \
@WITH_TRIO_SOURCES_TRUE@ xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c \
@WITH_TRIO_SOURCES_TRUE@ triostr.c trio.c xmlreader.c relaxng.c dict.c SAX2.c \
@WITH_TRIO_SOURCES_TRUE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c xmlmodule.c
@WITH_TRIO_SOURCES_TRUE@ xmlwriter.c legacy.c chvalid.c pattern.c xmlsave.c \
@WITH_TRIO_SOURCES_TRUE@ xmlmodule.c schematron.c
DEPS = $(top_builddir)/libxml2.la
LDADDS = @STATIC_BINARIES@ $(top_builddir)/libxml2.la @THREAD_LIBS@ @Z_LIBS@ $(ICONV_LIBS) @M_LIBS@ @WIN32_EXTRA_LIBADD@
......@@ -791,6 +795,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/relaxng.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runsuite.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runtest.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/schematron.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testAutomata.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testC14N.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testHTML.Po@am__quote@
......@@ -1412,7 +1417,7 @@ check-local: all tests
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@
tests: XMLtests XMLenttests NStests IDtests Errtests APItests @READER_TEST@ @TEST_SAX@ @TEST_PUSH@ @TEST_HTML@ @TEST_PHTML@ @TEST_VALID@ URItests @TEST_PATTERN@ @TEST_XPATH@ @TEST_XPTR@ @TEST_XINCLUDE@ @TEST_C14N@ @TEST_DEBUG@ @TEST_CATALOG@ @TEST_REGEXPS@ @TEST_SCHEMAS@ @TEST_SCHEMATRON@ @TEST_THREADS@ Timingtests @TEST_VTIME@ @PYTHON_TESTS@ @TEST_MODULES@
@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \
$(MAKE) MAKEFLAGS+=--silent tests ; fi)
@(cd doc/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
......@@ -2075,6 +2080,21 @@ Regexptests: testRegexp$(EXEEXT)
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
@echo "## Formal expresssions regression tests"
-@(for i in $(srcdir)/test/expr/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/expr/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i > $(srcdir)/result/expr/$$name; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/testRegexp --expr -i $$i 2>&1 > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/expr/$$name result.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name ; \
fi ; fi ; done)
Automatatests: testAutomata$(EXEEXT)
@(echo > .memdump)
......@@ -2251,7 +2271,7 @@ Relaxtests: xmllint$(EXEEXT)
> res.$$name 2> err.$$name;\
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/relaxng/"$$name"_"$$xno" res.$$name;\
if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" ] ; then \
if [ "$$name" != "tutor10_1" -a "$$name" != "tutor10_2" -a "$$name" != "tutor3_2" -a "$$name" != "307377" ] ; then \
diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
fi ; grep Unimplemented err.$$name`; \
......@@ -2260,6 +2280,35 @@ Relaxtests: xmllint$(EXEEXT)
fi ; fi ; \
done; done)
Schematrontests: xmllint$(EXEEXT)
@(echo > .memdump)
@echo "## Schematron regression tests"
-@(for i in $(srcdir)/test/schematron/*.sct ; do \
name=`basename $$i | sed 's+\.sct++'`; \
for j in $(srcdir)/test/schematron/"$$name"_*.xml ; do \
if [ -f $$j ] ; then \
xno=`basename $$j | sed 's+.*_\(.*\).xml+\1+'`; \
if [ ! -f $(srcdir)/result/schematron/"$$name"_"$$xno" ]; \
then \
echo New test file "$$name"_"$$xno" ; \
$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
> $(srcdir)/result/schematron/"$$name"_"$$xno" \
2> $(srcdir)/result/schematron/"$$name"_"$$xno".err; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
else \
log=`$(CHECKER) $(top_builddir)/xmllint$(EXEEXT) --schematron $$i $$j \
> res.$$name 2> err.$$name;\
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/schematron/"$$name"_"$$xno" \
res.$$name;\
diff $(srcdir)/result/schematron/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
grep Unimplemented err.$$name`; \
if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
rm res.$$name err.$$name ; \
fi ; fi ; \
done; done)
RelaxNGPythonTests:
@(if [ -x $(PYTHON) ] ; then \
PYTHONPATH=$(top_builddir)/python:$(top_builddir)/python/.libs:$$PYTHONPATH ; \
......@@ -2353,6 +2402,9 @@ install-data-local:
tst: tst.c
$(CC) $(CFLAGS) -Iinclude -o tst tst.c .libs/libxml2.a -lpthread -lm -lz
sparse: clean
$(MAKE) CC=cgcc
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
......@@ -15,6 +15,45 @@ ChangeLog.html
to the CVS at
http://cvs.gnome.org/viewcvs/libxml2/
code base.There is the list of public releases:
2.6.21: Sep 4 2005:
- build fixes: Cygwin portability fixes (Gerrit P. Haase), calling
convention problems on Windows (Marcus Boerger), cleanups based on
Linus' sparse tool, update of win32/configure.js (Rob Richards),
remove warnings on Windows(Marcus Boerger), compilation without SAX1,
detection of the Python binary, use $GCC inestad of $CC = 'gcc' (Andrew
W. Nosenko), compilation/link with threads and old gcc, compile
problem by C370 on Z/OS,
- bug fixes: http_proxy environments (Peter Breitenlohner), HTML UTF-8
bug (Jiri Netolicky), XPath NaN compare bug (William Brack),
htmlParseScript potential bug, Schemas regexp handling of spaces,
Base64 Schemas comparisons NIST passes, automata build error xsd:all,
xmlGetNodePath for namespaced attributes (Alexander Pohoyda),
xmlSchemas foreign namespaces handling, XML Schemas facet comparison
(Kupriyanov Anatolij), xmlSchemaPSimpleTypeErr error report (Kasimier
Buchcik), xml: namespace ahndling in Schemas (Kasimier), empty model
group in Schemas (Kasimier), wilcard in Schemas (Kasimier), URI
composition (William), xs:anyType in Schemas (Kasimier), Python resolver
emmitting error messages directly, Python xmlAttr.parent (Jakub Piotr
Clapa), trying to fix the file path/URI conversion,
xmlTextReaderGetAttribute fix (Rob Richards), xmlSchemaFreeAnnot memleak
(Kasimier), HTML UTF-8 serialization, streaming XPath, Schemas determinism
detection problem, XInclude bug, Schemas context type (Dean Hill),
validation fix (Derek Poon), xmlTextReaderGetAttribute[Ns] namespaces
(Rob Richards), Schemas type fix (Kuba Nowakowski), UTF-8 parser bug,
error in encoding handling, xmlGetLineNo fixes, bug on entities handling,
entity name extraction in error handling with XInclude, text nodes
in HTML body tags (Gary Coady), xml:id and IDness at the treee level
fixes, XPath streaming patterns bugs.
- improvements: structured interfaces for schemas and RNG error reports
(Marcus Boerger), optimization of the char data inner loop parsing
(thanks to Behdad Esfahbod for the idea), schematron validation
though not finished yet, xmlSaveOption to omit XML declaration,
keyref match error reports (Kasimier), formal expression handling
code not plugged yet, more lax mode for the HTML parser,
parser XML_PARSE_COMPACT option for text nodes allocation.
- documentation: xmllint man page had --nonet duplicated
2.6.20: Jul 10 2005:
- build fixes: Windows build (Rob Richards), Mingw compilation (Igor
Zlatkovic), Windows Makefile (Igor), gcc warnings (Kasimier and
......
......@@ -227,7 +227,7 @@ const xmlChar *
xmlSAX2GetSystemId(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
if ((ctx == NULL) || (ctxt->input == NULL)) return(NULL);
return((const xmlChar *) ctxt->input->filename);
}
......@@ -1022,7 +1022,7 @@ xmlSAX2EndDocument(void *ctx)
}
}
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED)
#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
/**
* xmlSAX2AttributeInternal:
* @ctx: the user data (XML parser context)
......@@ -1316,11 +1316,7 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
* when validating, the ID registration is done at the attribute
* validation level. Otherwise we have to do specific handling here.
*/
if (xmlIsID(ctxt->myDoc, ctxt->node, ret))
xmlAddID(&ctxt->vctxt, ctxt->myDoc, value, ret);
else if (xmlIsRef(ctxt->myDoc, ctxt->node, ret))
xmlAddRef(&ctxt->vctxt, ctxt->myDoc, value, ret);
else if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
if (xmlStrEqual(fullname, BAD_CAST "xml:id")) {
/*
* Add the xml:id value
*
......@@ -1332,7 +1328,10 @@ xmlSAX2AttributeInternal(void *ctx, const xmlChar *fullname,
(const char *) value, NULL);