1. 29 Mar, 2019 1 commit
    • Nick Wellnhofer's avatar
      Fix security framework bypass · e0355360
      Nick Wellnhofer authored
      xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
      don't check for this condition and allow access. With a specially
      crafted URL, xsltCheckRead could be tricked into returning an error
      because of a supposedly invalid URL that would still be loaded
      succesfully later on.
      
      Fixes #12.
      
      Thanks to Felix Wilhelm for the report.
      e0355360
  2. 29 Nov, 2017 1 commit
  3. 08 Oct, 2017 1 commit
    • Nick Wellnhofer's avatar
      Rework locale feature tests · 8b4babb8
      Nick Wellnhofer authored
      Support glibc 2.26 which removes xlocale.h. Fixes bug 788264. Thanks to
      Quentin Minster for the report.
      
      Drop support for ancient glibc 2.2.x. This allows to replace the test
      program in configure.ac with a simple check for strxfrm_l.
      
      Always use WinAPI locales on Windows.
      
      Define macros in xsltlocale.h and rename XSLT_LOCALE_XLOCALE to
      XSLT_LOCALE_POSIX.
      8b4babb8
  4. 27 May, 2017 1 commit
  5. 07 Feb, 2017 1 commit
  6. 03 Jul, 2016 5 commits
  7. 21 Jun, 2016 1 commit
  8. 14 Sep, 2015 1 commit
  9. 14 Feb, 2014 1 commit
  10. 12 Sep, 2012 1 commit
  11. 16 Aug, 2012 1 commit
  12. 09 Aug, 2012 1 commit
  13. 28 Feb, 2011 1 commit
    • Daniel Veillard's avatar
      Fix a memory leak if compiled with Windows locale support · 7f741527
      Daniel Veillard authored
      Ralf Junker <ralfjunker@gmx.de> pointed out a ouple of leaks in the
      Windows locale support:
      * libxslt/xslt.c: add cleanup code for the mutex in xsltUninit()
      * libxslt/xsltlocale.c libxslt/xsltlocale.h: add a new cleanup function
        xsltFreeLocales
      * libxslt/extensions.c: add a call to xsltFreeLocales in xsltCleanupGlobals
      7f741527
  14. 08 Nov, 2010 1 commit
  15. 12 Apr, 2010 1 commit
    • Stefan Kost's avatar
      profiling: add callgraph report · 193322ac
      Stefan Kost authored
      This patch also tracks who called a template and how often. Based on that the
      output of xsltproc --profile now also contains a gprof alike callgraph. If available
      posix monotonic clocks are the preferred way to get timestamps.
      193322ac
  16. 17 Sep, 2009 1 commit
    • Martin's avatar
      Fix problems with embedded stylesheets and namespaces · 34c7b5ce
      Martin authored
      * libxslt/xslt.c: copy the embedded stylesheet instead of cutting it
        out of the source tree and make sure to copy namespaces in scope too
      * tests/REC/Makefile.am tests/REC/stand-2.7-[23]*: add the 2 tests
        case to the regression suite
      34c7b5ce
  17. 16 Sep, 2009 2 commits
    • Martin's avatar
      Crash compiling stylesheet with DTD · 7089a62b
      Martin authored
      * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation
        process could get seriously wrong
      7089a62b
    • Daniel Veillard's avatar
      Add API versioning and various cleanups · 482e7b7e
      Daniel Veillard authored
      * doc/symbols.xml doc/syms.xsl doc/checkapisym.xsl libxslt/libxslt.syms:
        the new symbol files, checking and stylesheets, based on libxml2 ones
      * configure.in doc/Makefile.am libxslt/Makefile.am: modifications needed
        to activate the symbol versioning
      * doc/libxslt-api.xml doc/libxslt-refs.xml doc/EXSLT/libexslt-api.xml
        doc/EXSLT/libexslt-refs.xml: regenerated
      * libexslt/crypto.c libxslt/Makefile.am libxslt/keys.c libxslt/variables.c
        libxslt/xslt.c libxslt/xsltInternals.h libxslt/xsltlocale.c
        libxslt/xsltlocale.h: various cleanups
      482e7b7e
  18. 14 Aug, 2009 1 commit
    • Daniel Veillard's avatar
      305913 a serious problem in extensions reentrancy · b1c52a88
      Daniel Veillard authored
      * libexslt/exslt.c libxslt/extensions.c libxslt/extensions.h
        libxslt/security.c libxslt/transform.c libxslt/xslt.c: extension
        support use some global variables, make sure there is a Mutex to
        access and modify them
      b1c52a88
  19. 01 Aug, 2008 1 commit
    • Daniel Veillard's avatar
      big patch from Roumen Petrov finishing xsl:sort lang support with many · 79ab294f
      Daniel Veillard authored
      * 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
      Daniel
      
      svn path=/trunk/; revision=1488
      79ab294f
  20. 27 Jul, 2008 1 commit
  21. 13 May, 2008 1 commit
    • Daniel Veillard's avatar
      fix the processing of top level elements of stylesheets which are not in · 97009142
      Daniel Veillard authored
      * libxslt/xslt.c libxslt/extensions.c libxslt/extensions.h:
        fix the processing of top level elements of stylesheets which
        are not in the XSLT namespace and are not an extension either
        should fix #529223
      * tests/docs/Makefile.am tests/docs/bug-167.xml
        tests/general/Makefile.am tests/general/bug-167.*: add the
        test to the regression suite
      Daniel
      
      svn path=/trunk/; revision=1472
      97009142
  22. 05 Feb, 2008 1 commit
  23. 23 Aug, 2007 1 commit
  24. 26 Jul, 2007 1 commit
  25. 31 May, 2007 1 commit
  26. 11 Jan, 2007 1 commit
    • William M. Brack's avatar
      added new function replace from Joel Reed. added new test case for above. · 40e7c29b
      William M. Brack authored
              * libexslt/strings.c: added new function replace from Joel
                Reed.
              * tests/exslt/Makefile.am, replace.1.xml, replace.1.xsl,
                replace.1.out: added new test case for above.
              * libxslt.spec.in: trivial change from Gnome to GNOME
              * configure.in: trivial change for flags on my compilations
              * libxslt/documents.c, libxslt/documents.h, libxslt/keys.c,
                libxslt/keys.h, libxslt/variables.c, libxslt/templates.c,
                libxslt/transform.c, libxslt/variables.c, libxslt/xslt.c,
                libxslt/xsltutils.c: fixed some documentation/comments and
                compilation warnings - no change to logic.
              * re-generated the documentation.
      
      svn path=/trunk/; revision=1413
      40e7c29b
  27. 26 Oct, 2006 1 commit
  28. 09 Aug, 2006 1 commit
  29. 14 Jul, 2006 2 commits
    • Kasimier T. Buchcik's avatar
      Committing again, since I forgot to switch from win to linux linebreaks in · 7662584e
      Kasimier T. Buchcik authored
      * libxslt/attributes.c libxslt/documents.c
        libxslt/functions.c libxslt/keys.c libxslt/namespaces.c
        libxslt/pattern.c libxslt/preproc.c libxslt/templates.c
        libxslt/templates.h libxslt/transform.c
        libxslt/variables.c libxslt/xslt.c
        libxslt/xsltInternals.h libxslt/xsltutils.c
        libxslt/xsltutils.h libexslt/common.c libexslt/dynamic.c
        libexslt/functions.c libexslt/strings.c:
        Committing again, since I forgot to switch from win to linux
        linebreaks in the files.
      7662584e
    • Kasimier T. Buchcik's avatar
      Refactored xsltValueOf(). Changed to use xmlXPathCastToString() directly, · 90d2d1c2
      Kasimier T. Buchcik authored
      * libxslt/attributes.c libxslt/documents.c
        libxslt/functions.c libxslt/keys.c libxslt/namespaces.c
        libxslt/pattern.c libxslt/preproc.c libxslt/templates.c
        libxslt/templates.h libxslt/transform.c libxslt/variables.c
        libxslt/xslt.c libxslt/xsltInternals.h libxslt/xsltutils.c
        libxslt/xsltutils.h libexslt/common.c libexslt/dynamic.c
        libexslt/functions.c libexslt/strings.c:
        Refactored xsltValueOf(). Changed to use xmlXPathCastToString()
        directly, rather than creating an intermediate object with
        xmlXPathConvertString(). This now does not add a text-node to
        the result if the string is empty (this has impact on
        serialization, since an empty text-node is serialized as
        <foo></foo>, and now it will be serialized as <foo/>).
        Refactored other functions in transform.c:
        Mostly code cleanup/restructuring. Minimized number of
        function variables for instruction which eat up function stack
        memory when recursing templates (xsltIf(), xsltChoose(),
        xsltApplyTemplates(),  xsltCallTemplate()).
        Changed XSLT tests to use xmlXPathCompiledEvalToBoolean().
        Implemented redefinition checks at compilation-time and
        eliminating them at transformation time in the refactored code
        paths.
        Introduced the field @currentTemplateRule on xsltTransformContext to
        reflect the "Current Template Rule" as defined by the spec.
        NOTE that ctxt->currentTemplateRule and ctxt->templ is not the
        same; the former is the "Current Template Rule" as defined by the
        XSLT spec, the latter is simply the template struct being
        currently processed by Libxslt.
        Added XML_COMMENT_NODE and XML_CDATA_SECTION_NODE to the macro
        IS_XSLT_REAL_NODE.
        Misc code cleanup/restructuring and everything else I already forgot.
        Refactored lifetime of temporary result tree fragments.
        Substituted all calls to the now deprecated xsltRegisterTmpRVT()
        for the new xsltRegisterLocalRVT().
        Fragments of xsl:variable and xsl:param are freed when the
        variable/pram is freed.
        Fragments created when evaluating a "select" of xsl:varible and
        xsl:param are also bound to the lifetime of the var/param.
        EXSLT's func:function now uses the following functions to let take
        care the transformation's garbage collector of returned tree
        fragments:
          xsltExtensionInstructionResultRegister(),
          xsltExtensionInstructionResultFinalize()
        Fixes:
        #339222 - xsl:param at invalid position inside an xsl:template is
                  not catched
        #346015 - Non-declared caller-parameters are accepted
        #160400 - Compiles invalid XSLT; unbound variable accepted
        #308441 - namespaced parameters become unregistered
        #307103 - problem with proximity position in predicates of match
                  patterns
        #328218 - problem with exsl:node-set() when converting strings
                  to node sets
        #318088 - infinite recursion detection
        #321505 - Multiple contiguous CDATA in output
        #334493 - "--param" option does not have root context
        #114377 - weird func:result/xsl:variable/exsl:node-set interaction
        #150309 - Regression caused by fix for 142768
      90d2d1c2
  30. 19 Jun, 2006 1 commit
    • Kasimier T. Buchcik's avatar
      Merged all the namespace lookup/create/disable functions into · c09974f8
      Kasimier T. Buchcik authored
      * libxslt/attributes.c libxslt/attrvt.c libxslt/namespaces.c
        libxslt/namespaces.h libxslt/preproc.c libxslt/templates.c
        libxslt/transform.c libxslt/variables.c libxslt/xslt.c
        libxslt/xsltInternals.h libxslt/xsltutils.c:
        Merged all the namespace lookup/create/disable functions
        into xsltGetSpecialNamespace(). Changed xsltGetNamespace()
        and xsltGetPlainNamespace() to call xsltGetSpecialNamespace(),
        but kept the ns-aliasing mechanism; the ns-aliasing needs
        to be removed when we move to the refactored code, which
        applies ns-alias only at compilaton time.
        Refactored xsltElementComp() (preproc.c); enhanced error reports.
        Fixed: if the "namespace" attribute was not given, then this
        performed incorrectly only a lookup for a default namespace;
        i.e., without taking any prefix on the "name" attribute into
        account.
        Refactored xsltElement() (transform.c); enhanced error reports.
        Refactored xsltAttributeComp() (preproc.c). Added namespace
        lookup as in xsltElementComp(). Enhanced error reports.
        Refactored xsltAttribute() (transform.c); enhanced error reports.
        xsltCopyTreeInternal(): eliminated the need to call xmlGetNsList()
        for every element in the tree; this needs to be done only for
        the top-most elements. For subsequent elements reconcile only
        the ns-declarations. Disallowed setting of ns-declarations if
        children have been already added to an element.
        Removed ns-aliasing code where necessary.
        xsltCopyProp(): disallowed setting of attribute nodes if
        children have been already added to an element.
        xsltCopy(): removed the incorrect skipping of attributes in the
        XSLT namespace. Removed the incorrect ns-aliasing for attributes.
        Changed to use the introduced function xsltShallowCopyAttr().
        xsltShallowCopyAttr():  Centralized all attribute-copy related
        code in this function. It will now be called by
        xsltCopyTreeInternal(), xsltCopyOf() and xsltCopy().
        xsltCopyAttrListNoOverwrite(): Renamed. Refactored. Optimized to
        use xsltGetSpecialNamespace() and xmlNewDocProp().
        Further substitution of various scattered namespace-lookup
        related code for the use of xsltGetSpecialNamespace().
        xsltAttrTemplateProcess(): Refactored. Removed the incorrect
        processing of attribute-sets. Attribute sets need to be applied
        before adding any normal attribute of the literal result element;
        this is now done in  xsltAttrListTemplateProcess(). Fixed to
        ensure that the ns-prefix of the overwriting attribute is used.
        xsltAttrListTemplateProcess(): Refactored. Moved semantics from
        xsltAttrTemplateProcess() over to this function in order to
        optimize processing of multiple attributes. This does not call
        xsltAttrTemplateProcess() anymore.
        Fixed: do not exclude the XSLT namespace after ns-aliasing have
        beed applied.
        The IFDEFed-out refactored code fixes the following issues:
        - #313711: namespace collision with namespace-alias (reported
                    by by Oleg Paraschenko)
        - #338214: Incorrect scope for exclude-result-prefixes
        - #341392: Excluding namespace declarations of literal result
                   elements.
        - #341325: Namespace aliasing and resulting namespace prefixes
        Already enabled fixes:
        - #344183: xsl:copy misses to copy attributes in the XSLT namespace
        - #341463: Namespace-alias using #default for result-prefix with no
        	     default namespace in scope
        - #313890: namespace collision with xsl:element and xsl:attribute,
        	     reported by Oleg Paraschenko
        - #344176: xsl:copy misses to set an element's namespace-URI in
                   some cases
        - #305739: the "name" QName of xsl:element is incorrectly always
        	     resolved to the default namespace
      c09974f8
  31. 01 Jun, 2006 1 commit
  32. 31 May, 2006 1 commit
    • Kasimier T. Buchcik's avatar
      Fixed a difference in processing of xsl:value-of and xsl:text wrt to · 27a357db
      Kasimier T. Buchcik authored
      * libxslt/transform.c: Fixed a difference in processing of
        xsl:value-of and  xsl:text wrt to merging of strings of
        output-escaped text-nodes. This difference made the
        optimized string-merging mechanism run out of sync, which
        led to segfaults in subsequent string reallocations. See
        bug #343411, reported by Grzegorz Kaczor.
      * xslt.c: Added check for ctxt->internalized when we parse
        xsl:text and internalize the strings.
      27a357db
  33. 22 May, 2006 1 commit
    • Kasimier T. Buchcik's avatar
      Next tiny step of refactoring - mostly bug fixes and cosmetic changes. · c43f2625
      Kasimier T. Buchcik authored
      * libxslt/attributes.c libxslt/documents.c
        libxslt/extensions.c libxslt/keys.c libxslt/pattern.c
        libxslt/preproc.c libxslt/templates.c
        libxslt/transform.c libxslt/variables.c
        libxslt/xslt.c libxslt/xsltInternals.h:
        Next tiny step of refactoring - mostly bug fixes and
        cosmetic changes.
        Changes outside of the refactored code:
        1) Optimized xsl:attribute if the content consists of
         just 1 text node.
        2) Optimized computation of xsl:key. The keys will now be
         computed for a specific document not until the first call
         of a key() function; here only the keys with the specific
         name used by key() are computed. This means that this
         now avoids computation of all keys for all loaded
         input documents (even if no key() was called on them).
         One exception is the scenario where a key() is used in
         a template's match pattern; in this case all keys are
         computed for a document if there's a chance that
         a "keyed" template could match a node (this could still
         be optimized a bit).
      c43f2625
  34. 12 May, 2006 1 commit
    • Kasimier T. Buchcik's avatar
      Next step of refactoring. For more details see bug #341588. I applied the · 76ccb300
      Kasimier T. Buchcik authored
      * libxslt/documents.c libxslt/namespaces.c
        libxslt/preproc.c libxslt/transform.c
        libxslt/xslt.c libxslt/xsltInternals.h libxslt/xsltutils.c:
        Next step of refactoring. For more details see bug #341588.
        I applied the suggestion of Jerome Pesenti to the refactored
        (still IDFEDed out with XSLT_REFACTORED) code: The XPath
        compilation context (accessible via the compilation context)
        is now reused for compilation of expressions at
        compilation-time; this should reduce compilation time to 50%
        for avarage stylesheets.
      76ccb300