Skip to content
Snippets Groups Projects
Commit 1d1f723c5086 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

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
parent 46e14c0f3c92
No related branches found
No related tags found
No related merge requests found
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>
* libxslt/pattern.c: fixed bug 169718 with ancestors in patterns
......
......@@ -573,6 +573,7 @@
tests/documents/Makefile
tests/xmlspec/Makefile
tests/multiple/Makefile
tests/xinclude/Makefile
tests/XSLTMark/Makefile
tests/docbook/Makefile
tests/exslt/Makefile
......
......@@ -44,7 +44,7 @@
*
* extra version information, used to show a CVS compilation
*/
#define LIBXSLT_VERSION_EXTRA "-CVS999"
#define LIBXSLT_VERSION_EXTRA "-CVS1006"
/**
* WITH_XSLT_DEBUG:
......
## Process this file with automake to produce Makefile.in
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:
......
## 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)
<?xml version="1.0"?>
<e/>
<?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>
<?xml version="1.0"?>
<foo>
<element>x1</element>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="x2.xml"/>
</foo>
<?xml version="1.0"?>
<foo>
<element>x1</element>
<xi:include href="x2.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</foo>
<?xml version="1.0"?>
<foo>
<element>x2</element>
</foo>
<?xml version="1.0"?>
<foo>
<element>x1</element>
<foo>
<element>x2</element>
</foo>
</foo>
......@@ -395,6 +395,8 @@
if (ctxt == NULL)
return;
xsltSetCtxtParseOptions(ctxt, options);
if (xinclude)
ctxt->xinclude = 1;
if (profile) {
res = xsltApplyStylesheetUser(cur, doc, params, NULL,
stderr, ctxt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment