1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-29 15:41:13 +03:00

134 Commits

Author SHA1 Message Date
33ac060d01 xsltproc: Remove unneeded includes 2024-06-16 16:09:51 +02:00
16f3d7c495 xsltproc: Make "-" read from stdin
This broke after libxml2@0a658c0f.

Fixes #109.
2024-06-14 16:32:17 +02:00
0f1f2c361c xsltproc: Stop calling xmlMemoryDump
Memory dumps were removed from libxml2.
2024-06-12 18:43:48 +02:00
1cd62538c3 xsltproc: Prefer XML_PARSE_NONET over xmlNoNetEntityLoader 2024-06-10 23:09:28 +02:00
75967fc012 xsltproc: remove maxparserdepth option
libxml2 commit a2cc7f5f removed the ability to dynamically set the max
parser depth.
2024-01-03 09:57:24 -05:00
971d5c4dd1 tests: Port most of the test suite to C
Use runtest.c from libxml2 as a starting point.

This finally allows us to run most of tests with CMake and Autotools
VPATH builds.
2022-09-07 22:18:55 +02:00
1c0b183dfd xsltproc: Fix unused variable warning 2022-09-06 17:32:01 +02:00
f9a0817b20 autotools: Use AM_CFLAGS consistently
Don't pollute CFLAGS. Always add LIBXML_CFLAGS and LIBXSLT_CFLAGS.
2022-09-06 17:32:01 +02:00
a0623d9f7a Fix various compiler warnings 2022-09-01 08:19:00 +02:00
3f3e888f1a Add missing compile definition for static builds to Autotools
Related to eaa53788 and 29923816

Closes #73
2022-08-20 13:50:46 -04:00
7bc8450c19 Don't overlink executables with gcrypt
Also fixes the xsltproc build under --with-libxml-src.
2022-07-29 00:59:09 +02:00
e0d9e78b75 Remove special configuration for old maintainers 2022-07-29 00:59:08 +02:00
f2e4f78272 Detect libm using libtool's macros 2022-04-02 14:30:17 +02:00
74e87f96aa Remove useless __CYGWIN__ checks 2022-03-31 01:55:29 +02:00
dd16508642 Don't check for standard C89 headers
Also stop including non-standard headers.
2022-03-31 01:50:51 +02:00
22f12ce58e Stop calling deprecated libxml2 init functions 2022-03-18 15:38:40 +01:00
05cea0c72c Update links
Documentation and releases are now available on gitlab.gnome.org.
2022-02-14 22:31:18 +01:00
2c20c70cd8 Added platform specific path separators
Add path separator symbol for Win32 (;) different from other
platforms (:). The commit is supposed to fix the problem when drive
letters on Windows are interpreted as separate directories.
2020-09-20 17:01:51 +02:00
1ca66bf406 Add --huge Argument via libxml XML_PARSE_HUGE 2020-09-20 16:33:22 +02:00
e176258ef6 Remove WIN32_EXTRA_* variables
Simply use LDFLAGS and LIBS instead.
2019-02-12 12:31:20 +01:00
9210e72590 Fix typos
Fixes bug 788668.
2017-11-04 16:07:59 +01:00
0beb813d64 Use _WIN32 macro instead of WIN32
_WIN32 is defined automatically by the compiler.
2017-10-25 18:22:52 +02:00
ba764e239b Fix xsltproc newlines on Windows
Set stdout and stderr to binary.
2017-10-25 16:34:14 +02:00
8760bb2276 Fix Windows compiler warnings
Fixes bug 788317. Thanks to J. Peter Mugaas for the initial patch.
2017-10-25 16:21:23 +02:00
f996b93610 Silence tests a little 2017-06-01 22:04:21 +02:00
891681e3e9 Allow {URI}NCName syntax for user parameters
Thanks to Richard Smith <richard@ex-parrot.com> for the patch. Applied
with minor changes.

Fixes bug #764195.

https://bugzilla.gnome.org/show_bug.cgi?id=764195
2016-03-28 16:05:26 +02:00
8137d94d1a Fix endTimer parameter type 2016-03-28 15:33:03 +02:00
866fc3b67e Fix libxslt format warnings
* config.h.in: Let autoconf have its way with the file.
* configure.in: Replace "-Wformat" with
"-Wformat=2 -Wmissing-format-attribute".  Add
"-Wformat=2 -Wmissing-format-attribute" to default CFLAGS.
* libxslt/transform.c:
(xsltDocumentElem): Fix missing placeholder in format string.
Make "unsupported method" format strings more consistent by
putting method name in parenthesis.
(xsltApplyStylesheetInternal): Ditto.
* libxslt/xsltconfig.h.in:
(LIBXSLT_ATTR_FORMAT): Add macro to decorate functions that
have format string arguments.
* libxslt/xsltutils.c:
(xsltGenericErrorDefaultFunc): Add macro to decorate functions
that have format string arguments.
(xsltGenericDebugDefaultFunc): Ditto.
* libxslt/xsltutils.h:
(xsltTransformError): Add LIBXSLT_ATTR_FORMAT macro.
* xsltproc/xsltproc.c:
(endTimer): Add predeclaration with LIBXSLT_ATTR_FORMAT macro.

Fixes bug #762006.

https://bugzilla.gnome.org/show_bug.cgi?id=762006
2016-03-28 15:23:09 +02:00
7219c6c3ee Enforce two digit exponent under MSVC
This makes the test output match UNIX.
2016-02-25 14:53:12 +01:00
e75b5da121 Correctly emulate snprintf on older MSVC versions
This uses the code taken from http://stackoverflow.com/a/8712996/1956010

Fixes bug #756691
https://bugzilla.gnome.org/show_bug.cgi?id=756691
2016-02-25 14:46:58 +01:00
66520a2cc0 Fix possible NULL pointer deref in xsltproc.c
Fixes bug #757618.

https://bugzilla.gnome.org/show_bug.cgi?id=757618
2015-12-13 18:55:11 +01:00
73e08bf7c3 Visual Studio 14 CTP defines snprintf()
Related to https://bugzilla.gnome.org/show_bug.cgi?id=737937
related changes for libxslt
2014-10-13 15:17:30 +08:00
e4837cf662 Add math library to executable link flags
Should fix bug #706882:

https://bugzilla.gnome.org/show_bug.cgi?id=706882
2014-02-25 15:02:28 +01:00
5af7ad7453 Make --maxvars option work 2013-12-13 14:45:29 +01:00
02b30799fe Fix for bug 436589
https://bugzilla.gnome.org/show_bug.cgi?id=436589

Need to check availablility of argument before scanning it
2013-09-30 10:18:03 +08:00
3fcf11ead6 Initialize pseudo random number generator with current time or optional command line parameter 2013-02-19 21:17:48 +08:00
90e8b9066d Fix a couple of places where (f)printf parameters were broken
As reported by Thomas Jarosch <thomas.jarosch@intra2net.com>
2013-01-30 17:31:37 +01:00
39b0c27af8 Remove .cvsignore files which are not needed anymore 2012-09-04 14:28:28 +08:00
9e5d4dc5c0 xincludestyle wasn't protected with LIBXML_XINCLUDE_ENABLED
Leading to possible compilation issue if this isn't in libxml2
2012-08-16 17:46:29 +08:00
2d6e741ed9 Portability fix for testThreads.c
Similar to the one in libxml2, don't assume threads id are scalars
2012-08-16 17:27:15 +08:00
e669a8c7ce xsltproc should return an error code if xinclude fails
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-16 17:08:31 +08:00
a2cd8a03ac Various "make distcheck" and other fixes
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-09 19:46:03 +08:00
8785a2ffd0 Cleanup some misplaced spaces and tabs 2012-03-22 10:35:14 +08:00
adff7c36bd Allow per-context override of xsltMaxDepth, introduce xsltMaxVars
We also add a maxTemplateVars parameter
2012-03-20 21:18:59 +08:00
a2e32666e0 Fixed bug #616839 2012-03-19 21:46:45 +01:00
072a80a94b Get rid of specific build setup and STATIC_BINARIES 2010-11-08 10:32:32 +01:00
ae2380fe27 567192 xsltproc --output option ignore --xinclude
* xsltproc/xsltproc.c: the option was not activating XInclude nor
  passing parser flags
2009-08-23 14:58:13 +02:00
c15693f6f4 Make sure testThreads is linked with pthreads
* configure.in: augment thread detection to pass THREADS_LIBS
* xsltproc/Makefile.am: add THREAD_LIBS to testThreads_LDADD
2009-08-20 12:21:52 +02:00
807fdba3dd Improve testThreads a bit
* xsltproc/testThreads.c: load exslt extensions, the test module and
  a bit of output
2009-08-14 09:14:51 +02:00
52588cf2f1 Adding a test program to check thread reentrancy
* xsltproc/testThreads.c: based loosely on libxml2 one, checks
  concurrent use of the same stylesheet and extensions reentrancy
* config.h.in configure.in: we need to check for pthreads
* Makefile.am xsltproc/Makefile.am: add the new program and insert
  in make check
2009-08-14 08:58:50 +02:00