mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-10 14:40:58 +03:00
fixed the xinclude problem with document() as in bug #171893 added a new
* xsltproc/xsltproc.c: fixed the xinclude problem with document() as in bug #171893 * configure.in tests/Makefile.am tests/xinclude/*: added a new xinclude directory with the test for this problem Daniel
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Wed Mar 30 14:09:19 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xsltproc/xsltproc.c: fixed the xinclude problem with document()
|
||||||
|
as in bug #171893
|
||||||
|
* configure.in tests/Makefile.am tests/xinclude/*: added a new
|
||||||
|
xinclude directory with the test for this problem
|
||||||
|
|
||||||
Wed Mar 30 11:59:06 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
Wed Mar 30 11:59:06 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libxslt/pattern.c: fixed bug 169718 with ancestors in patterns
|
* libxslt/pattern.c: fixed bug 169718 with ancestors in patterns
|
||||||
|
@ -573,6 +573,7 @@ tests/numbers/Makefile
|
|||||||
tests/documents/Makefile
|
tests/documents/Makefile
|
||||||
tests/xmlspec/Makefile
|
tests/xmlspec/Makefile
|
||||||
tests/multiple/Makefile
|
tests/multiple/Makefile
|
||||||
|
tests/xinclude/Makefile
|
||||||
tests/XSLTMark/Makefile
|
tests/XSLTMark/Makefile
|
||||||
tests/docbook/Makefile
|
tests/docbook/Makefile
|
||||||
tests/exslt/Makefile
|
tests/exslt/Makefile
|
||||||
|
@ -44,7 +44,7 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
* extra version information, used to show a CVS compilation
|
* extra version information, used to show a CVS compilation
|
||||||
*/
|
*/
|
||||||
#define LIBXSLT_VERSION_EXTRA "-CVS999"
|
#define LIBXSLT_VERSION_EXTRA "-CVS1006"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WITH_XSLT_DEBUG:
|
* WITH_XSLT_DEBUG:
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
SUBDIRS=docs REC1 REC2 REC general namespaces keys numbers documents \
|
SUBDIRS=docs REC1 REC2 REC general namespaces keys numbers documents \
|
||||||
extensions reports xmlspec multiple XSLTMark docbook exslt plugins
|
extensions reports xmlspec multiple xinclude XSLTMark docbook \
|
||||||
|
exslt plugins
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
|
33
tests/xinclude/Makefile.am
Normal file
33
tests/xinclude/Makefile.am
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
|
$(top_builddir)/xsltproc/xsltproc:
|
||||||
|
@(cd ../../xsltproc ; $(MAKE) xsltproc)
|
||||||
|
|
||||||
|
EXTRA_DIST = \
|
||||||
|
e.xml \
|
||||||
|
e.xsl \
|
||||||
|
x1.xml \
|
||||||
|
x2.xml \
|
||||||
|
normal.out \
|
||||||
|
xinclude.out
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
valgrind:
|
||||||
|
@echo '## Running the regression tests under Valgrind'
|
||||||
|
$(MAKE) CHECKER='valgrind -q' tests
|
||||||
|
|
||||||
|
test tests: $(top_builddir)/xsltproc/xsltproc
|
||||||
|
@echo '## Running XInclude test'
|
||||||
|
@(echo > .memdump)
|
||||||
|
@($(CHECKER) $(top_builddir)/xsltproc/xsltproc $(srcdir)/e.xsl $(srcdir)/e.xml > res ; \
|
||||||
|
diff $(srcdir)/normal.out res; \
|
||||||
|
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
|
||||||
|
rm -f res)
|
||||||
|
@($(CHECKER) $(top_builddir)/xsltproc/xsltproc --xinclude $(srcdir)/e.xsl $(srcdir)/e.xml > res ; \
|
||||||
|
diff $(srcdir)/xinclude.out res; \
|
||||||
|
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0" || true;\
|
||||||
|
rm -f res)
|
||||||
|
|
||||||
|
|
||||||
|
|
2
tests/xinclude/e.xml
Normal file
2
tests/xinclude/e.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<e/>
|
14
tests/xinclude/e.xsl
Normal file
14
tests/xinclude/e.xsl
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="/">
|
||||||
|
<xsl:apply-templates select="document('x1.xml')/foo"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="*|@*|text()">
|
||||||
|
<xsl:copy><xsl:apply-templates select="*|@*|
|
||||||
|
text()" /></xsl:copy>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
5
tests/xinclude/normal.out
Normal file
5
tests/xinclude/normal.out
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<foo>
|
||||||
|
<element>x1</element>
|
||||||
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="x2.xml"/>
|
||||||
|
</foo>
|
5
tests/xinclude/x1.xml
Normal file
5
tests/xinclude/x1.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<foo>
|
||||||
|
<element>x1</element>
|
||||||
|
<xi:include href="x2.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
|
||||||
|
</foo>
|
4
tests/xinclude/x2.xml
Normal file
4
tests/xinclude/x2.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<foo>
|
||||||
|
<element>x2</element>
|
||||||
|
</foo>
|
7
tests/xinclude/xinclude.out
Normal file
7
tests/xinclude/xinclude.out
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<foo>
|
||||||
|
<element>x1</element>
|
||||||
|
<foo>
|
||||||
|
<element>x2</element>
|
||||||
|
</foo>
|
||||||
|
</foo>
|
@ -395,6 +395,8 @@ xsltProcess(xmlDocPtr doc, xsltStylesheetPtr cur, const char *filename) {
|
|||||||
if (ctxt == NULL)
|
if (ctxt == NULL)
|
||||||
return;
|
return;
|
||||||
xsltSetCtxtParseOptions(ctxt, options);
|
xsltSetCtxtParseOptions(ctxt, options);
|
||||||
|
if (xinclude)
|
||||||
|
ctxt->xinclude = 1;
|
||||||
if (profile) {
|
if (profile) {
|
||||||
res = xsltApplyStylesheetUser(cur, doc, params, NULL,
|
res = xsltApplyStylesheetUser(cur, doc, params, NULL,
|
||||||
stderr, ctxt);
|
stderr, ctxt);
|
||||||
|
Reference in New Issue
Block a user