Selaa lähdekoodia

Merge pull request #10657 from afishbeck/libxsltVersion127check

HPCC-18751 Fix CentOS 6 build break due to older version of libxslt

Reviewed-By: Michael Gardner <michael.gardner@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 vuotta sitten
vanhempi
commit
a855af503d
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      system/xmllib/libxslt_processor.cpp

+ 3 - 0
system/xmllib/libxslt_processor.cpp

@@ -532,6 +532,8 @@ int CLibXslTransform::transform(xmlChar **xmlbuff, int &len)
     if (!ctxt)
         throw MakeStringException(XSLERR_CouldNotCreateTransform, "Failed creating libxslt Transform Context");
     ctxt->_private = this;
+
+#if LIBXSLT_VERSION >= 10127  //the context variables maxTemplateDepth and maxTemplateVars were added in libxslt version 1.1.27
     if (xslConfig)
     {
         ctxt->maxTemplateDepth = xslConfig->getPropInt("xsltMaxDepth", 100000);
@@ -542,6 +544,7 @@ int CLibXslTransform::transform(xmlChar **xmlbuff, int &len)
         ctxt->maxTemplateDepth = 100000; //we use some very highly nested stylesheets
         ctxt->maxTemplateVars = 1000000;
     }
+#endif
 
     HashIterator h(functions);
     ForEach (h)