mirror of
https://github.com/reactos/reactos.git
synced 2025-05-25 12:14:32 +00:00
update libxslt to version 1.1.26
svn path=/trunk/; revision=43620
This commit is contained in:
parent
3d8e1d4e02
commit
5923afe8fe
31 changed files with 1744 additions and 735 deletions
110
reactos/dll/3rdparty/libxslt/ChangeLog
vendored
110
reactos/dll/3rdparty/libxslt/ChangeLog
vendored
|
@ -1,3 +1,113 @@
|
|||
Fri Jul 24 10:16:24 CEST 2009 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* libxslt/attributes.c: fix an IDness issue when building the tree
|
||||
|
||||
Tue May 12 09:03:46 CEST 2009 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in: adapt the extra version detection code to git
|
||||
* libxslt.doap: adding RDF dope file
|
||||
|
||||
Fri Jan 23 19:02:28 PST 2009 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* libexslt/strings.c: Fixed indexing error reported by
|
||||
Ron Burk on the mailing list.
|
||||
|
||||
Fri Nov 14 15:06:55 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* python/Makefile.am libxslt/Makefile.am configure.in
|
||||
libexslt/Makefile.am: applied patch from Roumen Petrov for
|
||||
mingw cross compilation problems raised by Rich Jones
|
||||
|
||||
Tue Oct 28 11:55:27 CET 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in Makefile.am: patch from Richard Jones to build
|
||||
shared libs with MinGW cross-compiler
|
||||
|
||||
Tue Oct 7 18:16:08 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* libxslt/pattern.c: prevent some unchecked pointer accesses, patch
|
||||
by Jake Goulding
|
||||
|
||||
Wed Aug 6 20:10:08 HKT 2008 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* Minor cleanup of "typo" and some compilation warnings:
|
||||
tests/namespaces/tst7.xsl: fixed typo detected by new libxml2 code
|
||||
libxslt/keys.c, libxslt/xsltlocale.c, libexslt/date.c: trivial
|
||||
changes for gcc warnings.
|
||||
|
||||
Fri Aug 1 10:16:48 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* libxslt/xsltconfig.h.in libxslt/xslt.c libxslt/extensions.c
|
||||
libxslt/xsltlocale.c libxslt/preproc.c libxslt/xsltutils.c
|
||||
libxslt/xsltlocale.h libxslt/win32config.h configure.in
|
||||
config.h.in win32/configure.js: big patch from Roumen Petrov
|
||||
finishing xsl:sort lang support with many portability issues
|
||||
fixed and feedback from Nick Wellnhofer and Rob Richards
|
||||
|
||||
Fri Aug 1 07:54:02 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* libexslt/crypto.c: fix for CVE-2008-2935 libexslt RC4
|
||||
encryption/decryption functions
|
||||
|
||||
Mon Jul 28 14:46:27 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* configure.in: fix my static linking setup on x86_64
|
||||
|
||||
Sun Jul 27 13:52:10 CEST 2008 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* libxslt/xslt.c: avoid a quadratic behaviour when hitting duplicates
|
||||
exclude-result-prefixes declarations, should fix #544906
|
||||
|
||||
Sat Jul 26 12:43:18 PST 2008 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
*configure.in: fixed option --with-debugger with patch from
|
||||
Arun Ragnavan #544829
|
||||
|
||||
Sat Jul 12 16:36:58 PST 2008 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* libexslt/math.c: fixed incorrect argument popping in
|
||||
exsltMathAtan2Function #541965
|
||||
|
||||
Thu Jul 10 10:04:28 PST 2008 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* libxslt/functions.c: patch from Ron Burk to fix problem
|
||||
with string check for element-available and
|
||||
function-available #530891.
|
||||
|
||||
Tue Jun 24 23:55:48 PST 2008 William Brack <wbrack@mmm.com.hk>
|
||||
|
||||
* libxslt/attrvt.c: added code to handle literal within an
|
||||
AVT #539741.
|
||||
* tests/docs/Makefile.am tests/docs/bug-168.xsl
|
||||
* tests/general/Makefile.am tests/general/bug-168.* add a
|
||||
test for this bug to the regression suite.
|
||||
|
||||
Fri Jun 13 10:58:52 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* libxslt/libxslt.h libexslt/libexslt.h libexslt/exslt.h: patch
|
||||
from Roumen Petrov fixing include path when compiling outside
|
||||
source tree
|
||||
|
||||
Thu Jun 12 11:23:23 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* libxslt/xsltconfig.h.in libxslt/xsltlocale.h configure.in
|
||||
config.h.in win32/configure.js: patch from Nick Wellnhofer and
|
||||
Roumen Petrov to fix some portability problems on the previous
|
||||
xsl:sort locale patch
|
||||
|
||||
Tue Jun 3 18:26:26 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* configure.in libxslt/extra.c libxslt/Makefile.am libxslt/preproc.c
|
||||
libxslt/xsltInternals.h libxslt/xsltlocale.c libxslt/xsltlocale.h
|
||||
libxslt/xsltutils.c win32/Makefile.mingw win32/Makefile.msvc: patch
|
||||
from Nick Wellnhofer adding xsl:sort lang support using the locale
|
||||
support from the C library.
|
||||
|
||||
Tue Jun 3 18:14:55 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* libxslt/extensions.h: as Ralf Junker pointed out
|
||||
xsltExtFunctionLookup was defined but never implemented, removing it
|
||||
|
||||
Tue May 13 17:51:05 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* configure.in doc/*: release of 1.1.24
|
||||
|
|
17
reactos/dll/3rdparty/libxslt/Makefile.am
vendored
17
reactos/dll/3rdparty/libxslt/Makefile.am
vendored
|
@ -24,11 +24,13 @@ xsltinc_HEADERS = \
|
|||
security.h \
|
||||
xsltInternals.h \
|
||||
xsltconfig.h \
|
||||
xsltexports.h
|
||||
xsltexports.h \
|
||||
xsltlocale.h
|
||||
|
||||
libxslt_la_SOURCES = \
|
||||
attrvt.c \
|
||||
xslt.c \
|
||||
xsltlocale.c \
|
||||
xsltutils.c \
|
||||
pattern.c \
|
||||
templates.c \
|
||||
|
@ -50,12 +52,21 @@ libxslt_la_SOURCES = \
|
|||
xsltwin32config.h.in \
|
||||
libxslt.h
|
||||
|
||||
if USE_VERSION_SCRIPT
|
||||
LIBXSLT_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxslt.syms
|
||||
else
|
||||
LIBXSLT_VERSION_SCRIPT =
|
||||
endif
|
||||
|
||||
libxslt_la_LIBADD = $(EXTRA_LIBS)
|
||||
libxslt_la_LDFLAGS = -version-info @LIBXSLT_VERSION_INFO@
|
||||
libxslt_la_LDFLAGS = \
|
||||
$(WIN32_EXTRA_LDFLAGS) \
|
||||
$(LIBXSLT_VERSION_SCRIPT) \
|
||||
-version-info @LIBXSLT_VERSION_INFO@
|
||||
|
||||
man_MANS = libxslt.3
|
||||
|
||||
EXTRA_DIST = $(man_MANS) trio.h triodef.h
|
||||
EXTRA_DIST = $(man_MANS) trio.h triodef.h libxslt.syms
|
||||
|
||||
xsltproc: all
|
||||
@(cd ../xsltproc ; $(MAKE))
|
||||
|
|
295
reactos/dll/3rdparty/libxslt/Makefile.in
vendored
295
reactos/dll/3rdparty/libxslt/Makefile.in
vendored
|
@ -1,8 +1,9 @@
|
|||
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.11 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -17,8 +18,9 @@
|
|||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
|
@ -44,29 +46,45 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
|||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = xsltconfig.h xsltwin32config.h
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(man3dir)" \
|
||||
"$(DESTDIR)$(xsltincdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
libxslt_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
|
||||
am_libxslt_la_OBJECTS = attrvt.lo xslt.lo xsltutils.lo pattern.lo \
|
||||
templates.lo variables.lo keys.lo numbers.lo extensions.lo \
|
||||
extra.lo functions.lo namespaces.lo imports.lo attributes.lo \
|
||||
documents.lo preproc.lo transform.lo security.lo
|
||||
am_libxslt_la_OBJECTS = attrvt.lo xslt.lo xsltlocale.lo xsltutils.lo \
|
||||
pattern.lo templates.lo variables.lo keys.lo numbers.lo \
|
||||
extensions.lo extra.lo functions.lo namespaces.lo imports.lo \
|
||||
attributes.lo documents.lo preproc.lo transform.lo security.lo
|
||||
libxslt_la_OBJECTS = $(am_libxslt_la_OBJECTS)
|
||||
libxslt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libxslt_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||
|
@ -81,7 +99,6 @@ DIST_SOURCES = $(libxslt_la_SOURCES)
|
|||
man3dir = $(mandir)/man3
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
xsltincHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(xsltinc_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
|
@ -89,6 +106,7 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
|||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
|
@ -98,14 +116,12 @@ CCDEPMODE = @CCDEPMODE@
|
|||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
|
@ -115,8 +131,7 @@ EXSLT_INCLUDEDIR = @EXSLT_INCLUDEDIR@
|
|||
EXSLT_LIBDIR = @EXSLT_LIBDIR@
|
||||
EXSLT_LIBS = @EXSLT_LIBS@
|
||||
EXTRA_LIBS = @EXTRA_LIBS@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HTML_DIR = @HTML_DIR@
|
||||
INSTALL = @INSTALL@
|
||||
|
@ -124,6 +139,7 @@ INSTALL_DATA = @INSTALL_DATA@
|
|||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBEXSLT_MAJOR_VERSION = @LIBEXSLT_MAJOR_VERSION@
|
||||
LIBEXSLT_MICRO_VERSION = @LIBEXSLT_MICRO_VERSION@
|
||||
|
@ -151,13 +167,19 @@ LIBXSLT_VERSION = @LIBXSLT_VERSION@
|
|||
LIBXSLT_VERSION_EXTRA = @LIBXSLT_VERSION_EXTRA@
|
||||
LIBXSLT_VERSION_INFO = @LIBXSLT_VERSION_INFO@
|
||||
LIBXSLT_VERSION_NUMBER = @LIBXSLT_VERSION_NUMBER@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MV = @MV@
|
||||
M_LIBS = @M_LIBS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
|
@ -181,7 +203,9 @@ SHELL = @SHELL@
|
|||
STATIC_BINARIES = @STATIC_BINARIES@
|
||||
STRIP = @STRIP@
|
||||
TAR = @TAR@
|
||||
THREAD_LIBS = @THREAD_LIBS@
|
||||
VERSION = @VERSION@
|
||||
VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@
|
||||
WIN32_EXTRA_LDFLAGS = @WIN32_EXTRA_LDFLAGS@
|
||||
WIN32_EXTRA_LIBADD = @WIN32_EXTRA_LIBADD@
|
||||
WITH_CRYPTO = @WITH_CRYPTO@
|
||||
|
@ -190,18 +214,21 @@ WITH_MEM_DEBUG = @WITH_MEM_DEBUG@
|
|||
WITH_MODULES = @WITH_MODULES@
|
||||
WITH_TRIO = @WITH_TRIO@
|
||||
WITH_XSLT_DEBUG = @WITH_XSLT_DEBUG@
|
||||
XMLLINT = @XMLLINT@
|
||||
XML_CONFIG = @XML_CONFIG@
|
||||
XSLTPROC = @XSLTPROC@
|
||||
XSLTPROCDV = @XSLTPROCDV@
|
||||
XSLT_INCLUDEDIR = @XSLT_INCLUDEDIR@
|
||||
XSLT_LIBDIR = @XSLT_LIBDIR@
|
||||
XSLT_LIBS = @XSLT_LIBS@
|
||||
XSLT_LOCALE_WINAPI = @XSLT_LOCALE_WINAPI@
|
||||
XSLT_LOCALE_XLOCALE = @XSLT_LOCALE_XLOCALE@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
|
@ -232,6 +259,7 @@ libdir = @libdir@
|
|||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_ECHO = @lt_ECHO@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
|
@ -245,6 +273,7 @@ sharedstatedir = @sharedstatedir@
|
|||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/libxslt $(LIBXML_CFLAGS)
|
||||
|
@ -270,11 +299,13 @@ xsltinc_HEADERS = \
|
|||
security.h \
|
||||
xsltInternals.h \
|
||||
xsltconfig.h \
|
||||
xsltexports.h
|
||||
xsltexports.h \
|
||||
xsltlocale.h
|
||||
|
||||
libxslt_la_SOURCES = \
|
||||
attrvt.c \
|
||||
xslt.c \
|
||||
xsltlocale.c \
|
||||
xsltutils.c \
|
||||
pattern.c \
|
||||
templates.c \
|
||||
|
@ -296,10 +327,16 @@ libxslt_la_SOURCES = \
|
|||
xsltwin32config.h.in \
|
||||
libxslt.h
|
||||
|
||||
@USE_VERSION_SCRIPT_FALSE@LIBXSLT_VERSION_SCRIPT =
|
||||
@USE_VERSION_SCRIPT_TRUE@LIBXSLT_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/libxslt.syms
|
||||
libxslt_la_LIBADD = $(EXTRA_LIBS)
|
||||
libxslt_la_LDFLAGS = -version-info @LIBXSLT_VERSION_INFO@
|
||||
libxslt_la_LDFLAGS = \
|
||||
$(WIN32_EXTRA_LDFLAGS) \
|
||||
$(LIBXSLT_VERSION_SCRIPT) \
|
||||
-version-info @LIBXSLT_VERSION_INFO@
|
||||
|
||||
man_MANS = libxslt.3
|
||||
EXTRA_DIST = $(man_MANS) trio.h triodef.h
|
||||
EXTRA_DIST = $(man_MANS) trio.h triodef.h libxslt.syms
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
@ -308,14 +345,14 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
|||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libxslt/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libxslt/Makefile
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libxslt/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu libxslt/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
|
@ -333,6 +370,7 @@ $(top_srcdir)/configure: $(am__configure_deps)
|
|||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
xsltconfig.h: $(top_builddir)/config.status $(srcdir)/xsltconfig.h.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
xsltwin32config.h: $(top_builddir)/config.status $(srcdir)/xsltwin32config.h.in
|
||||
|
@ -340,20 +378,24 @@ xsltwin32config.h: $(top_builddir)/config.status $(srcdir)/xsltwin32config.h.in
|
|||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
|
@ -390,25 +432,26 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variables.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xslt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsltlocale.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsltutils.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
@ -418,118 +461,131 @@ mostlyclean-libtool:
|
|||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man3: $(man3_MANS) $(man_MANS)
|
||||
install-man3: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
|
||||
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.3*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
|
||||
else file=$$i; fi; \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
3*) ;; \
|
||||
*) ext='3' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst"; \
|
||||
done
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man3:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man3_MANS) $(dist_man3_MANS) $(nodist_man3_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.3*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
3*) ;; \
|
||||
*) ext='3' ;; \
|
||||
esac; \
|
||||
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
|
||||
inst=`echo $$inst | sed -e 's/^.*\///'`; \
|
||||
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
|
||||
echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man3dir)/$$inst"; \
|
||||
done
|
||||
@list=''; test -n "$(man3dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.3[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
test -z "$$files" || { \
|
||||
echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(man3dir)" && rm -f $$files; }
|
||||
install-xsltincHEADERS: $(xsltinc_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(xsltincdir)" || $(MKDIR_P) "$(DESTDIR)$(xsltincdir)"
|
||||
@list='$(xsltinc_HEADERS)'; for p in $$list; do \
|
||||
@list='$(xsltinc_HEADERS)'; test -n "$(xsltincdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(xsltincHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xsltincdir)/$$f'"; \
|
||||
$(xsltincHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xsltincdir)/$$f"; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(xsltincdir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(xsltincdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-xsltincHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(xsltinc_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(xsltincdir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(xsltincdir)/$$f"; \
|
||||
done
|
||||
@list='$(xsltinc_HEADERS)'; test -n "$(xsltincdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
test -n "$$files" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(xsltincdir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(xsltincdir)" && rm -f $$files
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@list='$(MANS)'; if test -n "$$list"; then \
|
||||
list=`for p in $$list; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
|
||||
if test -n "$$list" && \
|
||||
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
|
||||
echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
|
||||
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
|
||||
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
|
||||
echo " typically \`make maintainer-clean' will remove them" >&2; \
|
||||
exit 1; \
|
||||
else :; fi; \
|
||||
else :; fi
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
|
@ -545,13 +601,17 @@ distdir: $(DISTFILES)
|
|||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
|
@ -582,6 +642,7 @@ clean-generic:
|
|||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
|
@ -603,6 +664,8 @@ dvi-am:
|
|||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
@ -611,20 +674,29 @@ install-data-am: install-man install-xsltincHEADERS
|
|||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man3
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
@ -674,6 +746,7 @@ xsltproc: all
|
|||
|
||||
install-exec-hook:
|
||||
$(mkinstalldirs) "$(DESTDIR)$(libdir)/libxslt-plugins"
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
|
|
7
reactos/dll/3rdparty/libxslt/attributes.c
vendored
7
reactos/dll/3rdparty/libxslt/attributes.c
vendored
|
@ -978,6 +978,13 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
|
|||
if (inst->children->name == xmlStringTextNoenc)
|
||||
copyTxt->name = xmlStringTextNoenc;
|
||||
|
||||
/*
|
||||
* since we create the attribute without content IDness must be
|
||||
* asserted as a second step
|
||||
*/
|
||||
if ((copyTxt->content != NULL) &&
|
||||
(xmlIsID(attr->doc, attr->parent, attr)))
|
||||
xmlAddID(NULL, attr->doc, copyTxt->content, attr);
|
||||
} else {
|
||||
/*
|
||||
* The sequence constructor might be complex, so instantiate it.
|
||||
|
|
12
reactos/dll/3rdparty/libxslt/attrvt.c
vendored
12
reactos/dll/3rdparty/libxslt/attrvt.c
vendored
|
@ -244,7 +244,17 @@ xsltCompileAttr(xsltStylesheetPtr style, xmlAttrPtr attr) {
|
|||
}
|
||||
|
||||
cur++;
|
||||
while ((*cur != 0) && (*cur != '}')) cur++;
|
||||
while ((*cur != 0) && (*cur != '}')) {
|
||||
/* Need to check for literal (bug539741) */
|
||||
if ((*cur == '\'') || (*cur == '"')) {
|
||||
char delim = *(cur++);
|
||||
while ((*cur != 0) && (*cur != delim))
|
||||
cur++;
|
||||
if (*cur != 0)
|
||||
cur++; /* skip the ending delimiter */
|
||||
} else
|
||||
cur++;
|
||||
}
|
||||
if (*cur == 0) {
|
||||
xsltTransformError(NULL, style, attr->parent,
|
||||
"Attribute '%s': The AVT has an unmatched '{'.\n",
|
||||
|
|
225
reactos/dll/3rdparty/libxslt/extensions.c
vendored
225
reactos/dll/3rdparty/libxslt/extensions.c
vendored
|
@ -86,6 +86,7 @@ static xmlHashTablePtr xsltFunctionsHash = NULL;
|
|||
static xmlHashTablePtr xsltElementsHash = NULL;
|
||||
static xmlHashTablePtr xsltTopLevelsHash = NULL;
|
||||
static xmlHashTablePtr xsltModuleHash = NULL;
|
||||
static xmlMutexPtr xsltExtMutex = NULL;
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
|
@ -339,10 +340,14 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
|
|||
return (-1);
|
||||
}
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
/* have we attempted to register this module already? */
|
||||
if (xmlHashLookup(xsltModuleHash, URI) != NULL) {
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
return (-1);
|
||||
}
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
/* transform extension namespace into a module name */
|
||||
protocol = xmlStrstr(URI, BAD_CAST "://");
|
||||
|
@ -368,15 +373,16 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
|
|||
/* determine module directory */
|
||||
ext_directory = (xmlChar *) getenv("LIBXSLT_PLUGINS_PATH");
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"LIBXSLT_PLUGINS_PATH is %s\n", ext_directory);
|
||||
#endif
|
||||
|
||||
if (NULL == ext_directory)
|
||||
if (NULL == ext_directory) {
|
||||
ext_directory = BAD_CAST LIBXSLT_DEFAULT_PLUGINS_PATH();
|
||||
if (NULL == ext_directory)
|
||||
return (-1);
|
||||
if (NULL == ext_directory)
|
||||
return (-1);
|
||||
}
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
else
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"LIBXSLT_PLUGINS_PATH is %s\n", ext_directory);
|
||||
#endif
|
||||
|
||||
/* build the module filename, and confirm the module exists */
|
||||
xmlStrPrintf((xmlChar *) module_filename, sizeof(module_filename),
|
||||
|
@ -429,7 +435,9 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
|
|||
(*regfunc) ();
|
||||
|
||||
/* register this module in our hash */
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
xmlHashAddEntry(xsltModuleHash, URI, (void *) m);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
} else {
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
|
@ -448,7 +456,7 @@ xsltExtModuleRegisterDynamic(const xmlChar * URI)
|
|||
}
|
||||
#else
|
||||
static int
|
||||
xsltExtModuleRegisterDynamic(const xmlChar * ATTRIBUTE_UNUSED URI)
|
||||
xsltExtModuleRegisterDynamic(const xmlChar * URI ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
@ -540,10 +548,14 @@ xsltRegisterExtPrefix(xsltStylesheetPtr style,
|
|||
if (xsltExtensionsHash != NULL) {
|
||||
xsltExtModulePtr module;
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
module = xmlHashLookup(xsltExtensionsHash, URI);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
if (NULL == module) {
|
||||
if (!xsltExtModuleRegisterDynamic(URI)) {
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
module = xmlHashLookup(xsltExtensionsHash, URI);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
}
|
||||
if (module != NULL) {
|
||||
|
@ -575,6 +587,8 @@ int
|
|||
xsltRegisterExtFunction(xsltTransformContextPtr ctxt, const xmlChar * name,
|
||||
const xmlChar * URI, xmlXPathFunction function)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ctxt == NULL) || (name == NULL) ||
|
||||
(URI == NULL) || (function == NULL))
|
||||
return (-1);
|
||||
|
@ -585,8 +599,11 @@ xsltRegisterExtFunction(xsltTransformContextPtr ctxt, const xmlChar * name,
|
|||
ctxt->extFunctions = xmlHashCreate(10);
|
||||
if (ctxt->extFunctions == NULL)
|
||||
return (-1);
|
||||
return (xmlHashAddEntry2
|
||||
(ctxt->extFunctions, name, URI, XML_CAST_FPTR(function)));
|
||||
|
||||
ret = xmlHashAddEntry2(ctxt->extFunctions, name, URI,
|
||||
XML_CAST_FPTR(function));
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -661,7 +678,12 @@ xsltStyleInitializeStylesheetModule(xsltStylesheetPtr style,
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
module = xmlHashLookup(xsltExtensionsHash, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
if (module == NULL) {
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
|
@ -855,7 +877,12 @@ xsltGetExtData(xsltTransformContextPtr ctxt, const xmlChar * URI)
|
|||
void *extData;
|
||||
xsltExtModulePtr module;
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
module = xmlHashLookup(xsltExtensionsHash, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
if (module == NULL) {
|
||||
#ifdef WITH_XSLT_DEBUG_EXTENSIONS
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
|
@ -1235,18 +1262,27 @@ xsltRegisterExtModuleFull(const xmlChar * URI,
|
|||
if (xsltExtensionsHash == NULL)
|
||||
return (-1);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
module = xmlHashLookup(xsltExtensionsHash, URI);
|
||||
if (module != NULL) {
|
||||
if ((module->initFunc == initFunc) &&
|
||||
(module->shutdownFunc == shutdownFunc))
|
||||
return (0);
|
||||
return (-1);
|
||||
ret = 0;
|
||||
else
|
||||
ret = -1;
|
||||
goto done;
|
||||
}
|
||||
module = xsltNewExtModule(initFunc, shutdownFunc,
|
||||
styleInitFunc, styleShutdownFunc);
|
||||
if (module == NULL)
|
||||
return (-1);
|
||||
if (module == NULL) {
|
||||
ret = -1;
|
||||
goto done;
|
||||
}
|
||||
ret = xmlHashAddEntry(xsltExtensionsHash, URI, (void *) module);
|
||||
|
||||
done:
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
@ -1287,9 +1323,13 @@ xsltUnregisterExtModule(const xmlChar * URI)
|
|||
if (xsltExtensionsHash == NULL)
|
||||
return (-1);
|
||||
|
||||
ret =
|
||||
xmlHashRemoveEntry(xsltExtensionsHash, URI,
|
||||
(xmlHashDeallocator) xsltFreeExtModule);
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ret = xmlHashRemoveEntry(xsltExtensionsHash, URI,
|
||||
(xmlHashDeallocator) xsltFreeExtModule);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
|
@ -1304,9 +1344,13 @@ xsltUnregisterAllExtModules(void)
|
|||
if (xsltExtensionsHash == NULL)
|
||||
return;
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
xmlHashFree(xsltExtensionsHash,
|
||||
(xmlHashDeallocator) xsltFreeExtModule);
|
||||
xsltExtensionsHash = NULL;
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1351,9 +1395,13 @@ xsltRegisterExtModuleFunction(const xmlChar * name, const xmlChar * URI,
|
|||
if (xsltFunctionsHash == NULL)
|
||||
return (-1);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
xmlHashUpdateEntry2(xsltFunctionsHash, name, URI,
|
||||
XML_CAST_FPTR(function), NULL);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1374,13 +1422,21 @@ xsltExtModuleFunctionLookup(const xmlChar * name, const xmlChar * URI)
|
|||
if ((xsltFunctionsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (NULL);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
XML_CAST_FPTR(ret) = xmlHashLookup2(xsltFunctionsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
/* if lookup fails, attempt a dynamic load on supported platforms */
|
||||
if (NULL == ret) {
|
||||
if (!xsltExtModuleRegisterDynamic(URI)) {
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
XML_CAST_FPTR(ret) =
|
||||
xmlHashLookup2(xsltFunctionsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1399,10 +1455,18 @@ xsltExtModuleFunctionLookup(const xmlChar * name, const xmlChar * URI)
|
|||
int
|
||||
xsltUnregisterExtModuleFunction(const xmlChar * name, const xmlChar * URI)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((xsltFunctionsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (-1);
|
||||
|
||||
return xmlHashRemoveEntry2(xsltFunctionsHash, name, URI, NULL);
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ret = xmlHashRemoveEntry2(xsltFunctionsHash, name, URI, NULL);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1413,8 +1477,12 @@ xsltUnregisterExtModuleFunction(const xmlChar * name, const xmlChar * URI)
|
|||
static void
|
||||
xsltUnregisterAllExtModuleFunction(void)
|
||||
{
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
xmlHashFree(xsltFunctionsHash, NULL);
|
||||
xsltFunctionsHash = NULL;
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1494,8 +1562,13 @@ xsltPreComputeExtModuleElement(xsltStylesheetPtr style, xmlNodePtr inst)
|
|||
(inst->type != XML_ELEMENT_NODE) || (inst->ns == NULL))
|
||||
return (NULL);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ext = (xsltExtElementPtr)
|
||||
xmlHashLookup2(xsltElementsHash, inst->name, inst->ns->href);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
/*
|
||||
* EXT TODO: Now what?
|
||||
*/
|
||||
|
@ -1549,6 +1622,8 @@ xsltRegisterExtModuleElement(const xmlChar * name, const xmlChar * URI,
|
|||
xsltPreComputeFunction precomp,
|
||||
xsltTransformFunction transform)
|
||||
{
|
||||
int ret;
|
||||
|
||||
xsltExtElementPtr ext;
|
||||
|
||||
if ((name == NULL) || (URI == NULL) || (transform == NULL))
|
||||
|
@ -1559,13 +1634,20 @@ xsltRegisterExtModuleElement(const xmlChar * name, const xmlChar * URI,
|
|||
if (xsltElementsHash == NULL)
|
||||
return (-1);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ext = xsltNewExtElement(precomp, transform);
|
||||
if (ext == NULL)
|
||||
return (-1);
|
||||
if (ext == NULL) {
|
||||
ret = -1;
|
||||
goto done;
|
||||
}
|
||||
|
||||
xmlHashUpdateEntry2(xsltElementsHash, name, URI, (void *) ext,
|
||||
(xmlHashDeallocator) xsltFreeExtElement);
|
||||
|
||||
done:
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1591,10 +1673,14 @@ xsltExtElementLookup(xsltTransformContextPtr ctxt,
|
|||
|
||||
if ((ctxt != NULL) && (ctxt->extElements != NULL)) {
|
||||
XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt->extElements, name, URI);
|
||||
if (ret != NULL)
|
||||
return (ret);
|
||||
if (ret != NULL) {
|
||||
return(ret);
|
||||
}
|
||||
}
|
||||
return xsltExtModuleElementLookup(name, URI);
|
||||
|
||||
ret = xsltExtModuleElementLookup(name, URI);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1614,14 +1700,24 @@ xsltExtModuleElementLookup(const xmlChar * name, const xmlChar * URI)
|
|||
if ((xsltElementsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (NULL);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ext = (xsltExtElementPtr) xmlHashLookup2(xsltElementsHash, name, URI);
|
||||
|
||||
/* if function lookup fails, attempt a dynamic load on supported platforms */
|
||||
ext = (xsltExtElementPtr) xmlHashLookup2(xsltElementsHash, name, URI);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
/*
|
||||
* if function lookup fails, attempt a dynamic load on
|
||||
* supported platforms
|
||||
*/
|
||||
if (NULL == ext) {
|
||||
if (!xsltExtModuleRegisterDynamic(URI)) {
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ext = (xsltExtElementPtr)
|
||||
xmlHashLookup2(xsltElementsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1648,12 +1744,20 @@ xsltExtModuleElementPreComputeLookup(const xmlChar * name,
|
|||
if ((xsltElementsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (NULL);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ext = (xsltExtElementPtr) xmlHashLookup2(xsltElementsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
if (ext == NULL) {
|
||||
if (!xsltExtModuleRegisterDynamic(URI)) {
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ext = (xsltExtElementPtr)
|
||||
xmlHashLookup2(xsltElementsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1674,11 +1778,19 @@ xsltExtModuleElementPreComputeLookup(const xmlChar * name,
|
|||
int
|
||||
xsltUnregisterExtModuleElement(const xmlChar * name, const xmlChar * URI)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((xsltElementsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (-1);
|
||||
|
||||
return xmlHashRemoveEntry2(xsltElementsHash, name, URI,
|
||||
(xmlHashDeallocator) xsltFreeExtElement);
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ret = xmlHashRemoveEntry2(xsltElementsHash, name, URI,
|
||||
(xmlHashDeallocator) xsltFreeExtElement);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1689,8 +1801,12 @@ xsltUnregisterExtModuleElement(const xmlChar * name, const xmlChar * URI)
|
|||
static void
|
||||
xsltUnregisterAllExtModuleElement(void)
|
||||
{
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
xmlHashFree(xsltElementsHash, (xmlHashDeallocator) xsltFreeExtElement);
|
||||
xsltElementsHash = NULL;
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1715,9 +1831,13 @@ xsltRegisterExtModuleTopLevel(const xmlChar * name, const xmlChar * URI,
|
|||
if (xsltTopLevelsHash == NULL)
|
||||
return (-1);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
xmlHashUpdateEntry2(xsltTopLevelsHash, name, URI,
|
||||
XML_CAST_FPTR(function), NULL);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -1738,12 +1858,20 @@ xsltExtModuleTopLevelLookup(const xmlChar * name, const xmlChar * URI)
|
|||
if ((xsltTopLevelsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (NULL);
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
XML_CAST_FPTR(ret) = xmlHashLookup2(xsltTopLevelsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
/* if lookup fails, attempt a dynamic load on supported platforms */
|
||||
if (NULL == ret) {
|
||||
if (!xsltExtModuleRegisterDynamic(URI)) {
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
XML_CAST_FPTR(ret) = xmlHashLookup2(xsltTopLevelsHash, name, URI);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1762,10 +1890,18 @@ xsltExtModuleTopLevelLookup(const xmlChar * name, const xmlChar * URI)
|
|||
int
|
||||
xsltUnregisterExtModuleTopLevel(const xmlChar * name, const xmlChar * URI)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((xsltTopLevelsHash == NULL) || (name == NULL) || (URI == NULL))
|
||||
return (-1);
|
||||
|
||||
return xmlHashRemoveEntry2(xsltTopLevelsHash, name, URI, NULL);
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
ret = xmlHashRemoveEntry2(xsltTopLevelsHash, name, URI, NULL);
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1776,8 +1912,12 @@ xsltUnregisterExtModuleTopLevel(const xmlChar * name, const xmlChar * URI)
|
|||
static void
|
||||
xsltUnregisterAllExtModuleTopLevel(void)
|
||||
{
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
|
||||
xmlHashFree(xsltTopLevelsHash, NULL);
|
||||
xsltTopLevelsHash = NULL;
|
||||
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2088,6 +2228,7 @@ xsltExtStyleShutdownTest(xsltStylesheetPtr style ATTRIBUTE_UNUSED,
|
|||
void
|
||||
xsltRegisterTestModule(void)
|
||||
{
|
||||
xsltInitGlobals();
|
||||
xsltRegisterExtModuleFull((const xmlChar *) XSLT_DEFAULT_URL,
|
||||
xsltExtInitTest, xsltExtShutdownTest,
|
||||
xsltExtStyleInitTest,
|
||||
|
@ -2102,7 +2243,8 @@ xsltRegisterTestModule(void)
|
|||
}
|
||||
|
||||
static void
|
||||
xsltHashScannerModuleFree(void *payload, void *data ATTRIBUTE_UNUSED,
|
||||
xsltHashScannerModuleFree(void *payload ATTRIBUTE_UNUSED,
|
||||
void *data ATTRIBUTE_UNUSED,
|
||||
xmlChar * name ATTRIBUTE_UNUSED)
|
||||
{
|
||||
#ifdef WITH_MODULES
|
||||
|
@ -2110,6 +2252,19 @@ xsltHashScannerModuleFree(void *payload, void *data ATTRIBUTE_UNUSED,
|
|||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltInitGlobals:
|
||||
*
|
||||
* Initialize the global variables for extensions
|
||||
*/
|
||||
void
|
||||
xsltInitGlobals(void)
|
||||
{
|
||||
if (xsltExtMutex == NULL) {
|
||||
xsltExtMutex = xmlNewMutex();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltCleanupGlobals:
|
||||
*
|
||||
|
@ -2123,13 +2278,17 @@ xsltCleanupGlobals(void)
|
|||
xsltUnregisterAllExtModuleElement();
|
||||
xsltUnregisterAllExtModuleTopLevel();
|
||||
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
/* cleanup dynamic module hash */
|
||||
if (NULL != xsltModuleHash) {
|
||||
xmlHashScan(xsltModuleHash, xsltHashScannerModuleFree, 0);
|
||||
xmlHashFree(xsltModuleHash, NULL);
|
||||
xsltModuleHash = NULL;
|
||||
}
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
|
||||
xmlFreeMutex(xsltExtMutex);
|
||||
xsltExtMutex = NULL;
|
||||
xsltUninit();
|
||||
}
|
||||
|
||||
|
@ -2172,25 +2331,31 @@ xsltDebugDumpExtensions(FILE * output)
|
|||
fprintf(output, "No registered extension functions\n");
|
||||
else {
|
||||
fprintf(output, "Registered Extension Functions:\n");
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
xmlHashScanFull(xsltFunctionsHash,
|
||||
(xmlHashScannerFull)
|
||||
xsltDebugDumpExtensionsCallback, output);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
if (!xsltElementsHash)
|
||||
fprintf(output, "\nNo registered extension elements\n");
|
||||
else {
|
||||
fprintf(output, "\nRegistered Extension Elements:\n");
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
xmlHashScanFull(xsltElementsHash,
|
||||
(xmlHashScannerFull)
|
||||
xsltDebugDumpExtensionsCallback, output);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
if (!xsltExtensionsHash)
|
||||
fprintf(output, "\nNo registered extension modules\n");
|
||||
else {
|
||||
fprintf(output, "\nRegistered Extension Modules:\n");
|
||||
xmlMutexLock(xsltExtMutex);
|
||||
xmlHashScanFull(xsltExtensionsHash,
|
||||
(xmlHashScannerFull)
|
||||
xsltDebugDumpExtModulesCallback, output);
|
||||
xmlMutexUnlock(xsltExtMutex);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
92
reactos/dll/3rdparty/libxslt/extensions.h
vendored
92
reactos/dll/3rdparty/libxslt/extensions.h
vendored
|
@ -23,6 +23,16 @@ extern "C" {
|
|||
* Extension Modules API.
|
||||
*/
|
||||
|
||||
/**
|
||||
* xsltInitGlobals:
|
||||
*
|
||||
* Initialize the global variables for extensions
|
||||
*
|
||||
*/
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltInitGlobals (void);
|
||||
|
||||
/**
|
||||
* xsltStyleExtInitFunction:
|
||||
* @ctxt: an XSLT stylesheet
|
||||
|
@ -86,11 +96,11 @@ XSLTPUBFUN int XSLTCALL
|
|||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModule (const xmlChar * URI);
|
||||
|
||||
XSLTPUBFUN void * XSLTCALL
|
||||
XSLTPUBFUN void * XSLTCALL
|
||||
xsltGetExtData (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *URI);
|
||||
|
||||
XSLTPUBFUN void * XSLTCALL
|
||||
XSLTPUBFUN void * XSLTCALL
|
||||
xsltStyleGetExtData (xsltStylesheetPtr style,
|
||||
const xmlChar *URI);
|
||||
#ifdef XSLT_REFACTORED
|
||||
|
@ -99,33 +109,29 @@ XSLTPUBFUN void * XSLTCALL
|
|||
xsltStylesheetPtr style,
|
||||
const xmlChar * URI);
|
||||
#endif
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltShutdownCtxtExts (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltShutdownCtxtExts (xsltTransformContextPtr ctxt);
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltShutdownExts (xsltStylesheetPtr style);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltShutdownExts (xsltStylesheetPtr style);
|
||||
|
||||
XSLTPUBFUN xsltTransformContextPtr XSLTCALL
|
||||
xsltXPathGetTransformContext
|
||||
XSLTPUBFUN xsltTransformContextPtr XSLTCALL
|
||||
xsltXPathGetTransformContext
|
||||
(xmlXPathParserContextPtr ctxt);
|
||||
|
||||
/*
|
||||
* extension functions
|
||||
*/
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtModuleFunction
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtModuleFunction
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI,
|
||||
xmlXPathFunction function);
|
||||
XSLTPUBFUN xmlXPathFunction XSLTCALL
|
||||
xsltExtFunctionLookup (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN xmlXPathFunction XSLTCALL
|
||||
xsltExtModuleFunctionLookup (const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModuleFunction
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModuleFunction
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
|
||||
|
@ -133,7 +139,7 @@ XSLTPUBFUN int XSLTCALL
|
|||
* extension elements
|
||||
*/
|
||||
typedef xsltElemPreCompPtr (*xsltPreComputeFunction)
|
||||
(xsltStylesheetPtr style,
|
||||
(xsltStylesheetPtr style,
|
||||
xmlNodePtr inst,
|
||||
xsltTransformFunction function);
|
||||
|
||||
|
@ -141,33 +147,33 @@ XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
|
|||
xsltNewElemPreComp (xsltStylesheetPtr style,
|
||||
xmlNodePtr inst,
|
||||
xsltTransformFunction function);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltInitElemPreComp (xsltElemPreCompPtr comp,
|
||||
xsltStylesheetPtr style,
|
||||
xmlNodePtr inst,
|
||||
xsltTransformFunction function,
|
||||
xsltElemPreCompDeallocator freeFunc);
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtModuleElement
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtModuleElement
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI,
|
||||
xsltPreComputeFunction precomp,
|
||||
xsltTransformFunction transform);
|
||||
XSLTPUBFUN xsltTransformFunction XSLTCALL
|
||||
XSLTPUBFUN xsltTransformFunction XSLTCALL
|
||||
xsltExtElementLookup (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN xsltTransformFunction XSLTCALL
|
||||
XSLTPUBFUN xsltTransformFunction XSLTCALL
|
||||
xsltExtModuleElementLookup
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN xsltPreComputeFunction XSLTCALL
|
||||
xsltExtModuleElementPreComputeLookup
|
||||
XSLTPUBFUN xsltPreComputeFunction XSLTCALL
|
||||
xsltExtModuleElementPreComputeLookup
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModuleElement
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModuleElement
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
|
||||
|
@ -177,28 +183,28 @@ XSLTPUBFUN int XSLTCALL
|
|||
typedef void (*xsltTopLevelFunction) (xsltStylesheetPtr style,
|
||||
xmlNodePtr inst);
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtModuleTopLevel
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI,
|
||||
xsltTopLevelFunction function);
|
||||
XSLTPUBFUN xsltTopLevelFunction XSLTCALL
|
||||
xsltExtModuleTopLevelLookup
|
||||
XSLTPUBFUN xsltTopLevelFunction XSLTCALL
|
||||
xsltExtModuleTopLevelLookup
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModuleTopLevel
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltUnregisterExtModuleTopLevel
|
||||
(const xmlChar *name,
|
||||
const xmlChar *URI);
|
||||
|
||||
|
||||
/* These 2 functions are deprecated for use within modules. */
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtFunction (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *URI,
|
||||
xmlXPathFunction function);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtElement (xsltTransformContextPtr ctxt,
|
||||
const xmlChar *name,
|
||||
const xmlChar *URI,
|
||||
|
@ -209,24 +215,24 @@ XSLTPUBFUN int XSLTCALL
|
|||
* Those are used by the XSLT (pre)processor.
|
||||
*/
|
||||
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRegisterExtPrefix (xsltStylesheetPtr style,
|
||||
const xmlChar *prefix,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltCheckExtPrefix (xsltStylesheetPtr style,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltCheckExtURI (xsltStylesheetPtr style,
|
||||
const xmlChar *URI);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltInitCtxtExts (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeCtxtExts (xsltTransformContextPtr ctxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeExts (xsltStylesheetPtr style);
|
||||
|
||||
XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
|
||||
XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
|
||||
xsltPreComputeExtModuleElement
|
||||
(xsltStylesheetPtr style,
|
||||
xmlNodePtr inst);
|
||||
|
@ -235,16 +241,16 @@ XSLTPUBFUN xsltElemPreCompPtr XSLTCALL
|
|||
* Used by exslt initialisation
|
||||
*/
|
||||
|
||||
XSLTPUBFUN xmlHashTablePtr XSLTCALL
|
||||
xsltGetExtInfo (xsltStylesheetPtr style,
|
||||
XSLTPUBFUN xmlHashTablePtr XSLTCALL
|
||||
xsltGetExtInfo (xsltStylesheetPtr style,
|
||||
const xmlChar *URI);
|
||||
|
||||
/**
|
||||
* Test module http://xmlsoft.org/XSLT/
|
||||
*/
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltRegisterTestModule (void);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDebugDumpExtensions (FILE * output);
|
||||
|
||||
|
||||
|
|
3
reactos/dll/3rdparty/libxslt/extra.c
vendored
3
reactos/dll/3rdparty/libxslt/extra.c
vendored
|
@ -15,7 +15,6 @@
|
|||
|
||||
#include <string.h>
|
||||
#ifdef HAVE_TIME_H
|
||||
#define __USE_XOPEN
|
||||
#include <time.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
|
@ -199,7 +198,7 @@ xsltFunctionLocalTime(xmlXPathParserContextPtr ctxt, int nargs) {
|
|||
|
||||
str = (char *) obj->stringval;
|
||||
|
||||
/* str = "$Date: 2002-10-15 18:06:47 +0200 (Tue, 15 Oct 2002) $" */
|
||||
/* str = "$Date$" */
|
||||
memset(digits, 0, sizeof(digits));
|
||||
strncpy(digits, str+7, 4);
|
||||
field = strtol(digits, NULL, 10);
|
||||
|
|
2
reactos/dll/3rdparty/libxslt/functions.c
vendored
2
reactos/dll/3rdparty/libxslt/functions.c
vendored
|
@ -813,6 +813,7 @@ xsltElementAvailableFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
ctxt->error = XPATH_INVALID_ARITY;
|
||||
return;
|
||||
}
|
||||
xmlXPathStringFunction(ctxt, 1);
|
||||
if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) {
|
||||
xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
|
||||
"element-available() : invalid arg expecting a string\n");
|
||||
|
@ -878,6 +879,7 @@ xsltFunctionAvailableFunction(xmlXPathParserContextPtr ctxt, int nargs){
|
|||
ctxt->error = XPATH_INVALID_ARITY;
|
||||
return;
|
||||
}
|
||||
xmlXPathStringFunction(ctxt, 1);
|
||||
if ((ctxt->value == NULL) || (ctxt->value->type != XPATH_STRING)) {
|
||||
xsltTransformError(xsltXPathGetTransformContext(ctxt), NULL, NULL,
|
||||
"function-available() : invalid arg expecting a string\n");
|
||||
|
|
7
reactos/dll/3rdparty/libxslt/imports.c
vendored
7
reactos/dll/3rdparty/libxslt/imports.c
vendored
|
@ -348,6 +348,11 @@ xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt, xmlNodePtr node) {
|
|||
if (node->ns != NULL) {
|
||||
val = (const xmlChar *)
|
||||
xmlHashLookup2(style->stripSpaces, node->name, node->ns->href);
|
||||
if (val == NULL) {
|
||||
val = (const xmlChar *)
|
||||
xmlHashLookup2(style->stripSpaces, BAD_CAST "*",
|
||||
node->ns->href);
|
||||
}
|
||||
} else {
|
||||
val = (const xmlChar *)
|
||||
xmlHashLookup2(style->stripSpaces, node->name, NULL);
|
||||
|
@ -357,7 +362,7 @@ xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt, xmlNodePtr node) {
|
|||
return(1);
|
||||
if (xmlStrEqual(val, (xmlChar *) "preserve"))
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
if (style->stripAll == 1)
|
||||
return(1);
|
||||
if (style->stripAll == -1)
|
||||
|
|
5
reactos/dll/3rdparty/libxslt/keys.c
vendored
5
reactos/dll/3rdparty/libxslt/keys.c
vendored
|
@ -504,7 +504,7 @@ fprintf(stderr, "xsltInitDocKeyTable %s\n", name);
|
|||
XSLT_TRACE(ctxt,XSLT_TRACE_KEYS,xsltGenericDebug(xsltGenericDebugContext,
|
||||
"xsltInitDocKeyTable: did not found %s\n", name));
|
||||
#endif
|
||||
xsltTransformError(ctxt, NULL, keyd->inst,
|
||||
xsltTransformError(ctxt, NULL, keyd? keyd->inst : NULL,
|
||||
"Failed to find key definition for %s\n", name);
|
||||
ctxt->state = XSLT_STATE_STOPPED;
|
||||
return(-1);
|
||||
|
@ -517,10 +517,13 @@ fprintf(stderr, "xsltInitDocKeyTable %s done\n", name);
|
|||
|
||||
/**
|
||||
* xsltInitAllDocKeys:
|
||||
* @ctxt: transformation context
|
||||
*
|
||||
* INTERNAL ROUTINE ONLY
|
||||
*
|
||||
* Check if any keys on the current document need to be computed
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of failure
|
||||
*/
|
||||
int
|
||||
xsltInitAllDocKeys(xsltTransformContextPtr ctxt)
|
||||
|
|
2
reactos/dll/3rdparty/libxslt/libxslt.h
vendored
2
reactos/dll/3rdparty/libxslt/libxslt.h
vendored
|
@ -16,7 +16,7 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "xsltconfig.h"
|
||||
#include <libxslt/xsltconfig.h>
|
||||
#include <libxml/xmlversion.h>
|
||||
|
||||
#if !defined LIBXSLT_PUBLIC
|
||||
|
|
1
reactos/dll/3rdparty/libxslt/libxslt.rbuild
vendored
1
reactos/dll/3rdparty/libxslt/libxslt.rbuild
vendored
|
@ -30,5 +30,6 @@
|
|||
<file>transform.c</file>
|
||||
<file>variables.c</file>
|
||||
<file>xslt.c</file>
|
||||
<file>xsltlocale.c</file>
|
||||
<file>xsltutils.c</file>
|
||||
</module>
|
||||
|
|
4
reactos/dll/3rdparty/libxslt/namespaces.c
vendored
4
reactos/dll/3rdparty/libxslt/namespaces.c
vendored
|
@ -584,6 +584,10 @@ declare_new_prefix:
|
|||
xmlChar pref[30];
|
||||
int counter = 1;
|
||||
|
||||
if (nsPrefix == NULL) {
|
||||
nsPrefix = "ns";
|
||||
}
|
||||
|
||||
do {
|
||||
snprintf((char *) pref, 30, "%s_%d", nsPrefix, counter++);
|
||||
ns = xmlSearchNs(target->doc, target, BAD_CAST pref);
|
||||
|
|
258
reactos/dll/3rdparty/libxslt/pattern.c
vendored
258
reactos/dll/3rdparty/libxslt/pattern.c
vendored
|
@ -46,7 +46,6 @@ typedef enum {
|
|||
XSLT_OP_END=0,
|
||||
XSLT_OP_ROOT,
|
||||
XSLT_OP_ELEM,
|
||||
XSLT_OP_CHILD,
|
||||
XSLT_OP_ATTR,
|
||||
XSLT_OP_PARENT,
|
||||
XSLT_OP_ANCESTOR,
|
||||
|
@ -61,6 +60,11 @@ typedef enum {
|
|||
XSLT_OP_PREDICATE
|
||||
} xsltOp;
|
||||
|
||||
typedef enum {
|
||||
AXIS_CHILD=1,
|
||||
AXIS_ATTRIBUTE
|
||||
} xsltAxis;
|
||||
|
||||
typedef struct _xsltStepState xsltStepState;
|
||||
typedef xsltStepState *xsltStepStatePtr;
|
||||
struct _xsltStepState {
|
||||
|
@ -697,32 +701,6 @@ restart:
|
|||
goto rollback;
|
||||
}
|
||||
continue;
|
||||
case XSLT_OP_CHILD: {
|
||||
xmlNodePtr lst;
|
||||
|
||||
if ((node->type != XML_ELEMENT_NODE) &&
|
||||
(node->type != XML_DOCUMENT_NODE) &&
|
||||
#ifdef LIBXML_DOCB_ENABLED
|
||||
(node->type != XML_DOCB_DOCUMENT_NODE) &&
|
||||
#endif
|
||||
(node->type != XML_HTML_DOCUMENT_NODE))
|
||||
goto rollback;
|
||||
|
||||
lst = node->children;
|
||||
|
||||
if (step->value != NULL) {
|
||||
while (lst != NULL) {
|
||||
if ((lst->type == XML_ELEMENT_NODE) &&
|
||||
(step->value[0] == lst->name[0]) &&
|
||||
(xmlStrEqual(step->value, lst->name)))
|
||||
break;
|
||||
lst = lst->next;
|
||||
}
|
||||
if (lst != NULL)
|
||||
continue;
|
||||
}
|
||||
goto rollback;
|
||||
}
|
||||
case XSLT_OP_ATTR:
|
||||
if (node->type != XML_ATTRIBUTE_NODE)
|
||||
goto rollback;
|
||||
|
@ -984,8 +962,10 @@ restart:
|
|||
/*
|
||||
* recompute the index
|
||||
*/
|
||||
xmlNodePtr siblings = node->parent->children;
|
||||
xmlNodePtr parent = node->parent;
|
||||
xmlNodePtr siblings = NULL;
|
||||
|
||||
if (parent) siblings = parent->children;
|
||||
|
||||
while (siblings != NULL) {
|
||||
if (siblings->type == XML_ELEMENT_NODE) {
|
||||
|
@ -1088,8 +1068,10 @@ restart:
|
|||
/*
|
||||
* recompute the index
|
||||
*/
|
||||
xmlNodePtr siblings = node->parent->children;
|
||||
xmlNodePtr parent = node->parent;
|
||||
xmlNodePtr siblings = NULL;
|
||||
|
||||
if (parent) siblings = parent->children;
|
||||
|
||||
while (siblings != NULL) {
|
||||
if (siblings->type == XML_ELEMENT_NODE) {
|
||||
|
@ -1325,46 +1307,6 @@ xsltScanLiteral(xsltParserContextPtr ctxt) {
|
|||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltScanName:
|
||||
* @ctxt: the XPath Parser context
|
||||
*
|
||||
* [4] NameChar ::= Letter | Digit | '.' | '-' | '_' |
|
||||
* CombiningChar | Extender
|
||||
*
|
||||
* [5] Name ::= (Letter | '_' | ':') (NameChar)*
|
||||
*
|
||||
* [6] Names ::= Name (S Name)*
|
||||
*
|
||||
* Returns the Name parsed or NULL
|
||||
*/
|
||||
|
||||
static xmlChar *
|
||||
xsltScanName(xsltParserContextPtr ctxt) {
|
||||
const xmlChar *q, *cur;
|
||||
xmlChar *ret = NULL;
|
||||
int val, len;
|
||||
|
||||
SKIP_BLANKS;
|
||||
|
||||
cur = q = CUR_PTR;
|
||||
val = xmlStringCurrentChar(NULL, cur, &len);
|
||||
if (!IS_LETTER(val) && (val != '_') && (val != ':'))
|
||||
return(NULL);
|
||||
|
||||
while ((IS_LETTER(val)) || (IS_DIGIT(val)) ||
|
||||
(val == '.') || (val == '-') ||
|
||||
(val == '_') ||
|
||||
(IS_COMBINING(val)) ||
|
||||
(IS_EXTENDER(val))) {
|
||||
cur += len;
|
||||
val = xmlStringCurrentChar(NULL, cur, &len);
|
||||
}
|
||||
ret = xmlStrndup(q, cur - q);
|
||||
CUR_PTR = cur;
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltScanNCName:
|
||||
* @ctxt: the XPath Parser context
|
||||
|
@ -1400,30 +1342,6 @@ xsltScanNCName(xsltParserContextPtr ctxt) {
|
|||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltScanQName:
|
||||
* @ctxt: the XPath Parser context
|
||||
* @prefix: the place to store the prefix
|
||||
*
|
||||
* Parse a qualified name
|
||||
*
|
||||
* Returns the Name parsed or NULL
|
||||
*/
|
||||
|
||||
static xmlChar *
|
||||
xsltScanQName(xsltParserContextPtr ctxt, xmlChar **prefix) {
|
||||
xmlChar *ret = NULL;
|
||||
|
||||
*prefix = NULL;
|
||||
ret = xsltScanNCName(ctxt);
|
||||
if (CUR == ':') {
|
||||
*prefix = ret;
|
||||
NEXT;
|
||||
ret = xsltScanNCName(ctxt);
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* xsltCompileIdKeyPattern:
|
||||
* @ctxt: the compilation context
|
||||
|
@ -1443,7 +1361,7 @@ xsltScanQName(xsltParserContextPtr ctxt, xmlChar **prefix) {
|
|||
*/
|
||||
static void
|
||||
xsltCompileIdKeyPattern(xsltParserContextPtr ctxt, xmlChar *name,
|
||||
int aid, int novar) {
|
||||
int aid, int novar, xsltAxis axis) {
|
||||
xmlChar *lit = NULL;
|
||||
xmlChar *lit2 = NULL;
|
||||
|
||||
|
@ -1454,6 +1372,12 @@ xsltCompileIdKeyPattern(xsltParserContextPtr ctxt, xmlChar *name,
|
|||
return;
|
||||
}
|
||||
if ((aid) && (xmlStrEqual(name, (const xmlChar *)"id"))) {
|
||||
if (axis != 0) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileIdKeyPattern : NodeTest expected\n");
|
||||
ctxt->error = 1;
|
||||
return;
|
||||
}
|
||||
NEXT;
|
||||
SKIP_BLANKS;
|
||||
lit = xsltScanLiteral(ctxt);
|
||||
|
@ -1469,6 +1393,12 @@ xsltCompileIdKeyPattern(xsltParserContextPtr ctxt, xmlChar *name,
|
|||
NEXT;
|
||||
PUSH(XSLT_OP_ID, lit, NULL, novar);
|
||||
} else if ((aid) && (xmlStrEqual(name, (const xmlChar *)"key"))) {
|
||||
if (axis != 0) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileIdKeyPattern : NodeTest expected\n");
|
||||
ctxt->error = 1;
|
||||
return;
|
||||
}
|
||||
NEXT;
|
||||
SKIP_BLANKS;
|
||||
lit = xsltScanLiteral(ctxt);
|
||||
|
@ -1545,7 +1475,12 @@ xsltCompileIdKeyPattern(xsltParserContextPtr ctxt, xmlChar *name,
|
|||
return;
|
||||
}
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_NODE, NULL, NULL, novar);
|
||||
if (axis == AXIS_ATTRIBUTE) {
|
||||
PUSH(XSLT_OP_ATTR, NULL, NULL, novar);
|
||||
}
|
||||
else {
|
||||
PUSH(XSLT_OP_NODE, NULL, NULL, novar);
|
||||
}
|
||||
} else if (aid) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileIdKeyPattern : expecting 'key' or 'id' or node type\n");
|
||||
|
@ -1590,51 +1525,25 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
const xmlChar *URI = NULL;
|
||||
xmlChar *URL = NULL;
|
||||
int level;
|
||||
xsltAxis axis = 0;
|
||||
|
||||
SKIP_BLANKS;
|
||||
if ((token == NULL) && (CUR == '@')) {
|
||||
xmlChar *prefix = NULL;
|
||||
|
||||
NEXT;
|
||||
if (CUR == '*') {
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_ATTR, NULL, NULL, novar);
|
||||
goto parse_predicate;
|
||||
}
|
||||
token = xsltScanQName(ctxt, &prefix);
|
||||
if (prefix != NULL) {
|
||||
xmlNsPtr ns;
|
||||
|
||||
ns = xmlSearchNs(ctxt->doc, ctxt->elem, prefix);
|
||||
if (ns == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : no namespace bound to prefix %s\n",
|
||||
prefix);
|
||||
} else {
|
||||
URL = xmlStrdup(ns->href);
|
||||
}
|
||||
xmlFree(prefix);
|
||||
}
|
||||
if (token == NULL) {
|
||||
if (CUR == '*') {
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_ATTR, NULL, URL, novar);
|
||||
return;
|
||||
}
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : Name expected\n");
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
}
|
||||
PUSH(XSLT_OP_ATTR, token, URL, novar);
|
||||
goto parse_predicate;
|
||||
axis = AXIS_ATTRIBUTE;
|
||||
}
|
||||
parse_node_test:
|
||||
if (token == NULL)
|
||||
token = xsltScanName(ctxt);
|
||||
token = xsltScanNCName(ctxt);
|
||||
if (token == NULL) {
|
||||
if (CUR == '*') {
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_ALL, token, NULL, novar);
|
||||
if (axis == AXIS_ATTRIBUTE) {
|
||||
PUSH(XSLT_OP_ATTR, NULL, NULL, novar);
|
||||
}
|
||||
else {
|
||||
PUSH(XSLT_OP_ALL, NULL, NULL, novar);
|
||||
}
|
||||
goto parse_predicate;
|
||||
} else {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
|
@ -1647,7 +1556,7 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
|
||||
SKIP_BLANKS;
|
||||
if (CUR == '(') {
|
||||
xsltCompileIdKeyPattern(ctxt, token, 0, novar);
|
||||
xsltCompileIdKeyPattern(ctxt, token, 0, novar, axis);
|
||||
if (ctxt->error)
|
||||
goto error;
|
||||
} else if (CUR == ':') {
|
||||
|
@ -1659,12 +1568,13 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
/*
|
||||
* This is a namespace match
|
||||
*/
|
||||
token = xsltScanName(ctxt);
|
||||
token = xsltScanNCName(ctxt);
|
||||
ns = xmlSearchNs(ctxt->doc, ctxt->elem, prefix);
|
||||
if (ns == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : no namespace bound to prefix %s\n",
|
||||
prefix);
|
||||
xmlFree(prefix);
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
} else {
|
||||
|
@ -1674,7 +1584,12 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
if (token == NULL) {
|
||||
if (CUR == '*') {
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_NS, URL, NULL, novar);
|
||||
if (axis == AXIS_ATTRIBUTE) {
|
||||
PUSH(XSLT_OP_ATTR, NULL, URL, novar);
|
||||
}
|
||||
else {
|
||||
PUSH(XSLT_OP_NS, URL, NULL, novar);
|
||||
}
|
||||
} else {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : Name expected\n");
|
||||
|
@ -1682,54 +1597,25 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
goto error;
|
||||
}
|
||||
} else {
|
||||
PUSH(XSLT_OP_ELEM, token, URL, novar);
|
||||
if (axis == AXIS_ATTRIBUTE) {
|
||||
PUSH(XSLT_OP_ATTR, token, URL, novar);
|
||||
}
|
||||
else {
|
||||
PUSH(XSLT_OP_ELEM, token, URL, novar);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (axis != 0) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : NodeTest expected\n");
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
}
|
||||
NEXT;
|
||||
if (xmlStrEqual(token, (const xmlChar *) "child")) {
|
||||
xmlFree(token);
|
||||
token = xsltScanName(ctxt);
|
||||
if (token == NULL) {
|
||||
if (CUR == '*') {
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_ALL, token, NULL, novar);
|
||||
goto parse_predicate;
|
||||
} else {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : QName expected\n");
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
URI = xsltGetQNameURI(ctxt->elem, &token);
|
||||
if (token == NULL) {
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
} else {
|
||||
name = xmlStrdup(token);
|
||||
if (URI != NULL)
|
||||
URL = xmlStrdup(URI);
|
||||
}
|
||||
PUSH(XSLT_OP_CHILD, name, URL, novar);
|
||||
axis = AXIS_CHILD;
|
||||
} else if (xmlStrEqual(token, (const xmlChar *) "attribute")) {
|
||||
xmlFree(token);
|
||||
token = xsltScanName(ctxt);
|
||||
if (token == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : QName expected\n");
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
}
|
||||
URI = xsltGetQNameURI(ctxt->elem, &token);
|
||||
if (token == NULL) {
|
||||
ctxt->error = 1;
|
||||
goto error;
|
||||
} else {
|
||||
name = xmlStrdup(token);
|
||||
if (URI != NULL)
|
||||
URL = xmlStrdup(URI);
|
||||
}
|
||||
PUSH(XSLT_OP_ATTR, name, URL, novar);
|
||||
axis = AXIS_ATTRIBUTE;
|
||||
} else {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileStepPattern : 'child' or 'attribute' expected\n");
|
||||
|
@ -1737,10 +1623,10 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
goto error;
|
||||
}
|
||||
xmlFree(token);
|
||||
SKIP_BLANKS;
|
||||
token = xsltScanNCName(ctxt);
|
||||
goto parse_node_test;
|
||||
}
|
||||
} else if (CUR == '*') {
|
||||
NEXT;
|
||||
PUSH(XSLT_OP_ALL, token, NULL, novar);
|
||||
} else {
|
||||
URI = xsltGetQNameURI(ctxt->elem, &token);
|
||||
if (token == NULL) {
|
||||
|
@ -1749,7 +1635,12 @@ xsltCompileStepPattern(xsltParserContextPtr ctxt, xmlChar *token, int novar) {
|
|||
}
|
||||
if (URI != NULL)
|
||||
URL = xmlStrdup(URI);
|
||||
PUSH(XSLT_OP_ELEM, token, URL, novar);
|
||||
if (axis == AXIS_ATTRIBUTE) {
|
||||
PUSH(XSLT_OP_ATTR, token, URL, novar);
|
||||
}
|
||||
else {
|
||||
PUSH(XSLT_OP_ELEM, token, URL, novar);
|
||||
}
|
||||
}
|
||||
parse_predicate:
|
||||
SKIP_BLANKS;
|
||||
|
@ -1886,7 +1777,7 @@ xsltCompileLocationPathPattern(xsltParserContextPtr ctxt, int novar) {
|
|||
xsltCompileRelativePathPattern(ctxt, NULL, novar);
|
||||
} else {
|
||||
xmlChar *name;
|
||||
name = xsltScanName(ctxt);
|
||||
name = xsltScanNCName(ctxt);
|
||||
if (name == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltCompileLocationPathPattern : Name expected\n");
|
||||
|
@ -1895,7 +1786,7 @@ xsltCompileLocationPathPattern(xsltParserContextPtr ctxt, int novar) {
|
|||
}
|
||||
SKIP_BLANKS;
|
||||
if ((CUR == '(') && !xmlXPathIsNodeType(name)) {
|
||||
xsltCompileIdKeyPattern(ctxt, name, 1, novar);
|
||||
xsltCompileIdKeyPattern(ctxt, name, 1, novar, 0);
|
||||
if ((CUR == '/') && (NXT(1) == '/')) {
|
||||
PUSH(XSLT_OP_ANCESTOR, NULL, NULL, novar);
|
||||
NEXT;
|
||||
|
@ -2173,7 +2064,6 @@ xsltAddTemplate(xsltStylesheetPtr style, xsltTemplatePtr cur,
|
|||
else
|
||||
top = &(style->attrMatch);
|
||||
break;
|
||||
case XSLT_OP_CHILD:
|
||||
case XSLT_OP_PARENT:
|
||||
case XSLT_OP_ANCESTOR:
|
||||
top = &(style->elemMatch);
|
||||
|
|
12
reactos/dll/3rdparty/libxslt/preproc.c
vendored
12
reactos/dll/3rdparty/libxslt/preproc.c
vendored
|
@ -82,7 +82,7 @@ xsltCheckTopLevelElement(xsltStylesheetPtr style, xmlNodePtr inst, int err) {
|
|||
}
|
||||
return(0);
|
||||
}
|
||||
if ((parent->ns == NULL) ||
|
||||
if ((parent->ns == NULL) || (parent->type != XML_ELEMENT_NODE) ||
|
||||
((parent->ns != inst->ns) &&
|
||||
(!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
|
||||
((!xmlStrEqual(parent->name, BAD_CAST "stylesheet")) &&
|
||||
|
@ -391,6 +391,8 @@ xsltFreeStylePreComp(xsltStylePreCompPtr comp) {
|
|||
break;
|
||||
case XSLT_FUNC_SORT: {
|
||||
xsltStyleItemSortPtr item = (xsltStyleItemSortPtr) comp;
|
||||
if (item->locale != (xsltLocale)0)
|
||||
xsltFreeLocale(item->locale);
|
||||
if (item->comp != NULL)
|
||||
xmlXPathFreeCompExpr(item->comp);
|
||||
}
|
||||
|
@ -487,6 +489,8 @@ xsltFreeStylePreComp(xsltStylePreCompPtr comp) {
|
|||
break;
|
||||
}
|
||||
#else
|
||||
if (comp->locale != (xsltLocale)0)
|
||||
xsltFreeLocale(comp->locale);
|
||||
if (comp->comp != NULL)
|
||||
xmlXPathFreeCompExpr(comp->comp);
|
||||
if (comp->nsList != NULL)
|
||||
|
@ -728,6 +732,12 @@ xsltSortComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
|||
comp->lang = xsltEvalStaticAttrValueTemplate(style, inst,
|
||||
(const xmlChar *)"lang",
|
||||
NULL, &comp->has_lang);
|
||||
if (comp->lang != NULL) {
|
||||
comp->locale = xsltNewLocale(comp->lang);
|
||||
}
|
||||
else {
|
||||
comp->locale = (xsltLocale)0;
|
||||
}
|
||||
|
||||
comp->select = xsltGetCNsProp(style, inst,(const xmlChar *)"select", XSLT_NAMESPACE);
|
||||
if (comp->select == NULL) {
|
||||
|
|
5
reactos/dll/3rdparty/libxslt/security.c
vendored
5
reactos/dll/3rdparty/libxslt/security.c
vendored
|
@ -58,6 +58,7 @@
|
|||
#include "xslt.h"
|
||||
#include "xsltInternals.h"
|
||||
#include "xsltutils.h"
|
||||
#include "extensions.h"
|
||||
#include "security.h"
|
||||
|
||||
|
||||
|
@ -88,6 +89,8 @@ xsltSecurityPrefsPtr
|
|||
xsltNewSecurityPrefs(void) {
|
||||
xsltSecurityPrefsPtr ret;
|
||||
|
||||
xsltInitGlobals();
|
||||
|
||||
ret = (xsltSecurityPrefsPtr) xmlMalloc(sizeof(xsltSecurityPrefs));
|
||||
if (ret == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
|
@ -124,6 +127,7 @@ xsltFreeSecurityPrefs(xsltSecurityPrefsPtr sec) {
|
|||
int
|
||||
xsltSetSecurityPrefs(xsltSecurityPrefsPtr sec, xsltSecurityOption option,
|
||||
xsltSecurityCheck func) {
|
||||
xsltInitGlobals();
|
||||
if (sec == NULL)
|
||||
return(-1);
|
||||
switch (option) {
|
||||
|
@ -177,6 +181,7 @@ xsltGetSecurityPrefs(xsltSecurityPrefsPtr sec, xsltSecurityOption option) {
|
|||
*/
|
||||
void
|
||||
xsltSetDefaultSecurityPrefs(xsltSecurityPrefsPtr sec) {
|
||||
|
||||
xsltDefaultSecurityPrefs = sec;
|
||||
}
|
||||
|
||||
|
|
15
reactos/dll/3rdparty/libxslt/templates.c
vendored
15
reactos/dll/3rdparty/libxslt/templates.c
vendored
|
@ -637,7 +637,7 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
|||
last = last->next;
|
||||
} else {
|
||||
last = NULL;
|
||||
}
|
||||
}
|
||||
attr = attrs;
|
||||
do {
|
||||
/*
|
||||
|
@ -719,20 +719,20 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
|||
copyNs = NULL;
|
||||
}
|
||||
copy->ns = copyNs;
|
||||
|
||||
|
||||
/*
|
||||
* Set the value.
|
||||
*/
|
||||
*/
|
||||
text = xmlNewText(NULL);
|
||||
if (text != NULL) {
|
||||
copy->last = copy->children = text;
|
||||
text->parent = (xmlNodePtr) copy;
|
||||
text->doc = copy->doc;
|
||||
|
||||
|
||||
if (attr->psvi != NULL) {
|
||||
/*
|
||||
* Evaluate the Attribute Value Template.
|
||||
*/
|
||||
*/
|
||||
valueAVT = xsltEvalAVT(ctxt, attr->psvi, attr->parent);
|
||||
if (valueAVT == NULL) {
|
||||
/*
|
||||
|
@ -743,7 +743,7 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
|||
xsltTransformError(ctxt, NULL, attr->parent,
|
||||
"Internal error: Failed to evaluate the AVT "
|
||||
"of attribute '{%s}%s'.\n",
|
||||
attr->ns->href, attr->name);
|
||||
attr->ns->href, attr->name);
|
||||
} else {
|
||||
xsltTransformError(ctxt, NULL, attr->parent,
|
||||
"Internal error: Failed to evaluate the AVT "
|
||||
|
@ -763,6 +763,9 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
|
|||
} else {
|
||||
text->content = xmlStrdup(value);
|
||||
}
|
||||
if ((copy != NULL) && (text != NULL) &&
|
||||
(xmlIsID(copy->doc, copy->parent, copy)))
|
||||
xmlAddID(NULL, copy->doc, text->content, copy);
|
||||
}
|
||||
|
||||
next_attribute:
|
||||
|
|
586
reactos/dll/3rdparty/libxslt/transform.c
vendored
586
reactos/dll/3rdparty/libxslt/transform.c
vendored
File diff suppressed because it is too large
Load diff
66
reactos/dll/3rdparty/libxslt/transform.h
vendored
66
reactos/dll/3rdparty/libxslt/transform.h
vendored
|
@ -24,51 +24,55 @@ extern "C" {
|
|||
/**
|
||||
* XInclude default processing.
|
||||
*/
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSetXIncludeDefault (int xinclude);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltGetXIncludeDefault (void);
|
||||
|
||||
/**
|
||||
* Export context to users.
|
||||
*/
|
||||
XSLTPUBFUN xsltTransformContextPtr XSLTCALL
|
||||
XSLTPUBFUN xsltTransformContextPtr XSLTCALL
|
||||
xsltNewTransformContext (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc);
|
||||
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltFreeTransformContext(xsltTransformContextPtr ctxt);
|
||||
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
xsltApplyStylesheetUser (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc,
|
||||
const char **params,
|
||||
const char *output,
|
||||
FILE * profile,
|
||||
xsltTransformContextPtr userCtxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltProcessOneNode (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xsltStackElemPtr params);
|
||||
/**
|
||||
* Private Interfaces.
|
||||
*/
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltApplyStripSpaces (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node);
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
xsltApplyStylesheet (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc,
|
||||
const char **params);
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
XSLTPUBFUN xmlDocPtr XSLTCALL
|
||||
xsltProfileStylesheet (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc,
|
||||
const char **params,
|
||||
FILE * output);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRunStylesheet (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc,
|
||||
const char **params,
|
||||
const char *output,
|
||||
xmlSAXHandlerPtr SAX,
|
||||
xmlOutputBufferPtr IObuf);
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
XSLTPUBFUN int XSLTCALL
|
||||
xsltRunStylesheetUser (xsltStylesheetPtr style,
|
||||
xmlDocPtr doc,
|
||||
const char **params,
|
||||
|
@ -77,101 +81,101 @@ XSLTPUBFUN int XSLTCALL
|
|||
xmlOutputBufferPtr IObuf,
|
||||
FILE * profile,
|
||||
xsltTransformContextPtr userCtxt);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltApplyOneTemplate (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr list,
|
||||
xsltTemplatePtr templ,
|
||||
xsltStackElemPtr params);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltDocumentElem (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltSort (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltCopy (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltText (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltElement (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltComment (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltAttribute (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltProcessingInstruction(xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltCopyOf (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltValueOf (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltNumber (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltApplyImports (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltCallTemplate (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltApplyTemplates (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltChoose (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltIf (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltForEach (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr node,
|
||||
xmlNodePtr inst,
|
||||
xsltStylePreCompPtr comp);
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xsltRegisterAllElement (xsltTransformContextPtr ctxt);
|
||||
|
||||
XSLTPUBFUN xmlNodePtr XSLTCALL
|
||||
XSLTPUBFUN xmlNodePtr XSLTCALL
|
||||
xsltCopyTextString (xsltTransformContextPtr ctxt,
|
||||
xmlNodePtr target,
|
||||
const xmlChar *string,
|
||||
|
@ -189,7 +193,7 @@ XSLTPUBFUN int XSLTCALL
|
|||
/*
|
||||
* Hook for the debugger if activated.
|
||||
*/
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
XSLTPUBFUN void XSLTCALL
|
||||
xslHandleDebugger (xmlNodePtr cur,
|
||||
xmlNodePtr node,
|
||||
xsltTemplatePtr templ,
|
||||
|
|
2
reactos/dll/3rdparty/libxslt/trio.h
vendored
2
reactos/dll/3rdparty/libxslt/trio.h
vendored
|
@ -1,6 +1,6 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* $Id: trio.h 897 2003-04-07 12:41:56Z veillard $
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 1998 Bjorn Reese and Daniel Stenberg.
|
||||
*
|
||||
|
|
2
reactos/dll/3rdparty/libxslt/triodef.h
vendored
2
reactos/dll/3rdparty/libxslt/triodef.h
vendored
|
@ -1,6 +1,6 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* $Id: triodef.h 912 2003-04-26 12:06:36Z veillard $
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
|
||||
*
|
||||
|
|
4
reactos/dll/3rdparty/libxslt/variables.c
vendored
4
reactos/dll/3rdparty/libxslt/variables.c
vendored
|
@ -43,6 +43,10 @@ const xmlChar *xsltDocFragFake = (const xmlChar *) " fake node libxslt";
|
|||
const xmlChar *xsltComputingGlobalVarMarker =
|
||||
(const xmlChar *) " var/param being computed";
|
||||
|
||||
#define XSLT_VAR_GLOBAL 1<<0
|
||||
#define XSLT_VAR_IN_SELECT 1<<1
|
||||
#define XSLT_TCTXT_VARIABLE(c) ((xsltStackElemPtr) (c)->contextVariable)
|
||||
|
||||
/************************************************************************
|
||||
* *
|
||||
* Result Value Tree (Result Tree Fragment) interfaces *
|
||||
|
|
112
reactos/dll/3rdparty/libxslt/xslt.c
vendored
112
reactos/dll/3rdparty/libxslt/xslt.c
vendored
|
@ -56,6 +56,10 @@ const int xsltLibxmlVersion = LIBXML_VERSION;
|
|||
|
||||
const xmlChar *xsltConstNamespaceNameXSLT = (const xmlChar *) XSLT_NAMESPACE;
|
||||
|
||||
#define XSLT_ELEMENT_CATEGORY_XSLT 0
|
||||
#define XSLT_ELEMENT_CATEGORY_EXTENSION 1
|
||||
#define XSLT_ELEMENT_CATEGORY_LRE 2
|
||||
|
||||
/*
|
||||
* xsltLiteralResultMarker:
|
||||
* Marker for Literal result elements, in order to avoid multiple attempts
|
||||
|
@ -83,6 +87,9 @@ const xmlChar *xsltXSLTAttrMarker = (const xmlChar *) "LRE XSLT Attr";
|
|||
|
||||
#endif
|
||||
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
extern xmlRMutexPtr xsltLocaleMutex;
|
||||
#endif
|
||||
/*
|
||||
* Harmless but avoiding a problem when compiling against a
|
||||
* libxml <= 2.3.11 without LIBXML_DEBUG_ENABLED
|
||||
|
@ -141,11 +148,14 @@ xsltParseContentError(xsltStylesheetPtr style,
|
|||
*
|
||||
* Push an excluded namespace name on the stack
|
||||
*
|
||||
* Returns the new index in the stack or 0 in case of error
|
||||
* Returns the new index in the stack or -1 if already present or
|
||||
* in case of error
|
||||
*/
|
||||
static int
|
||||
exclPrefixPush(xsltStylesheetPtr style, xmlChar * value)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (style->exclPrefixMax == 0) {
|
||||
style->exclPrefixMax = 4;
|
||||
style->exclPrefixTab =
|
||||
|
@ -153,9 +163,14 @@ exclPrefixPush(xsltStylesheetPtr style, xmlChar * value)
|
|||
sizeof(style->exclPrefixTab[0]));
|
||||
if (style->exclPrefixTab == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext, "malloc failed !\n");
|
||||
return (0);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
/* do not push duplicates */
|
||||
for (i = 0;i < style->exclPrefixNr;i++) {
|
||||
if (xmlStrEqual(style->exclPrefixTab[i], value))
|
||||
return(-1);
|
||||
}
|
||||
if (style->exclPrefixNr >= style->exclPrefixMax) {
|
||||
style->exclPrefixMax *= 2;
|
||||
style->exclPrefixTab =
|
||||
|
@ -164,7 +179,7 @@ exclPrefixPush(xsltStylesheetPtr style, xmlChar * value)
|
|||
sizeof(style->exclPrefixTab[0]));
|
||||
if (style->exclPrefixTab == NULL) {
|
||||
xmlGenericError(xmlGenericErrorContext, "realloc failed !\n");
|
||||
return (0);
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
style->exclPrefixTab[style->exclPrefixNr] = value;
|
||||
|
@ -214,6 +229,9 @@ void
|
|||
xsltInit (void) {
|
||||
if (initialized == 0) {
|
||||
initialized = 1;
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
xsltLocaleMutex = xmlNewRMutex();
|
||||
#endif
|
||||
xsltRegisterAllExtras();
|
||||
}
|
||||
}
|
||||
|
@ -1704,12 +1722,13 @@ xsltParseStylesheetExcludePrefix(xsltStylesheetPtr style, xmlNodePtr cur,
|
|||
prefix);
|
||||
if (style != NULL) style->warnings++;
|
||||
} else {
|
||||
if (exclPrefixPush(style, (xmlChar *) ns->href) >= 0) {
|
||||
#ifdef WITH_XSLT_DEBUG_PARSING
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"exclude result prefix %s\n", prefix);
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"exclude result prefix %s\n", prefix);
|
||||
#endif
|
||||
exclPrefixPush(style, (xmlChar *) ns->href);
|
||||
nb++;
|
||||
nb++;
|
||||
}
|
||||
}
|
||||
xmlFree(prefix);
|
||||
}
|
||||
|
@ -4921,13 +4940,14 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
|
|||
* okay this is an extension element compile it too
|
||||
*/
|
||||
xsltStylePreCompute(style, cur);
|
||||
} else {
|
||||
}
|
||||
else if (cur->type == XML_ELEMENT_NODE)
|
||||
{
|
||||
/*
|
||||
* This is an element which will be output as part of the
|
||||
* template exectution, precompile AVT if found.
|
||||
*/
|
||||
if ((cur->ns == NULL) && (style->defaultAlias != NULL) &&
|
||||
(cur->type == XML_ELEMENT_NODE)) {
|
||||
if ((cur->ns == NULL) && (style->defaultAlias != NULL)) {
|
||||
cur->ns = xmlSearchNsByHref(cur->doc, cur,
|
||||
style->defaultAlias);
|
||||
}
|
||||
|
@ -6233,6 +6253,15 @@ xsltParseSimplifiedStylesheetTree(xsltCompilerCtxtPtr cctxt,
|
|||
}
|
||||
|
||||
#ifdef XSLT_REFACTORED_XSLT_NSCOMP
|
||||
/**
|
||||
* xsltRestoreDocumentNamespaces:
|
||||
* @ns: map of namespaces
|
||||
* @doc: the document
|
||||
*
|
||||
* Restore the namespaces for the document
|
||||
*
|
||||
* Returns 0 in case of success, -1 in case of failure
|
||||
*/
|
||||
int
|
||||
xsltRestoreDocumentNamespaces(xsltNsMapPtr ns, xmlDocPtr doc)
|
||||
{
|
||||
|
@ -6274,6 +6303,7 @@ xsltParseStylesheetProcess(xsltStylesheetPtr style, xmlDocPtr doc)
|
|||
xmlNodePtr cur;
|
||||
int oldIsSimplifiedStylesheet;
|
||||
|
||||
xsltInitGlobals();
|
||||
|
||||
if ((style == NULL) || (doc == NULL))
|
||||
return(NULL);
|
||||
|
@ -6326,10 +6356,25 @@ xsltParseStylesheetProcess(xsltStylesheetPtr style, xmlDocPtr doc)
|
|||
|
||||
#else /* XSLT_REFACTORED */
|
||||
|
||||
/**
|
||||
* xsltParseStylesheetProcess:
|
||||
* @ret: the XSLT stylesheet (the current stylesheet-level)
|
||||
* @doc: and xmlDoc parsed XML
|
||||
*
|
||||
* Parses an XSLT stylesheet, adding the associated structures.
|
||||
* Called by:
|
||||
* xsltParseStylesheetImportedDoc() (xslt.c)
|
||||
* xsltParseStylesheetInclude() (imports.c)
|
||||
*
|
||||
* Returns the value of the @style parameter if everything
|
||||
* went right, NULL if something went amiss.
|
||||
*/
|
||||
xsltStylesheetPtr
|
||||
xsltParseStylesheetProcess(xsltStylesheetPtr ret, xmlDocPtr doc) {
|
||||
xmlNodePtr cur;
|
||||
|
||||
xsltInitGlobals();
|
||||
|
||||
if (doc == NULL)
|
||||
return(NULL);
|
||||
if (ret == NULL)
|
||||
|
@ -6616,6 +6661,8 @@ xsltStylesheetPtr
|
|||
xsltParseStylesheetDoc(xmlDocPtr doc) {
|
||||
xsltStylesheetPtr ret;
|
||||
|
||||
xsltInitGlobals();
|
||||
|
||||
ret = xsltParseStylesheetImportedDoc(doc, NULL);
|
||||
if (ret == NULL)
|
||||
return(NULL);
|
||||
|
@ -6650,6 +6697,7 @@ xsltParseStylesheetFile(const xmlChar* filename) {
|
|||
xsltStylesheetPtr ret;
|
||||
xmlDocPtr doc;
|
||||
|
||||
xsltInitGlobals();
|
||||
|
||||
if (filename == NULL)
|
||||
return(NULL);
|
||||
|
@ -6811,6 +6859,8 @@ xsltLoadStylesheetPI(xmlDocPtr doc) {
|
|||
xmlChar *href = NULL;
|
||||
xmlURIPtr URI;
|
||||
|
||||
xsltInitGlobals();
|
||||
|
||||
if (doc == NULL)
|
||||
return(NULL);
|
||||
|
||||
|
@ -6862,8 +6912,14 @@ xsltLoadStylesheetPI(xmlDocPtr doc) {
|
|||
"xml-stylesheet : no ID %s found\n", URI->fragment);
|
||||
} else {
|
||||
xmlDocPtr fake;
|
||||
xmlNodePtr subtree;
|
||||
xmlNodePtr subtree, newtree;
|
||||
xmlNsPtr ns;
|
||||
|
||||
#ifdef WITH_XSLT_DEBUG
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"creating new document from %s for embedded stylesheet\n",
|
||||
doc->URL);
|
||||
#endif
|
||||
/*
|
||||
* move the subtree in a new document passed to
|
||||
* the stylesheet analyzer
|
||||
|
@ -6871,20 +6927,38 @@ xsltLoadStylesheetPI(xmlDocPtr doc) {
|
|||
subtree = ID->parent;
|
||||
fake = xmlNewDoc(NULL);
|
||||
if (fake != NULL) {
|
||||
/*
|
||||
* the dictionary should be shared since nodes are
|
||||
* moved over.
|
||||
*/
|
||||
/*
|
||||
* Should the dictionary still be shared even though
|
||||
* the nodes are being copied rather than moved?
|
||||
*/
|
||||
fake->dict = doc->dict;
|
||||
xmlDictReference(doc->dict);
|
||||
#ifdef WITH_XSLT_DEBUG
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"reusing dictionary from %s for stylesheet\n",
|
||||
doc->URL);
|
||||
"reusing dictionary from %s for embedded stylesheet\n",
|
||||
doc->URL);
|
||||
#endif
|
||||
|
||||
xmlUnlinkNode(subtree);
|
||||
xmlAddChild((xmlNodePtr) fake, subtree);
|
||||
newtree = xmlDocCopyNode(subtree, fake, 1);
|
||||
|
||||
fake->URL = xmlNodeGetBase(doc, subtree->parent);
|
||||
#ifdef WITH_XSLT_DEBUG
|
||||
xsltGenericDebug(xsltGenericDebugContext,
|
||||
"set base URI for embedded stylesheet as %s\n",
|
||||
fake->URL);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add all namespaces in scope of embedded stylesheet to
|
||||
* root element of newly created stylesheet document
|
||||
*/
|
||||
while ((subtree = subtree->parent) != (xmlNodePtr)doc) {
|
||||
for (ns = subtree->ns; ns; ns = ns->next) {
|
||||
xmlNewNs(newtree, ns->href, ns->prefix);
|
||||
}
|
||||
}
|
||||
|
||||
xmlAddChild((xmlNodePtr)fake, newtree);
|
||||
ret = xsltParseStylesheetDoc(fake);
|
||||
if (ret == NULL)
|
||||
xmlFreeDoc(fake);
|
||||
|
|
11
reactos/dll/3rdparty/libxslt/xsltInternals.h
vendored
11
reactos/dll/3rdparty/libxslt/xsltInternals.h
vendored
|
@ -21,6 +21,7 @@
|
|||
#include <libxml/xmlstring.h>
|
||||
#include <libxslt/xslt.h>
|
||||
#include "xsltexports.h"
|
||||
#include "xsltlocale.h"
|
||||
#include "numbersInternals.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -1045,6 +1046,7 @@ struct _xsltStyleItemSort {
|
|||
int descending; /* sort */
|
||||
const xmlChar *lang; /* sort */
|
||||
int has_lang; /* sort */
|
||||
xsltLocale locale; /* sort */
|
||||
const xmlChar *case_order; /* sort */
|
||||
int lower_first; /* sort */
|
||||
|
||||
|
@ -1246,10 +1248,6 @@ struct _xsltVarInfo {
|
|||
const xmlChar *nsName;
|
||||
};
|
||||
|
||||
#define XSLT_ELEMENT_CATEGORY_XSLT 0
|
||||
#define XSLT_ELEMENT_CATEGORY_EXTENSION 1
|
||||
#define XSLT_ELEMENT_CATEGORY_LRE 2
|
||||
|
||||
/**
|
||||
* xsltCompilerNodeInfo:
|
||||
*
|
||||
|
@ -1381,6 +1379,7 @@ struct _xsltStylePreComp {
|
|||
int descending; /* sort */
|
||||
const xmlChar *lang; /* sort */
|
||||
int has_lang; /* sort */
|
||||
xsltLocale locale; /* sort */
|
||||
const xmlChar *case_order; /* sort */
|
||||
int lower_first; /* sort */
|
||||
|
||||
|
@ -1417,9 +1416,6 @@ struct _xsltStylePreComp {
|
|||
#endif /* XSLT_REFACTORED */
|
||||
|
||||
|
||||
#define XSLT_VAR_GLOBAL 1<<0
|
||||
#define XSLT_VAR_IN_SELECT 1<<1
|
||||
#define XSLT_TCTXT_VARIABLE(c) ((xsltStackElemPtr) (c)->contextVariable)
|
||||
/*
|
||||
* The in-memory structure corresponding to an XSLT Variable
|
||||
* or Param.
|
||||
|
@ -1778,6 +1774,7 @@ struct _xsltTransformContext {
|
|||
exits */
|
||||
xmlDocPtr localRVTBase;
|
||||
int keyInitLevel; /* Needed to catch recursive keys issues */
|
||||
int funcLevel; /* Needed to catch recursive functions issues */
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
23
reactos/dll/3rdparty/libxslt/xsltconfig.h
vendored
23
reactos/dll/3rdparty/libxslt/xsltconfig.h
vendored
|
@ -20,28 +20,28 @@ extern "C" {
|
|||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.24"
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.26"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 10203
|
||||
*/
|
||||
#define LIBXSLT_VERSION 10124
|
||||
#define LIBXSLT_VERSION 10126
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "10203"
|
||||
*/
|
||||
#define LIBXSLT_VERSION_STRING "10124"
|
||||
#define LIBXSLT_VERSION_STRING "10126"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_EXTRA:
|
||||
*
|
||||
* extra version information, used to show a CVS compilation
|
||||
*/
|
||||
#define LIBXSLT_VERSION_EXTRA "-CVS1070"
|
||||
#define LIBXSLT_VERSION_EXTRA "-GITv1.1.26"
|
||||
|
||||
/**
|
||||
* WITH_XSLT_DEBUG:
|
||||
|
@ -116,13 +116,26 @@ extern "C" {
|
|||
* Whether module support is configured into libxslt
|
||||
* Note: no default module path for win32 platforms
|
||||
*/
|
||||
#if 0
|
||||
#if 1
|
||||
#ifndef WITH_MODULES
|
||||
#define WITH_MODULES
|
||||
#endif
|
||||
#define LIBXSLT_DEFAULT_PLUGINS_PATH() "/usr/lib/libxslt-plugins"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Locale support
|
||||
*/
|
||||
#if 1
|
||||
#ifndef XSLT_LOCALE_XLOCALE
|
||||
#define XSLT_LOCALE_XLOCALE
|
||||
#endif
|
||||
#elif 0
|
||||
#ifndef XSLT_LOCALE_WINAPI
|
||||
#define XSLT_LOCALE_WINAPI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
|
|
13
reactos/dll/3rdparty/libxslt/xsltconfig.h.in
vendored
13
reactos/dll/3rdparty/libxslt/xsltconfig.h.in
vendored
|
@ -123,6 +123,19 @@ extern "C" {
|
|||
#define LIBXSLT_DEFAULT_PLUGINS_PATH() "@LIBXSLT_DEFAULT_PLUGINS_PATH@"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Locale support
|
||||
*/
|
||||
#if @XSLT_LOCALE_XLOCALE@
|
||||
#ifndef XSLT_LOCALE_XLOCALE
|
||||
#define XSLT_LOCALE_XLOCALE
|
||||
#endif
|
||||
#elif @XSLT_LOCALE_WINAPI@
|
||||
#ifndef XSLT_LOCALE_WINAPI
|
||||
#define XSLT_LOCALE_WINAPI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ATTRIBUTE_UNUSED:
|
||||
*
|
||||
|
|
509
reactos/dll/3rdparty/libxslt/xsltlocale.c
vendored
Normal file
509
reactos/dll/3rdparty/libxslt/xsltlocale.c
vendored
Normal file
|
@ -0,0 +1,509 @@
|
|||
/*
|
||||
* xsltlocale.c: locale handling
|
||||
*
|
||||
* Reference:
|
||||
* RFC 3066: Tags for the Identification of Languages
|
||||
* http://www.ietf.org/rfc/rfc3066.txt
|
||||
* ISO 639-1, ISO 3166-1
|
||||
*
|
||||
* Author: Nick Wellnhofer
|
||||
* winapi port: Roumen Petrov
|
||||
*/
|
||||
|
||||
#define IN_LIBXSLT
|
||||
#include "libxslt.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <libxml/xmlmemory.h>
|
||||
|
||||
#include "xsltlocale.h"
|
||||
#include "xsltutils.h"
|
||||
|
||||
#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ <= 2
|
||||
#define newlocale __newlocale
|
||||
#define freelocale __freelocale
|
||||
#define strxfrm_l __strxfrm_l
|
||||
#define LC_COLLATE_MASK (1 << LC_COLLATE)
|
||||
#endif
|
||||
|
||||
#define ISALPHA(c) ((c & 0xc0) == 0x40 && (unsigned)((c & 0x1f) - 1) < 26)
|
||||
#define TOUPPER(c) (c & ~0x20)
|
||||
#define TOLOWER(c) (c | 0x20)
|
||||
|
||||
/*without terminating null character*/
|
||||
#define XSLTMAX_ISO639LANGLEN 8
|
||||
#define XSLTMAX_ISO3166CNTRYLEN 8
|
||||
/* <lang>-<cntry> */
|
||||
#define XSLTMAX_LANGTAGLEN (XSLTMAX_ISO639LANGLEN+1+XSLTMAX_ISO3166CNTRYLEN)
|
||||
|
||||
static const xmlChar* xsltDefaultRegion(const xmlChar *localeName);
|
||||
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
xmlRMutexPtr xsltLocaleMutex = NULL;
|
||||
|
||||
struct xsltRFC1766Info_s {
|
||||
/*note typedef unsigned char xmlChar !*/
|
||||
xmlChar tag[XSLTMAX_LANGTAGLEN+1];
|
||||
/*note typedef LCID xsltLocale !*/
|
||||
xsltLocale lcid;
|
||||
};
|
||||
typedef struct xsltRFC1766Info_s xsltRFC1766Info;
|
||||
|
||||
static int xsltLocaleListSize = 0;
|
||||
static xsltRFC1766Info *xsltLocaleList = NULL;
|
||||
|
||||
|
||||
static xsltLocale
|
||||
xslt_locale_WINAPI(const xmlChar *languageTag) {
|
||||
int k;
|
||||
xsltRFC1766Info *p = xsltLocaleList;
|
||||
|
||||
for (k=0; k<xsltLocaleListSize; k++, p++)
|
||||
if (xmlStrcmp(p->tag, languageTag) == 0) return p->lcid;
|
||||
return((xsltLocale)0);
|
||||
}
|
||||
|
||||
static void xsltEnumSupportedLocales(void);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xsltNewLocale:
|
||||
* @languageTag: RFC 3066 language tag
|
||||
*
|
||||
* Creates a new locale of an opaque system dependent type based on the
|
||||
* language tag.
|
||||
*
|
||||
* Returns the locale or NULL on error or if no matching locale was found
|
||||
*/
|
||||
xsltLocale
|
||||
xsltNewLocale(const xmlChar *languageTag) {
|
||||
#ifdef XSLT_LOCALE_XLOCALE
|
||||
xsltLocale locale;
|
||||
char localeName[XSLTMAX_LANGTAGLEN+6]; /* 6 chars for ".utf8\0" */
|
||||
const xmlChar *p = languageTag;
|
||||
const char *region = NULL;
|
||||
char *q = localeName;
|
||||
int i, llen;
|
||||
|
||||
/* Convert something like "pt-br" to "pt_BR.utf8" */
|
||||
|
||||
if (languageTag == NULL)
|
||||
return(NULL);
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO639LANGLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOLOWER(*p++);
|
||||
|
||||
if (i == 0)
|
||||
return(NULL);
|
||||
|
||||
llen = i;
|
||||
*q++ = '_';
|
||||
|
||||
if (*p) {
|
||||
if (*p++ != '-')
|
||||
return(NULL);
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO3166CNTRYLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOUPPER(*p++);
|
||||
|
||||
if (i == 0 || *p)
|
||||
return(NULL);
|
||||
|
||||
memcpy(q, ".utf8", 6);
|
||||
locale = newlocale(LC_COLLATE_MASK, localeName, NULL);
|
||||
if (locale != NULL)
|
||||
return(locale);
|
||||
|
||||
/* Continue without using country code */
|
||||
|
||||
q = localeName + llen + 1;
|
||||
}
|
||||
|
||||
/* Try locale without territory, e.g. for Esperanto (eo) */
|
||||
|
||||
memcpy(q, ".utf8", 6);
|
||||
locale = newlocale(LC_COLLATE_MASK, localeName, NULL);
|
||||
if (locale != NULL)
|
||||
return(locale);
|
||||
|
||||
/* Try to find most common country for language */
|
||||
|
||||
if (llen != 2)
|
||||
return(NULL);
|
||||
|
||||
region = (char *)xsltDefaultRegion((xmlChar *)localeName);
|
||||
if (region == NULL)
|
||||
return(NULL);
|
||||
|
||||
q = localeName + llen + 1;
|
||||
*q++ = region[0];
|
||||
*q++ = region[1];
|
||||
memcpy(q, ".utf8", 6);
|
||||
locale = newlocale(LC_COLLATE_MASK, localeName, NULL);
|
||||
|
||||
return(locale);
|
||||
#endif
|
||||
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
{
|
||||
xsltLocale locale = (xsltLocale)0;
|
||||
xmlChar localeName[XSLTMAX_LANGTAGLEN+1];
|
||||
xmlChar *q = localeName;
|
||||
const xmlChar *p = languageTag;
|
||||
int i, llen;
|
||||
const xmlChar *region = NULL;
|
||||
|
||||
if (languageTag == NULL) goto end;
|
||||
|
||||
xsltEnumSupportedLocales();
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO639LANGLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOLOWER(*p++);
|
||||
if (i == 0) goto end;
|
||||
|
||||
llen = i;
|
||||
*q++ = '-';
|
||||
if (*p) { /*if country tag is given*/
|
||||
if (*p++ != '-') goto end;
|
||||
|
||||
for (i=0; i<XSLTMAX_ISO3166CNTRYLEN && ISALPHA(*p); ++i)
|
||||
*q++ = TOUPPER(*p++);
|
||||
if (i == 0 || *p) goto end;
|
||||
|
||||
*q = '\0';
|
||||
locale = xslt_locale_WINAPI(localeName);
|
||||
if (locale != (xsltLocale)0) goto end;
|
||||
}
|
||||
/* Try to find most common country for language */
|
||||
region = xsltDefaultRegion(localeName);
|
||||
if (region == NULL) goto end;
|
||||
|
||||
strcpy(localeName + llen + 1, region);
|
||||
locale = xslt_locale_WINAPI(localeName);
|
||||
end:
|
||||
return(locale);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XSLT_LOCALE_NONE
|
||||
return(NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static const xmlChar*
|
||||
xsltDefaultRegion(const xmlChar *localeName) {
|
||||
xmlChar c;
|
||||
/* region should be xmlChar, but gcc warns on all string assignments */
|
||||
const char *region = NULL;
|
||||
|
||||
c = localeName[1];
|
||||
/* This is based on the locales from glibc 2.3.3 */
|
||||
|
||||
switch (localeName[0]) {
|
||||
case 'a':
|
||||
if (c == 'a' || c == 'm') region = "ET";
|
||||
else if (c == 'f') region = "ZA";
|
||||
else if (c == 'n') region = "ES";
|
||||
else if (c == 'r') region = "AE";
|
||||
else if (c == 'z') region = "AZ";
|
||||
break;
|
||||
case 'b':
|
||||
if (c == 'e') region = "BY";
|
||||
else if (c == 'g') region = "BG";
|
||||
else if (c == 'n') region = "BD";
|
||||
else if (c == 'r') region = "FR";
|
||||
else if (c == 's') region = "BA";
|
||||
break;
|
||||
case 'c':
|
||||
if (c == 'a') region = "ES";
|
||||
else if (c == 's') region = "CZ";
|
||||
else if (c == 'y') region = "GB";
|
||||
break;
|
||||
case 'd':
|
||||
if (c == 'a') region = "DK";
|
||||
else if (c == 'e') region = "DE";
|
||||
break;
|
||||
case 'e':
|
||||
if (c == 'l') region = "GR";
|
||||
else if (c == 'n' || c == 'o') region = "US";
|
||||
else if (c == 's' || c == 'u') region = "ES";
|
||||
else if (c == 't') region = "EE";
|
||||
break;
|
||||
case 'f':
|
||||
if (c == 'a') region = "IR";
|
||||
else if (c == 'i') region = "FI";
|
||||
else if (c == 'o') region = "FO";
|
||||
else if (c == 'r') region = "FR";
|
||||
break;
|
||||
case 'g':
|
||||
if (c == 'a') region = "IE";
|
||||
else if (c == 'l') region = "ES";
|
||||
else if (c == 'v') region = "GB";
|
||||
break;
|
||||
case 'h':
|
||||
if (c == 'e') region = "IL";
|
||||
else if (c == 'i') region = "IN";
|
||||
else if (c == 'r') region = "HT";
|
||||
else if (c == 'u') region = "HU";
|
||||
break;
|
||||
case 'i':
|
||||
if (c == 'd') region = "ID";
|
||||
else if (c == 's') region = "IS";
|
||||
else if (c == 't') region = "IT";
|
||||
else if (c == 'w') region = "IL";
|
||||
break;
|
||||
case 'j':
|
||||
if (c == 'a') region = "JP";
|
||||
break;
|
||||
case 'k':
|
||||
if (c == 'l') region = "GL";
|
||||
else if (c == 'o') region = "KR";
|
||||
else if (c == 'w') region = "GB";
|
||||
break;
|
||||
case 'l':
|
||||
if (c == 't') region = "LT";
|
||||
else if (c == 'v') region = "LV";
|
||||
break;
|
||||
case 'm':
|
||||
if (c == 'k') region = "MK";
|
||||
else if (c == 'l' || c == 'r') region = "IN";
|
||||
else if (c == 'n') region = "MN";
|
||||
else if (c == 's') region = "MY";
|
||||
else if (c == 't') region = "MT";
|
||||
break;
|
||||
case 'n':
|
||||
if (c == 'b' || c == 'n' || c == 'o') region = "NO";
|
||||
else if (c == 'e') region = "NP";
|
||||
else if (c == 'l') region = "NL";
|
||||
break;
|
||||
case 'o':
|
||||
if (c == 'm') region = "ET";
|
||||
break;
|
||||
case 'p':
|
||||
if (c == 'a') region = "IN";
|
||||
else if (c == 'l') region = "PL";
|
||||
else if (c == 't') region = "PT";
|
||||
break;
|
||||
case 'r':
|
||||
if (c == 'o') region = "RO";
|
||||
else if (c == 'u') region = "RU";
|
||||
break;
|
||||
case 's':
|
||||
switch (c) {
|
||||
case 'e': region = "NO"; break;
|
||||
case 'h': region = "YU"; break;
|
||||
case 'k': region = "SK"; break;
|
||||
case 'l': region = "SI"; break;
|
||||
case 'o': region = "ET"; break;
|
||||
case 'q': region = "AL"; break;
|
||||
case 't': region = "ZA"; break;
|
||||
case 'v': region = "SE"; break;
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
if (c == 'a' || c == 'e') region = "IN";
|
||||
else if (c == 'h') region = "TH";
|
||||
else if (c == 'i') region = "ER";
|
||||
else if (c == 'r') region = "TR";
|
||||
else if (c == 't') region = "RU";
|
||||
break;
|
||||
case 'u':
|
||||
if (c == 'k') region = "UA";
|
||||
else if (c == 'r') region = "PK";
|
||||
break;
|
||||
case 'v':
|
||||
if (c == 'i') region = "VN";
|
||||
break;
|
||||
case 'w':
|
||||
if (c == 'a') region = "BE";
|
||||
break;
|
||||
case 'x':
|
||||
if (c == 'h') region = "ZA";
|
||||
break;
|
||||
case 'z':
|
||||
if (c == 'h') region = "CN";
|
||||
else if (c == 'u') region = "ZA";
|
||||
break;
|
||||
}
|
||||
return((xmlChar *)region);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltFreeLocale:
|
||||
* @locale: the locale to free
|
||||
*
|
||||
* Frees a locale created with xsltNewLocale
|
||||
*/
|
||||
void
|
||||
xsltFreeLocale(xsltLocale locale) {
|
||||
#ifdef XSLT_LOCALE_XLOCALE
|
||||
freelocale(locale);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltStrxfrm:
|
||||
* @locale: locale created with xsltNewLocale
|
||||
* @string: UTF-8 string to transform
|
||||
*
|
||||
* Transforms a string according to locale. The transformed string must then be
|
||||
* compared with xsltLocaleStrcmp and freed with xmlFree.
|
||||
*
|
||||
* Returns the transformed string or NULL on error
|
||||
*/
|
||||
xsltLocaleChar *
|
||||
xsltStrxfrm(xsltLocale locale, const xmlChar *string)
|
||||
{
|
||||
#ifdef XSLT_LOCALE_NONE
|
||||
return(NULL);
|
||||
#else
|
||||
size_t xstrlen, r;
|
||||
xsltLocaleChar *xstr;
|
||||
|
||||
#ifdef XSLT_LOCALE_XLOCALE
|
||||
xstrlen = strxfrm_l(NULL, (const char *)string, 0, locale) + 1;
|
||||
xstr = (xsltLocaleChar *) xmlMalloc(xstrlen);
|
||||
if (xstr == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL,
|
||||
"xsltStrxfrm : out of memory error\n");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
r = strxfrm_l((char *)xstr, (const char *)string, xstrlen, locale);
|
||||
#endif
|
||||
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
xstrlen = MultiByteToWideChar(CP_UTF8, 0, string, -1, NULL, 0);
|
||||
if (xstrlen == 0) {
|
||||
xsltTransformError(NULL, NULL, NULL, "xsltStrxfrm : MultiByteToWideChar check failed\n");
|
||||
return(NULL);
|
||||
}
|
||||
xstr = (xsltLocaleChar*) xmlMalloc(xstrlen * sizeof(xsltLocaleChar));
|
||||
if (xstr == NULL) {
|
||||
xsltTransformError(NULL, NULL, NULL, "xsltStrxfrm : out of memory\n");
|
||||
return(NULL);
|
||||
}
|
||||
r = MultiByteToWideChar(CP_UTF8, 0, string, -1, xstr, xstrlen);
|
||||
if (r == 0) {
|
||||
xsltTransformError(NULL, NULL, NULL, "xsltStrxfrm : MultiByteToWideChar failed\n");
|
||||
xmlFree(xstr);
|
||||
return(NULL);
|
||||
}
|
||||
return(xstr);
|
||||
#endif /* XSLT_LOCALE_WINAPI */
|
||||
|
||||
if (r >= xstrlen) {
|
||||
xsltTransformError(NULL, NULL, NULL, "xsltStrxfrm : strxfrm failed\n");
|
||||
xmlFree(xstr);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
return(xstr);
|
||||
#endif /* XSLT_LOCALE_NONE */
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltLocaleStrcmp:
|
||||
* @locale: a locale identifier
|
||||
* @str1: a string transformed with xsltStrxfrm
|
||||
* @str2: a string transformed with xsltStrxfrm
|
||||
*
|
||||
* Compares two strings transformed with xsltStrxfrm
|
||||
*
|
||||
* Returns a value < 0 if str1 sorts before str2,
|
||||
* a value > 0 if str1 sorts after str2,
|
||||
* 0 if str1 and str2 are equal wrt sorting
|
||||
*/
|
||||
int
|
||||
xsltLocaleStrcmp(xsltLocale locale, const xsltLocaleChar *str1, const xsltLocaleChar *str2) {
|
||||
(void)locale;
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
{
|
||||
int ret;
|
||||
if (str1 == str2) return(0);
|
||||
if (str1 == NULL) return(-1);
|
||||
if (str2 == NULL) return(1);
|
||||
ret = CompareStringW(locale, 0, str1, -1, str2, -1);
|
||||
if (ret == 0) {
|
||||
xsltTransformError(NULL, NULL, NULL, "xsltLocaleStrcmp : CompareStringW fail\n");
|
||||
return(0);
|
||||
}
|
||||
return(ret - 2);
|
||||
}
|
||||
#else
|
||||
return(xmlStrcmp(str1, str2));
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef XSLT_LOCALE_WINAPI
|
||||
/**
|
||||
* xsltCountSupportedLocales:
|
||||
* @lcid: not used
|
||||
*
|
||||
* callback used to count locales
|
||||
*
|
||||
* Returns TRUE
|
||||
*/
|
||||
BOOL CALLBACK
|
||||
xsltCountSupportedLocales(LPSTR lcid) {
|
||||
(void) lcid;
|
||||
++xsltLocaleListSize;
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
/**
|
||||
* xsltIterateSupportedLocales:
|
||||
* @lcid: not used
|
||||
*
|
||||
* callback used to track locales
|
||||
*
|
||||
* Returns TRUE if not at the end of the array
|
||||
*/
|
||||
BOOL CALLBACK
|
||||
xsltIterateSupportedLocales(LPSTR lcid) {
|
||||
static int count = 0;
|
||||
xmlChar iso639lang [XSLTMAX_ISO639LANGLEN +1];
|
||||
xmlChar iso3136ctry[XSLTMAX_ISO3166CNTRYLEN+1];
|
||||
int k, l;
|
||||
xsltRFC1766Info *p = xsltLocaleList + count;
|
||||
|
||||
k = sscanf(lcid, "%lx", (long*)&p->lcid);
|
||||
if (k < 1) goto end;
|
||||
/*don't count terminating null character*/
|
||||
k = GetLocaleInfoA(p->lcid, LOCALE_SISO639LANGNAME , iso639lang , sizeof(iso639lang ));
|
||||
if (--k < 1) goto end;
|
||||
l = GetLocaleInfoA(p->lcid, LOCALE_SISO3166CTRYNAME, iso3136ctry, sizeof(iso3136ctry));
|
||||
if (--l < 1) goto end;
|
||||
|
||||
{ /*fill results*/
|
||||
xmlChar *q = p->tag;
|
||||
memcpy(q, iso639lang, k);
|
||||
q += k;
|
||||
*q++ = '-';
|
||||
memcpy(q, iso3136ctry, l);
|
||||
q += l;
|
||||
*q = '\0';
|
||||
}
|
||||
++count;
|
||||
end:
|
||||
return((count < xsltLocaleListSize) ? TRUE : FALSE);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
xsltEnumSupportedLocales(void) {
|
||||
xmlRMutexLock(xsltLocaleMutex);
|
||||
if (xsltLocaleListSize <= 0) {
|
||||
size_t len;
|
||||
|
||||
EnumSystemLocalesA(xsltCountSupportedLocales, LCID_SUPPORTED);
|
||||
|
||||
len = xsltLocaleListSize * sizeof(xsltRFC1766Info);
|
||||
xsltLocaleList = xmlMalloc(len);
|
||||
memset(xsltLocaleList, 0, len);
|
||||
EnumSystemLocalesA(xsltIterateSupportedLocales, LCID_SUPPORTED);
|
||||
}
|
||||
xmlRMutexUnlock(xsltLocaleMutex);
|
||||
}
|
||||
|
||||
#endif /*def XSLT_LOCALE_WINAPI*/
|
57
reactos/dll/3rdparty/libxslt/xsltlocale.h
vendored
Normal file
57
reactos/dll/3rdparty/libxslt/xsltlocale.h
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
/*
|
||||
* Summary: Locale handling
|
||||
* Description: Interfaces for locale handling. Needed for language dependent
|
||||
* sorting.
|
||||
*
|
||||
* Copy: See Copyright for the status of this software.
|
||||
*
|
||||
* Author: Nick Wellnhofer
|
||||
*/
|
||||
|
||||
#ifndef __XML_XSLTLOCALE_H__
|
||||
#define __XML_XSLTLOCALE_H__
|
||||
|
||||
#include <libxml/xmlstring.h>
|
||||
|
||||
#ifdef XSLT_LOCALE_XLOCALE
|
||||
|
||||
#include <locale.h>
|
||||
#include <xlocale.h>
|
||||
|
||||
#ifdef __GLIBC__
|
||||
/*locale_t is defined only if _GNU_SOURCE is defined*/
|
||||
typedef __locale_t xsltLocale;
|
||||
#else
|
||||
typedef locale_t xsltLocale;
|
||||
#endif
|
||||
typedef xmlChar xsltLocaleChar;
|
||||
|
||||
#elif defined(XSLT_LOCALE_WINAPI)
|
||||
|
||||
#include <windows.h>
|
||||
#include <winnls.h>
|
||||
|
||||
typedef LCID xsltLocale;
|
||||
typedef wchar_t xsltLocaleChar;
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* XSLT_LOCALE_NONE:
|
||||
* Macro indicating that locale are not supported
|
||||
*/
|
||||
#ifndef XSLT_LOCALE_NONE
|
||||
#define XSLT_LOCALE_NONE
|
||||
#endif
|
||||
|
||||
typedef void *xsltLocale;
|
||||
typedef xmlChar xsltLocaleChar;
|
||||
|
||||
#endif
|
||||
|
||||
xsltLocale xsltNewLocale(const xmlChar *langName);
|
||||
void xsltFreeLocale(xsltLocale locale);
|
||||
xsltLocaleChar *xsltStrxfrm(xsltLocale locale, const xmlChar *string);
|
||||
int xsltLocaleStrcmp(xsltLocale locale, const xsltLocaleChar *str1, const xsltLocaleChar *str2);
|
||||
|
||||
#endif /* __XML_XSLTLOCALE_H__ */
|
16
reactos/dll/3rdparty/libxslt/xsltutils.c
vendored
16
reactos/dll/3rdparty/libxslt/xsltutils.c
vendored
|
@ -1039,6 +1039,12 @@ xsltComputeSortResult(xsltTransformContextPtr ctxt, xmlNodePtr sort) {
|
|||
}
|
||||
} else {
|
||||
if (res->type == XPATH_STRING) {
|
||||
if (comp->locale != (xsltLocale)0) {
|
||||
xmlChar *str = res->stringval;
|
||||
res->stringval = (xmlChar *) xsltStrxfrm(comp->locale, str);
|
||||
xmlFree(str);
|
||||
}
|
||||
|
||||
results[i] = res;
|
||||
} else {
|
||||
#ifdef WITH_XSLT_DEBUG_PROCESS
|
||||
|
@ -1191,6 +1197,11 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
results[j + incr]->floatval)
|
||||
tst = 1;
|
||||
else tst = -1;
|
||||
} else if(comp->locale != (xsltLocale)0) {
|
||||
tst = xsltLocaleStrcmp(
|
||||
comp->locale,
|
||||
(xsltLocaleChar *) results[j]->stringval,
|
||||
(xsltLocaleChar *) results[j + incr]->stringval);
|
||||
} else {
|
||||
tst = xmlStrcmp(results[j]->stringval,
|
||||
results[j + incr]->stringval);
|
||||
|
@ -1245,6 +1256,11 @@ xsltDefaultSortFunction(xsltTransformContextPtr ctxt, xmlNodePtr *sorts,
|
|||
res[j + incr]->floatval)
|
||||
tst = 1;
|
||||
else tst = -1;
|
||||
} else if(comp->locale != (xsltLocale)0) {
|
||||
tst = xsltLocaleStrcmp(
|
||||
comp->locale,
|
||||
(xsltLocaleChar *) res[j]->stringval,
|
||||
(xsltLocaleChar *) res[j + incr]->stringval);
|
||||
} else {
|
||||
tst = xmlStrcmp(res[j]->stringval,
|
||||
res[j + incr]->stringval);
|
||||
|
|
|
@ -23,21 +23,21 @@ extern "C" {
|
|||
*
|
||||
* the version string like "1.2.3"
|
||||
*/
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.24"
|
||||
#define LIBXSLT_DOTTED_VERSION "1.1.26"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION:
|
||||
*
|
||||
* the version number: 1.2.3 value is 1002003
|
||||
*/
|
||||
#define LIBXSLT_VERSION 10124
|
||||
#define LIBXSLT_VERSION 10126
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_STRING:
|
||||
*
|
||||
* the version number string, 1.2.3 value is "1002003"
|
||||
*/
|
||||
#define LIBXSLT_VERSION_STRING "10124"
|
||||
#define LIBXSLT_VERSION_STRING "10126"
|
||||
|
||||
/**
|
||||
* LIBXSLT_VERSION_EXTRA:
|
||||
|
|
Loading…
Reference in a new issue