summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-09-07Report errors on variable use in keyDaniel Veillard4-2/+34
For https://bugzilla.gnome.org/show_bug.cgi?id=680938 Variables are forbidden for match or use values of keys * libxslt/xsltutils.c libxslt/xsltutils.h: allows to add flags to XPath expression compilation * libxslt/keys.c: add the XML_XPATH_NOVAR if defined (recent libxml2) * libxslt/pattern.c: add a missing xpath.h include to make sure the defintiion is found there too
2012-09-07The XSLT namespace string is a constant oneDaniel Veillard1-1/+1
Raised by Phil Shafer <phil@juniper.net>
2012-09-06Fix handling of names in xsl:attributeNick Wellnhofer3-44/+14
A prefix of 'xmlns' is actually allowed. It should simply be ignored if a namespace is given. Without a namespace the lookup by prefix will fail anyway. What the spec doesn't allow is an attribute name of 'xmlns' which will now be rejected.
2012-09-06Reserved namespaces in xsl:element and xsl:attributeNick Wellnhofer6-22/+55
For https://bugzilla.gnome.org/show_bug.cgi?id=587360 Correct handling of 'xml' and 'xmlns' namespaces in xsl:element and xsl:attribute.
2012-09-06Add new tests to EXTRA_DISTNick Wellnhofer1-0/+3
2012-09-06Test for bug #680920Nick Wellnhofer4-0/+22
Add test cases for the EXSLT func bug
2012-09-06Null-terminate result string of cry:rc4_decryptNick Wellnhofer1-1/+2
For https://bugzilla.gnome.org/show_bug.cgi?id=675917 The string wasn't 0 terminated
2012-09-05fix regresson in Various "make distcheck" and other fixesRoumen Petrov1-1/+1
The patch 'Various "make distcheck" and other fixes' removes a line in configure EXTRA_LIBS=... LIBXML_LIBS... -EXTRA_LIBS="$EXTRA_LIBS $LIBXML_LIBS $M_LIBS" This is not save as libxslt/Makefile.am define only |EXTRA_LIBS| as dependency: |libxslt_la_LIBADD= $(EXTRA_LIBS)| If platform does not support unresolved dependencies library cannot be linked. Even with support regression tests fail in python test due unresolved "xml"-symbols .
2012-09-04EXSLT date normalization fixJames Muscat3-1/+26
https://bugzilla.gnome.org/show_bug.cgi?id=626855 Dates with timezones but no time components are not normalized correctly Using xsltproc v1.1.26: $ xsltproc --version Using libxml 20706, libxslt 10126 and libexslt 815 xsltproc was compiled against libxml 20704, libxslt 10126 and libexslt 815 libxslt 10126 was compiled against libxml 20704 libexslt 815 was compiled against libxml 20704 Dates that have timezone offsets specified but no time components, for example "1970-01-01+01:00", are not normalized correctly; the timezone part is truncated: date:seconds("1970-01-01") = 0 date:seconds("1970-01-01+01:00") = 0 (not -3600 as expected) Alters the conditions under which exsltDateNormalize() returns without normalizing, and adds test cases demonstrating the new behaviour.
2012-09-04Exit after compilation of invalid func:resultNick Wellnhofer5-0/+25
Second part of bug #680920.
2012-09-04Fix for EXSLT func:functionNick Wellnhofer1-2/+2
For https://bugzilla.gnome.org/show_bug.cgi?id=680920 If the first child of a func:function template is xslt:text, it will be removed by xsltParseTemplateContent. So xsltParseTemplateContent should be called before setting func->content to the first child.
2012-09-04Rewrite EXSLT string:replace to be conformantNick Wellnhofer4-96/+255
For https://bugzilla.gnome.org/show_bug.cgi?id=569703 The libexslt implementation of str:replace fails to conform to its specification on several counts: a) the current version returns a string; it's supposed to return a nodeset. b) the current version treats the replacements as strings; it's supposed to treat them as nodes. c) the current version can modify replacement text; it's supposed to only modify text from the original string. d) the current version ignores the requirement to perform substitutions in descending order of search string length. Steps to reproduce: a) the returning of a string rather than a nodeset can be seen by simply inspecting the code. b) the code explicity converts replacement nodes to strings; this can be seen by inspection. d) the failure to perform substitutions in descending order of search string length can be seen in the lack of any sorting in the source code. c) the problem of modifying text not belonging to the original string can be seen in the following stylesheet, which can be simply applied to itself to produce output. <xsl:stylesheet version="1.0" extension-element-prefixes="str exsl" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" > <xsl:variable name="Text"> Price is $1.10 </xsl:variable> <xsl:template match="/"> <xsl:apply-templates select="exsl:node-set($Text)/text()"/> </xsl:template> <xsl:template match="text()"> <xsl:variable name="Replace"> <FromXml> <from>$</from> <from>\</from> </FromXml> <ToTex> <to>\$</to> <to>$\backslash$</to> </ToTex> </xsl:variable> <xsl:value-of select="str:replace(.,exsl:node-set($Replace)/FromXml/from,exsl:node-set($Replace)/ToTex/to)"/> </xsl:template> </xsl:stylesheet> Actual results: The output is: <?xml version="1.0"?> Price is $\backslash$$1.10 Expected results: The output should be: <?xml version="1.0"?> Price is \$1.10 Does this happen every time? yes. Other information: str:replace specification is at: http://www.exslt.org/str/functions/replace/str.replace.html
2012-09-04Remove .cvsignore files which are not needed anymoreDaniel Veillard35-152/+0
2012-09-03Avoid a heap use after free errorChris Evans1-2/+4
For https://code.google.com/p/chromium/issues/detail?id=140368
2012-09-03Fix a dictionary string usageChris Evans2-3/+49
Raised in chromium, but also affecting xsltproc Also updated AUTHORS to list Chris and other contributors
2012-08-16Output should not include extraneous newlines when indent is offLaurence Rowe6-4/+19
Hence matching behaviour of xmlSaveOption XML_SAVE_FORMAT off. This affects only one of the regression tests
2012-08-16xincludestyle wasn't protected with LIBXML_XINCLUDE_ENABLEDMichael Bonfils1-0/+2
Leading to possible compilation issue if this isn't in libxml2
2012-08-16document('') fails to return stylesheets parsed from memoryJason Viers1-4/+10
If an XSL stylesheet is from memory (e.g. xmlParseMemory), then xpath expressions referencing "document('')" will never return a match. When getting down into it, I understand the logic "document() is resolved relative to the XSL's location, reading from memory has no location, therefore buzz off", but the XSL spec seems to address this: http://www.w3.org/TR/xslt#document "Note that a zero-length URI reference is a reference to the document relative to which the URI reference is being resolved; thus document("") refers to the root node of the stylesheet; the tree representation of the stylesheet is exactly the same as if the XML document containing the stylesheet was the initial source document." The fact that the behavior differs in this case between fromFile & fromMemory definitely caught me off guard, and IMHO fixing that scenario is worth the one-off-ness of the fix.
2012-08-16Portability fix for testThreads.cIlyaS1-8/+4
Similar to the one in libxml2, don't assume threads id are scalars
2012-08-16FreeBSD portability fixesPedro F. Giffuni2-2/+5
Around behaviour and compile flags for localtime and EXSLT date support
2012-08-16xsltproc should return an error code if xinclude failsMalcolm Purvis1-2/+9
When running xsltproc with the --xinclude option and if the included file contains parse errors, then xsltproc exits with a success return code (0) rather than an error code. This is despite the fact that parser error messages are printed out. * xsltproc/xsltproc.c: check xinclude processing function return code, fail with error 6 if it went wrong.
2012-08-16check for gmtime - on mingw* hosts will enable date-time functionRoumen Petrov2-1/+4
2012-08-16use only native crypto-API for mingw* hostsRoumen Petrov1-0/+9
2012-08-16Forwards-compatible processing of unknown top level elementsNick Wellnhofer6-8/+55
Bug #677901
2012-08-16Fix system-property with unknown namespaceNick Wellnhofer4-1/+17
The empty string should be returned, see bug #631803.
2012-08-16Hardening of code checking node types in EXSLTDaniel Veillard1-2/+4
2012-08-09Various "make distcheck" and other fixesDaniel Richard G39-338/+493
Makefile.am: * Use $(VAR), not @VAR@, as the former is the correct form for AC_SUBST'ed variables in Makefile.am files * Touch these *.xml/*.syms files in the "dist-hook" target to prevent them from being regenerated, because the "make dist" process in itself updates the timestamps of the source files when it copies them into $(distdir) * Add EXTRA_LIBS (-lrt on my system) to xsltConf.sh, as this is a required dependency when client applications link against -lxslt (note that the definition of EXTRA_LIBS has been changed; see below) * Removed MAKEFLAGS+=--silent bits, as this is not compatible with non-GNU Make programs autogen.sh: * Add --warnings=all options to automake and autoconf invocations, to better catch potential problems (most of which I've fixed in this patch) configure.in: * Replaced obsolete macros with their current equivalents; for reference, see http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html (I removed AC_ISC_POSIX outright because the doc states it is no longer useful) * test(1) uses "=" as an operator, not "==" * Fixed quoting on an AC_LINK_IFELSE() invocation to quell Autoconf errors * Don't add redundant libraries to EXTRA_LIBS, because (1) this variable already contains LibXSLT's own additional system-library deps, and is useful in that form, and (2) the LibXML2 deps are already handled by Libtool * Don't delete files in srcdir, and don't create the symlink to "Copyright" there either (I don't understand why this is being symlinked in the first place...) doc/Makefile.am: * Can't use wildcards in EXTRA_DIST, because this breaks dependencies (e.g. you can't "make EXSLT/\*.html"), and they only work properly when building inside the source tree; these have been replaced with their expansions. Other entries have been added here in lieu of the wildcards in the dist-hook target, as well as opportunistic use of the $(*PAGES) variables. * Don't define an "all" target, because this steps on Automake's toes; use "all-local" instead * Define and use an "xsltproc" variable to reference an in-tree-built version of xsltproc, instead of e.g. $(bindir)/xsltproc NOTE: The makefile also uses $(XSLTPROC), which names an external instance of the program found at configure time. Some instances of this could probably be changed to $(xsltproc) to remove the dependency on an existing installed program. * Qualified various filenames as appropriate with $(srcdir) * Use $(XMLLINT) consistently instead of $(bindir)/xmllint * In the "libxslt-api.xml ..." rule, cd into $(srcdir) before invoking apibuild.py as this script has to run in srcdir anyway * In the "clean-local" rule, clear out some additional files to allow "make distcheck" to pass * Eliminated the redundant "maintainer-clean-local" rule * Added a "distclean-local" rule to clear out the build directory in an out-of-source build to allow "make distcheck" to pass * Added a "check-extra-dist" target to make it easier to check that EXTRA_DIST isn't missing anything * Use $(MKDIR_P), not $(mkinstalldirs), as the latter name is obsolete * Use $(VAR) instead of @VAR@ * The "dist-hook" target didn't work (if any generated files were in builddir and not in srcdir), and is no longer needed thanks to the comprehensive EXTRA_DIST variable * Added an "uninstall-local" rule to allow "make distcheck" to pass * Updated the .PHONY target list, removed non-existent targets doc/symbols.xml: * Needed to add this bit to make the generation scripts shut up libexslt/Makefile.am: * AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an obsolete name * Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS (Note that $(CFLAGS) need not be added to AM_CFLAGS, because Automake already references both in the build rules) * Use $(VAR) instead of @VAR@ libxslt.pc.in: * Add EXTRA_LIBS (-lrt on my system), as this is a required dependency when client applications link against -lxslt libxslt/Makefile.am: * AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an obsolete name * Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS * Use $(VAR) instead of @VAR@, $(MKDIR_P) instead of $(mkinstalldirs) * Use $(MKDIR_P), not $(mkinstalldirs), as the latter name is obsolete libxslt/xsltutils.c: * Some systems don't know about CLOCK_MONOTONIC; older Solaris knows about CLOCK_HIGHRES. Some systems, alas, have no usable alternative to CLOCK_REALTIME. python/Makefile.am: * AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an obsolete name * Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS * Because libxslt-py.c is (presumably) supposed to be generated every time at build time, don't bundle it in the dist tarball * Use $(VAR) instead of @VAR@ * libxsltclass.py is a generated file, so it doesn't get qualified with $(srcdir) * Use $(MKDIR_P) instead of (mkinstalldirs) * Added an uninstall-local rule so that "make distcheck" passes * Removed the $(srcdir) qualifications in the GENERATED file list, as these files may exist in builddir * In the gen_prog rule, qualify the script invocation with $(srcdir), and set the SRCDIR environment variable so that the script can find the files it needs when builddir != srcdir * Don't define an "all" target, as this steps on Automake's toes python/generator.py: * Get the source directory from the SRCDIR environment variable, and use it appropriately python/tests/Makefile.am: * Set CLEANFILES instead of defining a "clean" rule * Use $(VAR) instead of @VAR@, $(MKDIR_P) instead of $(mkinstalldirs) tests/*/Makefile.am, tests/exslt/*/Makefile.am: * Need to clean up .memdump files for "make distcheck" to pass * Don't define an "all" target, as this steps on Automake's toes tests/REC/Makefile.am: * Added two missing *.stand.out files to EXTRA_DIST tests/XSLTMark/Makefile.am: * Replaced the GNU-Make-specific %.out bit with a more broadly compatible rule (the "dummy" bit shuts up Automake) * Use "$(xsltproc)" instead of "$(top_builddir)/xsltproc/xsltproc" * Use a less $(MAKE)-heavy invocation in the "tests" target * Replaced a conflicting "clean" target with CLEANFILES * Added a dependency on $(xsltproc) to all the test targets * Added a .PHONY target list tests/docbook/Makefile.am: * Ditched the "echo -n" bit, because it wasn't working as advertised * Create output directories for out-of-source builds * "$(basename $$i)" is a typo in a makefile * Don't embed $(srcdir) in $out/$html/$fo/$msg/$xhtml, so that we can refer to these files in builddir or srcdir * Add a trailing "echo" to complete the "echo -n" * Don't output files unconditionally to srcdir (it may be read-only, for starters) tests/plugins/Makefile.am: * AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an obsolete name (Note that the "$(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)" bit that was here can be dropped entirely, because these already appear in xmlsoft_org_xslt_testplugin_la_CFLAGS) * Use noinst_LTLIBRARIES inside the WITH_MODULES conditional instead of EXTRA_LTLIBRARIES, as this is cleaner (and disallows building the plugin if module support is disabled) * Need to clean up *.res files for "make distcheck" to pass * Use the abs_builddir variable conveniently provided to us by Automake instead of a GNU Make $(shell ...) construct xslt-config.in: * Add EXTRA_LIBS (-lrt on my system), as this is a required dependency when client applications link against -lxslt xsltproc/Makefile.am: * AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an obsolete name * Moved $(LIBXML_CFLAGS) into AM_CFLAGS * Use $(VAR) instead of @VAR@ * Need to clean .memdump for "make distcheck" to pass * Added rules to build lib[e]xslt.la if needed, which allows test makefiles to build xsltproc on the fly even if nothing else has been built already * Create .memdump file in the "tests" target, as it's being grepped afterward
2012-08-09Hardening of code checking node types in various entry pointDaniel Veillard7-61/+86
2012-08-09Cleanup of the pattern compilation codeDaniel Veillard1-6/+47
Avoid potential crashes and memory leaks
2012-08-08Tiny doc improvementDaniel Veillard1-1/+1
2012-08-08Fix default template processing on namespace nodesDaniel Veillard1-1/+6
2012-08-08Fix portability to upcoming libxml2-2.9.0Daniel Veillard1-4/+18
A few place where an output buffer was accessed directly or as an xmlBuf
2012-08-08Adding --system flag support to autogen.shDaniel Veillard1-2/+19
2012-08-07Fix a bug in selecting XSLT elementsDaniel Veillard1-2/+2
2012-03-22Cleanup some misplaced spaces and tabsDaniel Veillard1-9/+8
2012-03-20Allow per-context override of xsltMaxDepth, introduce xsltMaxVarsJérôme Carretero12-4/+54
We also add a maxTemplateVars parameter
2012-03-19Fixed bug #616839Daniel Mustieles2-2/+2
2012-01-27autogen: Only check for libtoolizeColin Walters1-1/+1
/usr/bin/libtool may not be in all installations.
2012-01-22Fix some case of pattern parsing errorsAbhishek Arya1-0/+2
We could accidentally hit an off by one string array access due to improper loop exit when parsing patterns
2012-01-21Augment list of ignred filesDaniel Veillard1-0/+4
2011-12-27autogen.sh: Honor NOCONFIGURE environment variableColin Walters1-5/+6
See http://people.gnome.org/~walters/docs/build-api.txt
2011-12-19minimal mingw supportRoumen Petrov1-2/+9
2011-05-26configure: remove checks for isinf and isnan as those are not used anywayStefan Kost1-6/+0
As pointed out by Roumen Petrov those check were wrong (isinf and isnan are macros) and they are not used in the code either. Thus remove the checks.
2011-05-21configure: acconfig.h is deprecated since autoconf-2.50Stefan Kost2-13/+7
Remove deprecated file (leftover from autoconf-2.13). Change AC_DEFINE into 3-arg versions to provide the comments for config.h. Bump autoconf version to 2.59 (same as libxml).
2011-05-21configure: support silent automake rules if possibleStefan Kost1-0/+5
This gives us a much less noisy build and makes error stand out a lot more.
2011-05-03preproc: fix the buildStefan Kost1-5/+7
Fixup commit 0d6713d715509da1fec27bec220d43aa4fc48d0f that forgot to create the local variable of the required type.
2011-03-11Point to GIT for source code and a bit of cleanupDaniel Veillard3-23/+23
2011-03-07Fix a memory leak with xsl:numberDaniel Veillard5-0/+39
Pointed out by Ralf Junker <ralfjunker@gmx.de>, and added his reproducer to the regression tests
2011-03-07Fix a problem with ESXLT date:add() with Januarymoney_seshu Dronamraju5-2/+28
Also adds a regression test provided by Michael Ludwig <milu71@gmx.de>
2011-02-28Fix a memory leak if compiled with Windows locale supportDaniel Veillard4-0/+21
Ralf Junker <ralfjunker@gmx.de> pointed out a ouple of leaks in the Windows locale support: * libxslt/xslt.c: add cleanup code for the mutex in xsltUninit() * libxslt/xsltlocale.c libxslt/xsltlocale.h: add a new cleanup function xsltFreeLocales * libxslt/extensions.c: add a call to xsltFreeLocales in xsltCleanupGlobals