mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-29 15:41:13 +03:00
working around Mark Vakoc' reported bug related to mode internaing adding
* libxslt/transform.c: working around Mark Vakoc' reported bug related to mode internaing * xsltproc/xsltproc.c: adding a --nodict mode to check problems with document without a dictionnary. * tests/REC/Makefile.am tests/general/Makefile.am: testing without dictionnary Daniel
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
Tue Mar 29 21:06:11 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* libxslt/transform.c: working around Mark Vakoc' reported bug related
|
||||||
|
to mode internaing
|
||||||
|
* xsltproc/xsltproc.c: adding a --nodict mode to check problems with
|
||||||
|
document without a dictionnary.
|
||||||
|
* tests/REC/Makefile.am tests/general/Makefile.am: testing without
|
||||||
|
dictionnary
|
||||||
|
|
||||||
Tue Mar 29 15:37:13 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
Tue Mar 29 15:37:13 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libxslt/xslt.c: fix bug #165201 when calling xsltInit() multiple
|
* libxslt/xslt.c: fix bug #165201 when calling xsltInit() multiple
|
||||||
|
@ -4053,6 +4053,16 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
|
|||||||
else
|
else
|
||||||
ctxt->outputFile = NULL;
|
ctxt->outputFile = NULL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* internalize the modes if needed
|
||||||
|
*/
|
||||||
|
if (ctxt->dict != NULL) {
|
||||||
|
if (ctxt->mode != NULL)
|
||||||
|
ctxt->mode = xmlDictLookup(ctxt->dict, ctxt->mode, -1);
|
||||||
|
if (ctxt->modeURI != NULL)
|
||||||
|
ctxt->modeURI = xmlDictLookup(ctxt->dict, ctxt->modeURI, -1);
|
||||||
|
}
|
||||||
|
|
||||||
XSLT_GET_IMPORT_PTR(method, style, method)
|
XSLT_GET_IMPORT_PTR(method, style, method)
|
||||||
XSLT_GET_IMPORT_PTR(doctypePublic, style, doctypePublic)
|
XSLT_GET_IMPORT_PTR(doctypePublic, style, doctypePublic)
|
||||||
XSLT_GET_IMPORT_PTR(doctypeSystem, style, doctypeSystem)
|
XSLT_GET_IMPORT_PTR(doctypeSystem, style, doctypeSystem)
|
||||||
|
@ -142,4 +142,66 @@ test tests: $(top_builddir)/xsltproc/xsltproc
|
|||||||
fi ; \
|
fi ; \
|
||||||
rm -f $$name.res $$name.bad ; \
|
rm -f $$name.res $$name.bad ; \
|
||||||
done)
|
done)
|
||||||
|
@echo '## Running REC tests without dictionaries'
|
||||||
|
-@(for i in $(srcdir)/*.xsl ; do \
|
||||||
|
name=`basename $$i .xsl` ; \
|
||||||
|
if [ ! -f $(srcdir)/$$name.xml ] ; then \
|
||||||
|
continue ; \
|
||||||
|
fi ; \
|
||||||
|
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict \
|
||||||
|
$(srcdir)/$$name.xsl $(srcdir)/$$name.xml \
|
||||||
|
> $$name.res 2>$$name.bad ; \
|
||||||
|
if [ ! -f $(srcdir)/$$name.out ] ; then \
|
||||||
|
cp $$name.res $(srcdir)/$$name.out ; \
|
||||||
|
if [ -s $$name.bad ] ; then \
|
||||||
|
cp $$name.bad $(srcdir)/$$name.err ; \
|
||||||
|
fi ; \
|
||||||
|
else \
|
||||||
|
if [ ! -s $$name.res ] ; then \
|
||||||
|
echo "Fatal error, no $$name.res\n" ; \
|
||||||
|
else \
|
||||||
|
diff $(srcdir)/$$name.out $$name.res ; \
|
||||||
|
if [ -s $$name.err ] ; then \
|
||||||
|
diff $(srcdir)/$$name.err $$name.bad ; \
|
||||||
|
else \
|
||||||
|
diff /dev/null $$name.bad ; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
grep "MORY ALLO" .memdump | \
|
||||||
|
grep -v "MEMORY ALLOCATED : 0" || true` ; \
|
||||||
|
if [ -n "$$log" ] ; then \
|
||||||
|
echo $$name result ; \
|
||||||
|
echo $$log ; \
|
||||||
|
fi ; \
|
||||||
|
rm -f $$name.res $$name.bad ; \
|
||||||
|
done)
|
||||||
|
@(for i in $(srcdir)/stand*.xml ; do \
|
||||||
|
name=`basename $$i .xml` ; \
|
||||||
|
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict \
|
||||||
|
$(srcdir)/$$name.xml > $$name.res 2>$$name.bad ;\
|
||||||
|
if [ ! -f $(srcdir)/$$name.stand.out ] ; then \
|
||||||
|
cp $$name.res $(srcdir)/$$name.stand.out ; \
|
||||||
|
if [ -s $$name.bad ] ; then \
|
||||||
|
cp $$name.bad $(srcdir)/$$name.stand.err ; \
|
||||||
|
fi ; \
|
||||||
|
else \
|
||||||
|
if [ ! -s $$name.res ] ; then \
|
||||||
|
echo "Fatal error, no $$name.res\n" ; \
|
||||||
|
else \
|
||||||
|
diff $(srcdir)/$$name.stand.out $$name.res ; \
|
||||||
|
if [ -s $$name.stand.err ] ; then \
|
||||||
|
diff $(srcdir)/$$name.stand.err $$name.bad ; \
|
||||||
|
else \
|
||||||
|
diff /dev/null $$name.bad; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true` ; \
|
||||||
|
if [ -n "$$log" ] ; then \
|
||||||
|
echo $$name result ; \
|
||||||
|
echo $$log ; \
|
||||||
|
fi ; \
|
||||||
|
rm -f $$name.res $$name.bad ; \
|
||||||
|
done)
|
||||||
|
|
||||||
|
@ -213,4 +213,36 @@ test tests: $(top_builddir)/xsltproc/xsltproc
|
|||||||
fi ; \
|
fi ; \
|
||||||
rm -f result.$$name err.$$name; \
|
rm -f result.$$name err.$$name; \
|
||||||
done ; done)
|
done ; done)
|
||||||
|
@echo '## Running general tests without dictionaries'
|
||||||
|
-@(for i in $(srcdir)/../docs/*.xml ; do \
|
||||||
|
if [ -d $$i ] ; then continue ; fi ; \
|
||||||
|
doc=`basename $$i .xml` ; \
|
||||||
|
for j in $(srcdir)/$$doc*.xsl ; do \
|
||||||
|
if [ ! -f $$j ] ; then continue ; fi ; \
|
||||||
|
if [ -d $$j ] ; then continue ; fi ; \
|
||||||
|
name=`basename $$j .xsl`; \
|
||||||
|
out=$(srcdir)/"$$name".out; \
|
||||||
|
err=$(srcdir)/"$$name".err; \
|
||||||
|
log=`$(CHECKER) $(top_builddir)/xsltproc/xsltproc --nodict $$j $$i \
|
||||||
|
> result.$$name 2>err.$$name; \
|
||||||
|
if [ ! -f $$out ] ; then \
|
||||||
|
cp result.$$name $$out ; \
|
||||||
|
if [ -s err.$$name ] ; then \
|
||||||
|
cp err.$$name $$err ; \
|
||||||
|
fi ; \
|
||||||
|
else \
|
||||||
|
diff $$out result.$$name; \
|
||||||
|
if [ -s $$err ] ; then \
|
||||||
|
diff $$err err.$$name; \
|
||||||
|
else \
|
||||||
|
diff /dev/null err.$$name; \
|
||||||
|
fi ; \
|
||||||
|
fi ; \
|
||||||
|
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true`;\
|
||||||
|
if [ -n "$$log" ] ; then \
|
||||||
|
echo $$name result ; \
|
||||||
|
echo $$log ; \
|
||||||
|
fi ; \
|
||||||
|
rm -f result.$$name err.$$name; \
|
||||||
|
done ; done)
|
||||||
|
|
||||||
|
@ -82,6 +82,7 @@ static int dumpextensions = 0;
|
|||||||
static int novalid = 0;
|
static int novalid = 0;
|
||||||
static int nodtdattr = 0;
|
static int nodtdattr = 0;
|
||||||
static int noout = 0;
|
static int noout = 0;
|
||||||
|
static int nodict = 0;
|
||||||
#ifdef LIBXML_HTML_ENABLED
|
#ifdef LIBXML_HTML_ENABLED
|
||||||
static int html = 0;
|
static int html = 0;
|
||||||
#endif
|
#endif
|
||||||
@ -604,6 +605,9 @@ main(int argc, char **argv)
|
|||||||
} else if ((!strcmp(argv[i], "-profile")) ||
|
} else if ((!strcmp(argv[i], "-profile")) ||
|
||||||
(!strcmp(argv[i], "--profile"))) {
|
(!strcmp(argv[i], "--profile"))) {
|
||||||
profile++;
|
profile++;
|
||||||
|
} else if ((!strcmp(argv[i], "-nodict")) ||
|
||||||
|
(!strcmp(argv[i], "--nodict"))) {
|
||||||
|
nodict++;
|
||||||
} else if ((!strcmp(argv[i], "-norman")) ||
|
} else if ((!strcmp(argv[i], "-norman")) ||
|
||||||
(!strcmp(argv[i], "--norman"))) {
|
(!strcmp(argv[i], "--norman"))) {
|
||||||
profile++;
|
profile++;
|
||||||
@ -725,6 +729,8 @@ main(int argc, char **argv)
|
|||||||
options = XML_PARSE_NOENT | XML_PARSE_NOCDATA;
|
options = XML_PARSE_NOENT | XML_PARSE_NOCDATA;
|
||||||
else if (nodtdattr)
|
else if (nodtdattr)
|
||||||
options = XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_NOCDATA;
|
options = XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_NOCDATA;
|
||||||
|
if (nodict != 0)
|
||||||
|
options |= XML_PARSE_NODICT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register the EXSLT extensions and the test module
|
* Register the EXSLT extensions and the test module
|
||||||
|
Reference in New Issue
Block a user