PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/xsl - xsltprocessor.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 321 428 75.0 %
Date: 2015-08-04 Functions: 16 18 88.9 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 7                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1997-2015 The PHP Group                                |
       6             :    +----------------------------------------------------------------------+
       7             :    | This source file is subject to version 3.01 of the PHP license,      |
       8             :    | that is bundled with this package in the file LICENSE, and is        |
       9             :    | available through the world-wide-web at the following url:           |
      10             :    | http://www.php.net/license/3_01.txt                                  |
      11             :    | If you did not receive a copy of the PHP license and are unable to   |
      12             :    | obtain it through the world-wide-web, please send a note to          |
      13             :    | license@php.net so we can mail you a copy immediately.               |
      14             :    +----------------------------------------------------------------------+
      15             :    | Authors: Christian Stocker <chregu@php.net>                          |
      16             :    |          Rob Richards <rrichards@php.net>                            |
      17             :    +----------------------------------------------------------------------+
      18             : */
      19             : 
      20             : /* $Id$ */
      21             : 
      22             : #ifdef HAVE_CONFIG_H
      23             : #include "config.h"
      24             : #endif
      25             : 
      26             : #include "php.h"
      27             : #include "php_xsl.h"
      28             : #include "ext/libxml/php_libxml.h"
      29             : 
      30             : /* {{{ arginfo */
      31             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1)
      32             :         ZEND_ARG_INFO(0, doc)
      33             : ZEND_END_ARG_INFO();
      34             : 
      35             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0, 0, 1)
      36             :         ZEND_ARG_INFO(0, doc)
      37             : ZEND_END_ARG_INFO();
      38             : 
      39             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_uri, 0, 0, 2)
      40             :         ZEND_ARG_INFO(0, doc)
      41             :         ZEND_ARG_INFO(0, uri)
      42             : ZEND_END_ARG_INFO();
      43             : 
      44             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_xml, 0, 0, 1)
      45             :         ZEND_ARG_INFO(0, doc)
      46             : ZEND_END_ARG_INFO();
      47             : 
      48             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_parameter, 0, 0, 2)
      49             :         ZEND_ARG_INFO(0, namespace)
      50             :         ZEND_ARG_INFO(0, name)
      51             :         ZEND_ARG_INFO(0, value)
      52             : ZEND_END_ARG_INFO();
      53             : 
      54             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_get_parameter, 0, 0, 2)
      55             :         ZEND_ARG_INFO(0, namespace)
      56             :         ZEND_ARG_INFO(0, name)
      57             : ZEND_END_ARG_INFO();
      58             : 
      59             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_remove_parameter, 0, 0, 2)
      60             :         ZEND_ARG_INFO(0, namespace)
      61             :         ZEND_ARG_INFO(0, name)
      62             : ZEND_END_ARG_INFO();
      63             : 
      64             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_has_exslt_support, 0, 0, 0)
      65             : ZEND_END_ARG_INFO();
      66             : 
      67             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_register_php_functions, 0, 0, 0)
      68             :         ZEND_ARG_INFO(0, restrict)
      69             : ZEND_END_ARG_INFO();
      70             : 
      71             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_profiling, 0, 0, 1)
      72             :         ZEND_ARG_INFO(0, filename)
      73             : ZEND_END_ARG_INFO();
      74             : 
      75             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_security_prefs, 0, 0, 1)
      76             :         ZEND_ARG_INFO(0, securityPrefs)
      77             : ZEND_END_ARG_INFO();
      78             : 
      79             : ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_get_security_prefs, 0, 0, 0)
      80             : ZEND_END_ARG_INFO();
      81             : /* }}} */
      82             : 
      83             : /*
      84             : * class xsl_xsltprocessor
      85             : *
      86             : * URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#
      87             : * Since:
      88             : */
      89             : 
      90             : const zend_function_entry php_xsl_xsltprocessor_class_functions[] = {
      91             :         PHP_FALIAS(importStylesheet, xsl_xsltprocessor_import_stylesheet, arginfo_xsl_xsltprocessor_import_stylesheet)
      92             :         PHP_FALIAS(transformToDoc, xsl_xsltprocessor_transform_to_doc, arginfo_xsl_xsltprocessor_transform_to_doc)
      93             :         PHP_FALIAS(transformToUri, xsl_xsltprocessor_transform_to_uri, arginfo_xsl_xsltprocessor_transform_to_uri)
      94             :         PHP_FALIAS(transformToXml, xsl_xsltprocessor_transform_to_xml, arginfo_xsl_xsltprocessor_transform_to_xml)
      95             :         PHP_FALIAS(setParameter, xsl_xsltprocessor_set_parameter, arginfo_xsl_xsltprocessor_set_parameter)
      96             :         PHP_FALIAS(getParameter, xsl_xsltprocessor_get_parameter, arginfo_xsl_xsltprocessor_get_parameter)
      97             :         PHP_FALIAS(removeParameter, xsl_xsltprocessor_remove_parameter, arginfo_xsl_xsltprocessor_remove_parameter)
      98             :         PHP_FALIAS(hasExsltSupport, xsl_xsltprocessor_has_exslt_support, arginfo_xsl_xsltprocessor_has_exslt_support)
      99             :         PHP_FALIAS(registerPHPFunctions, xsl_xsltprocessor_register_php_functions, arginfo_xsl_xsltprocessor_register_php_functions)
     100             :         PHP_FALIAS(setProfiling, xsl_xsltprocessor_set_profiling, arginfo_xsl_xsltprocessor_set_profiling)
     101             :         PHP_FALIAS(setSecurityPrefs, xsl_xsltprocessor_set_security_prefs, arginfo_xsl_xsltprocessor_set_security_prefs)
     102             :         PHP_FALIAS(getSecurityPrefs, xsl_xsltprocessor_get_security_prefs, arginfo_xsl_xsltprocessor_get_security_prefs)
     103             :         {NULL, NULL, NULL}
     104             : };
     105             : 
     106             : /* {{{ php_xsl_xslt_string_to_xpathexpr()
     107             :    Translates a string to a XPath Expression */
     108           5 : static char *php_xsl_xslt_string_to_xpathexpr(const char *str)
     109             : {
     110           5 :         const xmlChar *string = (const xmlChar *)str;
     111             : 
     112             :         xmlChar *value;
     113             :         int str_len;
     114             : 
     115           5 :         str_len = xmlStrlen(string) + 3;
     116             : 
     117           5 :         if (xmlStrchr(string, '"')) {
     118           2 :                 if (xmlStrchr(string, '\'')) {
     119           2 :                         php_error_docref(NULL, E_WARNING, "Cannot create XPath expression (string contains both quote and double-quotes)");
     120           2 :                         return NULL;
     121             :                 }
     122           0 :                 value = (xmlChar*) safe_emalloc (str_len, sizeof(xmlChar), 0);
     123           0 :                 snprintf((char*)value, str_len, "'%s'", string);
     124             :         } else {
     125           3 :                 value = (xmlChar*) safe_emalloc (str_len, sizeof(xmlChar), 0);
     126           3 :                 snprintf((char *)value, str_len, "\"%s\"", string);
     127             :         }
     128           3 :         return (char *) value;
     129             : }
     130             : /* }}} */
     131             : 
     132             : /* {{{ php_xsl_xslt_make_params()
     133             :    Translates a PHP array to a libxslt parameters array */
     134          47 : static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params)
     135             : {
     136             : 
     137             :         int parsize;
     138             :         zval *value;
     139             :         char *xpath_expr;
     140             :         zend_string *string_key;
     141             :         zend_ulong num_key;
     142          47 :         char **params = NULL;
     143          47 :         int i = 0;
     144             : 
     145          47 :         parsize = (2 * zend_hash_num_elements(parht) + 1) * sizeof(char *);
     146          47 :         params = (char **)safe_emalloc((2 * zend_hash_num_elements(parht) + 1), sizeof(char *), 0);
     147          47 :         memset((char *)params, 0, parsize);
     148             : 
     149          57 :         ZEND_HASH_FOREACH_KEY_VAL(parht, num_key, string_key, value) {
     150           5 :                 if (string_key == NULL) {
     151           0 :                         php_error_docref(NULL, E_WARNING, "Invalid argument or parameter array");
     152           0 :                         efree(params);
     153           0 :                         return NULL;
     154             :                 } else {
     155           5 :                         if (Z_TYPE_P(value) != IS_STRING) {
     156           0 :                                 SEPARATE_ZVAL(value);
     157           0 :                                 convert_to_string(value);
     158             :                         }
     159             : 
     160           5 :                         if (!xpath_params) {
     161           5 :                                 xpath_expr = php_xsl_xslt_string_to_xpathexpr(Z_STRVAL_P(value));
     162             :                         } else {
     163           0 :                                 xpath_expr = estrndup(Z_STRVAL_P(value), Z_STRLEN_P(value));
     164             :                         }
     165           5 :                         if (xpath_expr) {
     166           3 :                                 params[i++] = estrndup(string_key->val, string_key->len);
     167           3 :                                 params[i++] = xpath_expr;
     168             :                         }
     169             :                 }
     170             :         } ZEND_HASH_FOREACH_END();
     171             : 
     172          47 :         params[i++] = NULL;
     173             : 
     174          47 :         return params;
     175             : }
     176             : /* }}} */
     177             : 
     178          30 : static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int type) /* {{{ */
     179             : {
     180             :         xsltTransformContextPtr tctxt;
     181             :         zval *args;
     182             :         zval retval;
     183             :         int result, i;
     184          30 :         int error = 0;
     185             :         zend_fcall_info fci;
     186             :         zval handler;
     187             :         xmlXPathObjectPtr obj;
     188             :         char *str;
     189             :         xsl_object *intern;
     190          30 :         zend_string *callable = NULL;
     191             : 
     192             : 
     193          30 :         if (! zend_is_executing()) {
     194           0 :                 xsltGenericError(xsltGenericErrorContext,
     195             :                 "xsltExtFunctionTest: Function called from outside of PHP\n");
     196           0 :                 error = 1;
     197             :         } else {
     198          30 :                 tctxt = xsltXPathGetTransformContext(ctxt);
     199          30 :                 if (tctxt == NULL) {
     200           0 :                         xsltGenericError(xsltGenericErrorContext,
     201             :                         "xsltExtFunctionTest: failed to get the transformation context\n");
     202           0 :                         error = 1;
     203             :                 } else {
     204          30 :                         intern = (xsl_object*)tctxt->_private;
     205          30 :                         if (intern == NULL) {
     206           0 :                                 xsltGenericError(xsltGenericErrorContext,
     207             :                                 "xsltExtFunctionTest: failed to get the internal object\n");
     208           0 :                                 error = 1;
     209             :                         }
     210          30 :                         else if (intern->registerPhpFunctions == 0) {
     211           0 :                                 xsltGenericError(xsltGenericErrorContext,
     212             :                                 "xsltExtFunctionTest: PHP Object did not register PHP functions\n");
     213           0 :                                 error = 1;
     214             :                         }
     215             :                 }
     216             :         }
     217             : 
     218          30 :         if (error == 1) {
     219           0 :                 for (i = nargs - 1; i >= 0; i--) {
     220           0 :                         obj = valuePop(ctxt);
     221           0 :                         xmlXPathFreeObject(obj);
     222             :                 }
     223           0 :                 return;
     224             :         }
     225             : 
     226          30 :         fci.param_count = nargs - 1;
     227          30 :         if (fci.param_count > 0) {
     228          27 :                 args = safe_emalloc(fci.param_count, sizeof(zval), 0);
     229             :         }
     230             :         /* Reverse order to pop values off ctxt stack */
     231          58 :         for (i = nargs - 2; i >= 0; i--) {
     232          28 :                 obj = valuePop(ctxt);
     233          28 :                 switch (obj->type) {
     234             :                         case XPATH_STRING:
     235          30 :                                 ZVAL_STRING(&args[i], (char *)obj->stringval);
     236          15 :                                 break;
     237             :                         case XPATH_BOOLEAN:
     238           0 :                                 ZVAL_BOOL(&args[i],  obj->boolval);
     239           0 :                                 break;
     240             :                         case XPATH_NUMBER:
     241           0 :                                 ZVAL_DOUBLE(&args[i], obj->floatval);
     242           0 :                                 break;
     243             :                         case XPATH_NODESET:
     244          13 :                                 if (type == 1) {
     245           1 :                                         str = (char*)xmlXPathCastToString(obj);
     246           2 :                                         ZVAL_STRING(&args[i], str);
     247           1 :                                         xmlFree(str);
     248          12 :                                 } else if (type == 2) {
     249             :                                         int j;
     250          12 :                                         dom_object *domintern = (dom_object *)intern->doc;
     251          12 :                                         array_init(&args[i]);
     252          12 :                                         if (obj->nodesetval && obj->nodesetval->nodeNr > 0) {
     253          24 :                                                 for (j = 0; j < obj->nodesetval->nodeNr; j++) {
     254          12 :                                                         xmlNodePtr node = obj->nodesetval->nodeTab[j];
     255             :                                                         zval child;
     256             :                                                         /* not sure, if we need this... it's copied from xpath.c */
     257          12 :                                                         if (node->type == XML_NAMESPACE_DECL) {
     258             :                                                                 xmlNsPtr curns;
     259             :                                                                 xmlNodePtr nsparent;
     260             : 
     261           0 :                                                                 nsparent = node->_private;
     262           0 :                                                                 curns = xmlNewNs(NULL, node->name, NULL);
     263           0 :                                                                 if (node->children) {
     264           0 :                                                                         curns->prefix = xmlStrdup((char *)node->children);
     265             :                                                                 }
     266           0 :                                                                 if (node->children) {
     267           0 :                                                                         node = xmlNewDocNode(node->doc, NULL, (char *) node->children, node->name);
     268             :                                                                 } else {
     269           0 :                                                                         node = xmlNewDocNode(node->doc, NULL, "xmlns", node->name);
     270             :                                                                 }
     271           0 :                                                                 node->type = XML_NAMESPACE_DECL;
     272           0 :                                                                 node->parent = nsparent;
     273           0 :                                                                 node->ns = curns;
     274             :                                                         } else {
     275          12 :                                                                 node = xmlDocCopyNodeList(domintern->document->ptr, node);
     276             :                                                         }
     277             : 
     278          12 :                                                         php_dom_create_object(node, &child, domintern);
     279          12 :                                                         add_next_index_zval(&args[i], &child);
     280             :                                                 }
     281             :                                         }
     282             :                                 }
     283          13 :                                 break;
     284             :                         default:
     285           0 :                                 str = xmlXPathCastToString(obj);
     286           0 :                                 ZVAL_STRING(&args[i], str);
     287           0 :                                 xmlFree(str);
     288             :                 }
     289          28 :                 xmlXPathFreeObject(obj);
     290             :         }
     291             : 
     292          30 :         fci.size = sizeof(fci);
     293          30 :         fci.function_table = EG(function_table);
     294          30 :         if (fci.param_count > 0) {
     295          27 :                 fci.params = args;
     296             :         } else {
     297           3 :                 fci.params = NULL;
     298             :         }
     299             : 
     300             : 
     301          30 :         obj = valuePop(ctxt);
     302          30 :         if (obj->stringval == NULL) {
     303           1 :                 php_error_docref(NULL, E_WARNING, "Handler name must be a string");
     304           1 :                 xmlXPathFreeObject(obj);
     305           1 :                 valuePush(ctxt, xmlXPathNewString(""));
     306           1 :                 if (fci.param_count > 0) {
     307           2 :                         for (i = 0; i < nargs - 1; i++) {
     308           1 :                                 zval_ptr_dtor(&args[i]);
     309             :                         }
     310           1 :                         efree(args);
     311             :                 }
     312           1 :                 return;
     313             :         }
     314          58 :         ZVAL_STRING(&handler, obj->stringval);
     315          29 :         xmlXPathFreeObject(obj);
     316             : 
     317          29 :         ZVAL_COPY_VALUE(&fci.function_name, &handler);
     318          29 :         fci.symbol_table = NULL;
     319          29 :         fci.object = NULL;
     320          29 :         fci.retval = &retval;
     321          29 :         fci.no_separation = 0;
     322             :         /*fci.function_handler_cache = &function_ptr;*/
     323          29 :         if (!zend_make_callable(&handler, &callable)) {
     324           1 :                 php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", callable->val);
     325           1 :                 valuePush(ctxt, xmlXPathNewString(""));
     326          29 :         } else if ( intern->registerPhpFunctions == 2 && zend_hash_exists(intern->registered_phpfunctions, callable) == 0) {
     327           2 :                 php_error_docref(NULL, E_WARNING, "Not allowed to call handler '%s()'", callable->val);
     328             :                 /* Push an empty string, so that we at least have an xslt result... */
     329           2 :                 valuePush(ctxt, xmlXPathNewString(""));
     330             :         } else {
     331          25 :                 result = zend_call_function(&fci, NULL);
     332          25 :                 if (result == FAILURE) {
     333           0 :                         if (Z_TYPE(handler) == IS_STRING) {
     334           0 :                                 php_error_docref(NULL, E_WARNING, "Unable to call handler %s()", Z_STRVAL(handler));
     335           0 :                                 valuePush(ctxt, xmlXPathNewString(""));
     336             :                         }
     337             :                 /* retval is == NULL, when an exception occurred, don't report anything, because PHP itself will handle that */
     338          25 :                 } else if (Z_ISUNDEF(retval)) {
     339             :                 } else {
     340          17 :                         if (Z_TYPE(retval) == IS_OBJECT && instanceof_function(Z_OBJCE(retval), dom_node_class_entry)) {
     341             :                                 xmlNode *nodep;
     342             :                                 dom_object *obj;
     343           2 :                                 if (intern->node_list == NULL) {
     344           1 :                                         ALLOC_HASHTABLE(intern->node_list);
     345           1 :                                         zend_hash_init(intern->node_list, 0, NULL, ZVAL_PTR_DTOR, 0);
     346             :                                 }
     347             :                                 Z_ADDREF(retval);
     348           2 :                                 zend_hash_next_index_insert(intern->node_list, &retval);
     349           2 :                                 obj = Z_DOMOBJ_P(&retval);
     350           2 :                                 nodep = dom_object_get_node(obj);
     351           2 :                                 valuePush(ctxt, xmlXPathNewNodeSet(nodep));
     352          26 :                         } else if (Z_TYPE(retval) == IS_TRUE || Z_TYPE(retval) == IS_FALSE) {
     353           0 :                                 valuePush(ctxt, xmlXPathNewBoolean(Z_LVAL(retval)));
     354          13 :                         } else if (Z_TYPE(retval) == IS_OBJECT) {
     355           1 :                                 php_error_docref(NULL, E_WARNING, "A PHP Object cannot be converted to a XPath-string");
     356           1 :                                 valuePush(ctxt, xmlXPathNewString(""));
     357             :                         } else {
     358          12 :                                 convert_to_string_ex(&retval);
     359          12 :                                 valuePush(ctxt, xmlXPathNewString(Z_STRVAL(retval)));
     360             :                         }
     361          15 :                         zval_ptr_dtor(&retval);
     362             :                 }
     363             :         }
     364          28 :         zend_string_release(callable);
     365          28 :         zval_ptr_dtor(&handler);
     366          28 :         if (fci.param_count > 0) {
     367          53 :                 for (i = 0; i < nargs - 1; i++) {
     368          27 :                         zval_ptr_dtor(&args[i]);
     369             :                 }
     370          26 :                 efree(args);
     371             :         }
     372             : }
     373             : /* }}} */
     374             : 
     375           1 : void xsl_ext_function_string_php(xmlXPathParserContextPtr ctxt, int nargs) /* {{{ */
     376             : {
     377           1 :         xsl_ext_function_php(ctxt, nargs, 1);
     378           1 : }
     379             : /* }}} */
     380             : 
     381          29 : void xsl_ext_function_object_php(xmlXPathParserContextPtr ctxt, int nargs) /* {{{ */
     382             : {
     383          29 :         xsl_ext_function_php(ctxt, nargs, 2);
     384          28 : }
     385             : /* }}} */
     386             : 
     387             : /* {{{ proto void xsl_xsltprocessor_import_stylesheet(domdocument doc)
     388             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#
     389             : Since:
     390             : */
     391          61 : PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
     392             : {
     393          61 :         zval *id, *docp = NULL;
     394          61 :         xmlDoc *doc = NULL, *newdoc = NULL;
     395             :         xsltStylesheetPtr sheetp, oldsheetp;
     396             :         xsl_object *intern;
     397          61 :         int prevSubstValue, prevExtDtdValue, clone_docu = 0;
     398          61 :         xmlNode *nodep = NULL;
     399             :         zend_object_handlers *std_hnd;
     400             :         zval *cloneDocu, member, rv;
     401             : 
     402          61 :         if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oo", &id, xsl_xsltprocessor_class_entry, &docp) == FAILURE) {
     403           0 :                 RETURN_FALSE;
     404             :         }
     405             : 
     406          61 :         nodep = php_libxml_import_node(docp);
     407             : 
     408          61 :         if (nodep) {
     409          61 :                 doc = nodep->doc;
     410             :         }
     411          61 :         if (doc == NULL) {
     412           0 :                 php_error(E_WARNING, "Invalid Document");
     413           0 :                 RETURN_FALSE;
     414             :         }
     415             : 
     416             :         /* libxslt uses _private, so we must copy the imported
     417             :         stylesheet document otherwise the node proxies will be a mess */
     418          61 :         newdoc = xmlCopyDoc(doc, 1);
     419          61 :         xmlNodeSetBase((xmlNodePtr) newdoc, (xmlChar *)doc->URL);
     420          61 :         prevSubstValue = xmlSubstituteEntitiesDefault(1);
     421          61 :         prevExtDtdValue = xmlLoadExtDtdDefaultValue;
     422          61 :         xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
     423             : 
     424          61 :         sheetp = xsltParseStylesheetDoc(newdoc);
     425          61 :         xmlSubstituteEntitiesDefault(prevSubstValue);
     426          61 :         xmlLoadExtDtdDefaultValue = prevExtDtdValue;
     427             : 
     428          61 :         if (!sheetp) {
     429           0 :                 xmlFreeDoc(newdoc);
     430           0 :                 RETURN_FALSE;
     431             :         }
     432             : 
     433          61 :         intern = Z_XSL_P(id);
     434             : 
     435          61 :         std_hnd = zend_get_std_object_handlers();
     436         122 :         ZVAL_STRING(&member, "cloneDocument");
     437          61 :         cloneDocu = std_hnd->read_property(id, &member, BP_VAR_IS, NULL, &rv);
     438          61 :         if (Z_TYPE_P(cloneDocu) != IS_NULL) {
     439           0 :                 convert_to_long(cloneDocu);
     440           0 :                 clone_docu = Z_LVAL_P(cloneDocu);
     441             :         }
     442          61 :         zval_ptr_dtor(&member);
     443          61 :         if (clone_docu == 0) {
     444             :                 /* check if the stylesheet is using xsl:key, if yes, we have to clone the document _always_ before a transformation */
     445          61 :                 nodep = xmlDocGetRootElement(sheetp->doc);
     446          61 :                 if (nodep && (nodep = nodep->children)) {
     447         270 :                         while (nodep) {
     448         149 :                                 if (nodep->type == XML_ELEMENT_NODE && xmlStrEqual(nodep->name, "key") && xmlStrEqual(nodep->ns->href, XSLT_NAMESPACE)) {
     449           1 :                                         intern->hasKeys = 1;
     450           1 :                                         break;
     451             :                                 }
     452         148 :                                 nodep = nodep->next;
     453             :                         }
     454             :                 }
     455             :         } else {
     456           0 :                 intern->hasKeys = clone_docu;
     457             :         }
     458             : 
     459          61 :         if ((oldsheetp = (xsltStylesheetPtr)intern->ptr)) {
     460             :                 /* free wrapper */
     461           0 :                 if (((xsltStylesheetPtr) intern->ptr)->_private != NULL) {
     462           0 :                         ((xsltStylesheetPtr) intern->ptr)->_private = NULL;
     463             :                 }
     464           0 :                 xsltFreeStylesheet((xsltStylesheetPtr) intern->ptr);
     465           0 :                 intern->ptr = NULL;
     466             :         }
     467             : 
     468          61 :         php_xsl_set_object(id, sheetp);
     469          61 :         RETVAL_TRUE;
     470             : }
     471             : /* }}} end xsl_xsltprocessor_import_stylesheet */
     472             : 
     473          47 : static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStylesheetPtr style, zval *docp) /* {{{ */
     474             : {
     475          47 :         xmlDocPtr newdocp = NULL;
     476          47 :         xmlDocPtr doc = NULL;
     477          47 :         xmlNodePtr node = NULL;
     478             :         xsltTransformContextPtr ctxt;
     479             :         php_libxml_node_object *object;
     480          47 :         char **params = NULL;
     481             :         int clone;
     482             :         zval *doXInclude, member, rv;
     483             :         zend_object_handlers *std_hnd;
     484             :         FILE *f;
     485          47 :         int secPrefsError = 0;
     486             :         int secPrefsValue;
     487          47 :         xsltSecurityPrefsPtr secPrefs = NULL;
     488             : 
     489          47 :         node = php_libxml_import_node(docp);
     490             : 
     491          47 :         if (node) {
     492          47 :                 doc = node->doc;
     493             :         }
     494          47 :         if (doc == NULL) {
     495           0 :                 php_error_docref(NULL, E_WARNING, "Invalid Document");
     496           0 :                 return NULL;
     497             :         }
     498             : 
     499          47 :         if (style == NULL) {
     500           0 :                 php_error_docref(NULL, E_WARNING, "No stylesheet associated to this object");
     501           0 :                 return NULL;
     502             :         }
     503             : 
     504          47 :         if (intern->profiling) {
     505           0 :                 if (php_check_open_basedir(intern->profiling)) {
     506           0 :                         f = NULL;
     507             :                 } else {
     508           0 :                         f = VCWD_FOPEN(intern->profiling, "w");
     509             :                 }
     510             :         } else {
     511          47 :                 f = NULL;
     512             :         }
     513             : 
     514          47 :         if (intern->parameter) {
     515          47 :                 params = php_xsl_xslt_make_params(intern->parameter, 0);
     516             :         }
     517             : 
     518          47 :         intern->doc = emalloc(sizeof(php_libxml_node_object));
     519          47 :         memset(intern->doc, 0, sizeof(php_libxml_node_object));
     520             : 
     521          47 :         if (intern->hasKeys == 1) {
     522           1 :                 doc = xmlCopyDoc(doc, 1);
     523             :         } else {
     524          46 :                 object = Z_LIBXML_NODE_P(docp);
     525          46 :                 intern->doc->document = object->document;
     526             :         }
     527             : 
     528          47 :         php_libxml_increment_doc_ref(intern->doc, doc);
     529             : 
     530          47 :         ctxt = xsltNewTransformContext(style, doc);
     531          47 :         ctxt->_private = (void *) intern;
     532             : 
     533          47 :         std_hnd = zend_get_std_object_handlers();
     534             : 
     535          94 :         ZVAL_STRING(&member, "doXInclude");
     536          47 :         doXInclude = std_hnd->read_property(id, &member, BP_VAR_IS, NULL, &rv);
     537          47 :         if (Z_TYPE_P(doXInclude) != IS_NULL) {
     538           0 :                 convert_to_long(doXInclude);
     539           0 :                 ctxt->xinclude = Z_LVAL_P(doXInclude);
     540             :         }
     541          47 :         zval_ptr_dtor(&member);
     542             : 
     543          47 :         secPrefsValue = intern->securityPrefs;
     544             : 
     545             :         /* if securityPrefs is set to NONE, we don't have to do any checks, but otherwise... */
     546          47 :         if (secPrefsValue != XSL_SECPREF_NONE) {
     547          45 :                 secPrefs = xsltNewSecurityPrefs();
     548          45 :                 if (secPrefsValue & XSL_SECPREF_READ_FILE ) {
     549           0 :                         if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_READ_FILE, xsltSecurityForbid)) {
     550           0 :                                 secPrefsError = 1;
     551             :                         }
     552             :                 }
     553          45 :                 if (secPrefsValue & XSL_SECPREF_WRITE_FILE ) {
     554          45 :                         if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_WRITE_FILE, xsltSecurityForbid)) {
     555           0 :                                 secPrefsError = 1;
     556             :                         }
     557             :                 }
     558          45 :                 if (secPrefsValue & XSL_SECPREF_CREATE_DIRECTORY ) {
     559          45 :                         if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_CREATE_DIRECTORY, xsltSecurityForbid)) {
     560           0 :                                 secPrefsError = 1;
     561             :                         }
     562             :                 }
     563          45 :                 if (secPrefsValue & XSL_SECPREF_READ_NETWORK) {
     564           0 :                         if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_READ_NETWORK, xsltSecurityForbid)) {
     565           0 :                                 secPrefsError = 1;
     566             :                         }
     567             :                 }
     568          45 :                 if (secPrefsValue & XSL_SECPREF_WRITE_NETWORK) {
     569          45 :                         if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_WRITE_NETWORK, xsltSecurityForbid)) {
     570           0 :                                 secPrefsError = 1;
     571             :                         }
     572             :                 }
     573             : 
     574          45 :                 if (0 != xsltSetCtxtSecurityPrefs(secPrefs, ctxt)) {
     575           0 :                         secPrefsError = 1;
     576             :                 }
     577             :         }
     578             : 
     579          47 :         if (secPrefsError == 1) {
     580           0 :                 php_error_docref(NULL, E_WARNING, "Can't set libxslt security properties, not doing transformation for security reasons");
     581             :         } else {
     582          47 :                 newdocp = xsltApplyStylesheetUser(style, doc, (const char**) params,  NULL, f, ctxt);
     583             :         }
     584          46 :         if (f) {
     585           0 :                 fclose(f);
     586             :         }
     587             : 
     588          46 :         xsltFreeTransformContext(ctxt);
     589          46 :         if (secPrefs) {
     590          44 :                 xsltFreeSecurityPrefs(secPrefs);
     591             :         }
     592             : 
     593          46 :         if (intern->node_list != NULL) {
     594           1 :                 zend_hash_destroy(intern->node_list);
     595           1 :                 FREE_HASHTABLE(intern->node_list);
     596           1 :                 intern->node_list = NULL;
     597             :         }
     598             : 
     599          46 :         php_libxml_decrement_doc_ref(intern->doc);
     600          46 :         efree(intern->doc);
     601          46 :         intern->doc = NULL;
     602             : 
     603          46 :         if (params) {
     604          46 :                 clone = 0;
     605          98 :                 while(params[clone]) {
     606           6 :                         efree(params[clone++]);
     607             :                 }
     608          46 :                 efree(params);
     609             :         }
     610             : 
     611          46 :         return newdocp;
     612             : 
     613             : }
     614             : /* }}} */
     615             : 
     616             : /* {{{ proto domdocument xsl_xsltprocessor_transform_to_doc(domnode doc)
     617             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#
     618             : Since:
     619             : */
     620          18 : PHP_FUNCTION(xsl_xsltprocessor_transform_to_doc)
     621             : {
     622          18 :         zval *id, *docp = NULL;
     623             :         xmlDoc *newdocp;
     624             :         xsltStylesheetPtr sheetp;
     625          18 :         zend_string *ret_class = NULL;
     626             :         xsl_object *intern;
     627             : 
     628          18 :         id = getThis();
     629          18 :         intern = Z_XSL_P(id);
     630          18 :         sheetp = (xsltStylesheetPtr) intern->ptr;
     631             : 
     632          18 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|S!", &docp, &ret_class) == FAILURE) {
     633           5 :                 RETURN_FALSE;
     634             :         }
     635             : 
     636          13 :         newdocp = php_xsl_apply_stylesheet(id, intern, sheetp, docp);
     637             : 
     638          12 :         if (newdocp) {
     639          12 :                 if (ret_class) {
     640             :                         zend_string *curclass_name;
     641             :                         zend_class_entry *curce, *ce;
     642             :                         php_libxml_node_object *interndoc;
     643             : 
     644           0 :                         curce = Z_OBJCE_P(docp);
     645           0 :                         curclass_name = curce->name;
     646           0 :                         while (curce->parent != NULL) {
     647           0 :                                 curce = curce->parent;
     648             :                         }
     649             : 
     650           0 :                         ce = zend_lookup_class(ret_class);
     651           0 :                         if (ce == NULL || !instanceof_function(ce, curce)) {
     652           0 :                                 xmlFreeDoc(newdocp);
     653           0 :                                 php_error_docref(NULL, E_WARNING,
     654           0 :                                         "Expecting class compatible with %s, '%s' given", curclass_name->val, ret_class->val);
     655           0 :                                 RETURN_FALSE;
     656             :                         }
     657             : 
     658           0 :                         object_init_ex(return_value, ce);
     659             : 
     660           0 :                         interndoc = Z_LIBXML_NODE_P(return_value);
     661           0 :                         php_libxml_increment_doc_ref(interndoc, newdocp);
     662           0 :                         php_libxml_increment_node_ptr(interndoc, (xmlNodePtr)newdocp, (void *)interndoc);
     663             :                 } else {
     664          12 :                         php_dom_create_object((xmlNodePtr) newdocp, return_value, NULL);
     665             :                 }
     666             :         } else {
     667           0 :                 RETURN_FALSE;
     668             :         }
     669             : 
     670             : }
     671             : /* }}} end xsl_xsltprocessor_transform_to_doc */
     672             : 
     673             : /* {{{ proto int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri)
     674             : */
     675           7 : PHP_FUNCTION(xsl_xsltprocessor_transform_to_uri)
     676             : {
     677           7 :         zval *id, *docp = NULL;
     678             :         xmlDoc *newdocp;
     679             :         xsltStylesheetPtr sheetp;
     680             :         int ret;
     681             :         size_t uri_len;
     682             :         char *uri;
     683             :         xsl_object *intern;
     684             : 
     685           7 :         id = getThis();
     686           7 :         intern = Z_XSL_P(id);
     687           7 :         sheetp = (xsltStylesheetPtr) intern->ptr;
     688             : 
     689           7 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "op", &docp, &uri, &uri_len) == FAILURE) {
     690           5 :                 RETURN_FALSE;
     691             :         }
     692             : 
     693           2 :         newdocp = php_xsl_apply_stylesheet(id, intern, sheetp, docp);
     694             : 
     695           2 :         ret = -1;
     696           2 :         if (newdocp) {
     697           2 :                 ret = xsltSaveResultToFilename(uri, newdocp, sheetp, 0);
     698           2 :                 xmlFreeDoc(newdocp);
     699             :         }
     700             : 
     701           2 :         RETVAL_LONG(ret);
     702             : }
     703             : /* }}} end xsl_xsltprocessor_transform_to_uri */
     704             : 
     705             : /* {{{ proto string xsl_xsltprocessor_transform_to_xml(domdocument doc)
     706             : */
     707          37 : PHP_FUNCTION(xsl_xsltprocessor_transform_to_xml)
     708             : {
     709          37 :         zval *id, *docp = NULL;
     710             :         xmlDoc *newdocp;
     711             :         xsltStylesheetPtr sheetp;
     712             :         int ret;
     713             :         xmlChar *doc_txt_ptr;
     714             :         int doc_txt_len;
     715             :         xsl_object *intern;
     716             : 
     717          37 :         id = getThis();
     718          37 :         intern = Z_XSL_P(id);
     719          37 :         sheetp = (xsltStylesheetPtr) intern->ptr;
     720             : 
     721          37 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &docp) == FAILURE) {
     722           5 :                 RETURN_FALSE;
     723             :         }
     724             : 
     725          32 :         newdocp = php_xsl_apply_stylesheet(id, intern, sheetp, docp);
     726             : 
     727          32 :         ret = -1;
     728          32 :         if (newdocp) {
     729          28 :                 ret = xsltSaveResultToString(&doc_txt_ptr, &doc_txt_len, newdocp, sheetp);
     730          28 :                 if (doc_txt_ptr && doc_txt_len) {
     731          44 :                         RETVAL_STRINGL(doc_txt_ptr, doc_txt_len);
     732          22 :                         xmlFree(doc_txt_ptr);
     733             :                 }
     734          28 :                 xmlFreeDoc(newdocp);
     735             :         }
     736             : 
     737          32 :         if (ret < 0) {
     738           4 :                 RETURN_FALSE;
     739             :         }
     740             : }
     741             : /* }}} end xsl_xsltprocessor_transform_to_xml */
     742             : 
     743             : /* {{{ proto bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value])
     744             : */
     745           7 : PHP_FUNCTION(xsl_xsltprocessor_set_parameter)
     746             : {
     747             : 
     748             :         zval *id;
     749             :         zval *array_value, *entry, new_string;
     750             :         xsl_object *intern;
     751             :         zend_ulong idx;
     752             :         char *namespace;
     753             :         size_t namespace_len;
     754             :         zend_string *string_key, *name, *value;
     755           7 :         DOM_GET_THIS(id);
     756             : 
     757           7 :         if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "sa", &namespace, &namespace_len, &array_value) == SUCCESS) {
     758           2 :                 intern = Z_XSL_P(id);
     759           7 :                 ZEND_HASH_FOREACH_KEY_VAL(Z_ARRVAL_P(array_value), idx, string_key, entry) {
     760           3 :                         if (string_key == NULL) {
     761           1 :                                 php_error_docref(NULL, E_WARNING, "Invalid parameter array");
     762           1 :                                 RETURN_FALSE;
     763             :                         }
     764           6 :                         SEPARATE_ZVAL(entry);
     765           2 :                         convert_to_string_ex(entry);
     766           2 :                         if (Z_REFCOUNTED_P(entry)) {
     767             :                                 Z_ADDREF_P(entry);
     768             :                         }
     769           2 :                         zend_hash_update(intern->parameter, string_key, entry);
     770             :                 } ZEND_HASH_FOREACH_END();
     771           1 :                 RETURN_TRUE;
     772           5 :         } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "sSS", &namespace, &namespace_len, &name, &value) == SUCCESS) {
     773             : 
     774           5 :                 intern = Z_XSL_P(id);
     775             : 
     776           5 :                 ZVAL_STR_COPY(&new_string, value);
     777             : 
     778           5 :                 zend_hash_update(intern->parameter, name, &new_string);
     779           5 :                 RETURN_TRUE;
     780             :         } else {
     781           0 :                 WRONG_PARAM_COUNT;
     782             :         }
     783             : 
     784             : }
     785             : /* }}} end xsl_xsltprocessor_set_parameter */
     786             : 
     787             : /* {{{ proto string xsl_xsltprocessor_get_parameter(string namespace, string name)
     788             : */
     789           6 : PHP_FUNCTION(xsl_xsltprocessor_get_parameter)
     790             : {
     791             :         zval *id;
     792             :         char *namespace;
     793           6 :         size_t namespace_len = 0;
     794             :         zval *value;
     795             :         zend_string *name;
     796             :         xsl_object *intern;
     797             : 
     798           6 :         DOM_GET_THIS(id);
     799             : 
     800           6 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) {
     801           3 :                 RETURN_FALSE;
     802             :         }
     803           3 :         intern = Z_XSL_P(id);
     804           3 :         if ((value = zend_hash_find(intern->parameter, name)) != NULL) {
     805           1 :                 convert_to_string_ex(value);
     806           1 :                 RETURN_STR_COPY(Z_STR_P(value));
     807             :         } else {
     808           2 :                 RETURN_FALSE;
     809             :         }
     810             : }
     811             : /* }}} end xsl_xsltprocessor_get_parameter */
     812             : 
     813             : /* {{{ proto bool xsl_xsltprocessor_remove_parameter(string namespace, string name)
     814             : */
     815           5 : PHP_FUNCTION(xsl_xsltprocessor_remove_parameter)
     816             : {
     817             :         zval *id;
     818           5 :         size_t namespace_len = 0;
     819             :         char *namespace;
     820             :         zend_string *name;
     821             :         xsl_object *intern;
     822             : 
     823           5 :         DOM_GET_THIS(id);
     824             : 
     825           5 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "sS", &namespace, &namespace_len, &name) == FAILURE) {
     826           3 :                 RETURN_FALSE;
     827             :         }
     828           2 :         intern = Z_XSL_P(id);
     829           2 :         if (zend_hash_del(intern->parameter, name) == SUCCESS) {
     830           1 :                 RETURN_TRUE;
     831             :         } else {
     832           1 :                 RETURN_FALSE;
     833             :         }
     834             : }
     835             : /* }}} end xsl_xsltprocessor_remove_parameter */
     836             : 
     837             : /* {{{ proto void xsl_xsltprocessor_register_php_functions([mixed $restrict])
     838             : */
     839          44 : PHP_FUNCTION(xsl_xsltprocessor_register_php_functions)
     840             : {
     841             :         zval *id;
     842             :         xsl_object *intern;
     843             :         zval *array_value, *entry, new_string;
     844             :         zend_string *name;
     845             : 
     846          44 :         DOM_GET_THIS(id);
     847             : 
     848          44 :         if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "a",  &array_value) == SUCCESS) {
     849          15 :                 intern = Z_XSL_P(id);
     850             : 
     851          45 :                 ZEND_HASH_FOREACH_VAL(Z_ARRVAL_P(array_value), entry) {
     852          45 :                         SEPARATE_ZVAL(entry);
     853          15 :                         convert_to_string_ex(entry);
     854          15 :                         ZVAL_LONG(&new_string ,1);
     855          15 :                         zend_hash_update(intern->registered_phpfunctions, Z_STR_P(entry), &new_string);
     856             :                 } ZEND_HASH_FOREACH_END();
     857             : 
     858          15 :                 intern->registerPhpFunctions = 2;
     859          29 :         } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "S",  &name) == SUCCESS) {
     860           6 :                 intern = Z_XSL_P(id);
     861             : 
     862           6 :                 ZVAL_LONG(&new_string,1);
     863           6 :                 zend_hash_update(intern->registered_phpfunctions, name, &new_string);
     864           6 :                 intern->registerPhpFunctions = 2;
     865             : 
     866             :         } else {
     867          23 :                 intern = Z_XSL_P(id);
     868          23 :                 intern->registerPhpFunctions = 1;
     869             :         }
     870             : 
     871             : }
     872             : /* }}} end xsl_xsltprocessor_register_php_functions(); */
     873             : 
     874             : /* {{{ proto bool xsl_xsltprocessor_set_profiling(string filename) */
     875           0 : PHP_FUNCTION(xsl_xsltprocessor_set_profiling)
     876             : {
     877             :         zval *id;
     878             :         xsl_object *intern;
     879           0 :         char *filename = NULL;
     880             :         size_t filename_len;
     881           0 :         DOM_GET_THIS(id);
     882             : 
     883           0 :         if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "p!", &filename, &filename_len) == SUCCESS) {
     884           0 :                 intern = Z_XSL_P(id);
     885           0 :                 if (intern->profiling) {
     886           0 :                         efree(intern->profiling);
     887             :                 }
     888           0 :                 if (filename != NULL) {
     889           0 :                         intern->profiling = estrndup(filename, filename_len);
     890             :                 } else {
     891           0 :                         intern->profiling = NULL;
     892             :                 }
     893           0 :                 RETURN_TRUE;
     894             :         } else {
     895           0 :                 WRONG_PARAM_COUNT;
     896             :         }
     897             : }
     898             : /* }}} end xsl_xsltprocessor_set_profiling */
     899             : 
     900             : /* {{{ proto long xsl_xsltprocessor_set_security_prefs(long securityPrefs) */
     901           4 : PHP_FUNCTION(xsl_xsltprocessor_set_security_prefs)
     902             : {
     903             :         zval *id;
     904             :         xsl_object *intern;
     905             :         zend_long securityPrefs, oldSecurityPrefs;
     906             : 
     907           4 :         DOM_GET_THIS(id);
     908           4 :         if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &securityPrefs) == FAILURE) {
     909           0 :                 return;
     910             :         }
     911           4 :         intern = Z_XSL_P(id);
     912           4 :         oldSecurityPrefs = intern->securityPrefs;
     913           4 :         intern->securityPrefs = securityPrefs;
     914             :         /* set this to 1 so that we know, it was set through this method. Can be removed, when we remove the ini setting */
     915           4 :         intern->securityPrefsSet = 1;
     916           4 :         RETURN_LONG(oldSecurityPrefs);
     917             : }
     918             : /* }}} end xsl_xsltprocessor_set_security_prefs */
     919             : 
     920             : /* {{{ proto long xsl_xsltprocessor_get_security_prefs() */
     921           0 : PHP_FUNCTION(xsl_xsltprocessor_get_security_prefs)
     922             : {
     923             :         zval *id;
     924             :         xsl_object *intern;
     925             : 
     926           0 :         DOM_GET_THIS(id);
     927           0 :         if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), "") == SUCCESS) {
     928           0 :                 intern = Z_XSL_P(id);
     929           0 :                 RETURN_LONG(intern->securityPrefs);
     930             :         } else {
     931           0 :                 WRONG_PARAM_COUNT;
     932             :         }
     933             : }
     934             : /* }}} end xsl_xsltprocessor_get_security_prefs */
     935             : 
     936             : /* {{{ proto bool xsl_xsltprocessor_has_exslt_support()
     937             : */
     938           3 : PHP_FUNCTION(xsl_xsltprocessor_has_exslt_support)
     939             : {
     940             : #if HAVE_XSL_EXSLT
     941           3 :         RETURN_TRUE;
     942             : #else
     943             :         RETURN_FALSE;
     944             : #endif
     945             : }
     946             : /* }}} end xsl_xsltprocessor_has_exslt_support(); */
     947             : 
     948             : /*
     949             :  * Local variables:
     950             :  * tab-width: 4
     951             :  * c-basic-offset: 4
     952             :  * End:
     953             :  * vim600: sw=4 ts=4 fdm=marker
     954             :  * vim<600: sw=4 ts=4
     955             :  */

Generated by: LCOV version 1.10

Generated at Tue, 04 Aug 2015 09:11:15 +0000 (8 hours ago)

Copyright © 2005-2015 The PHP Group
All rights reserved.