Permalink
Browse files

closed bugs #59212 and #59220 Daniel

* libxslt/functions.h libxslt/preproc.c libxslt/transform.c:
  closed bugs #59212 and #59220
Daniel
  • Loading branch information...
1 parent 0da1279 commit e67a38803895dfe8b8ca4cb69196e6fe1b8a3fc0 Daniel Veillard committed Aug 23, 2001
Showing with 22 additions and 5 deletions.
  1. +5 −0 ChangeLog
  2. +1 −1 libxslt/functions.h
  3. +1 −3 libxslt/preproc.c
  4. +15 −1 libxslt/transform.c
View
@@ -1,3 +1,8 @@
+Fri Aug 24 01:15:24 CEST 2001 Daniel Veillard <daniel@veillard.com>
+
+ * libxslt/functions.h libxslt/preproc.c libxslt/transform.c:
+ closed bugs #59212 and #59220
+
Thu Aug 23 23:18:44 CEST 2001 Daniel Veillard <daniel@veillard.com>
* config.h.in configure.in xsltproc/xsltproc.c: complete test
View
@@ -25,7 +25,7 @@ extern "C" {
*/
#define XSLT_REGISTER_FUNCTION_LOOKUP(ctxt) \
xmlXPathRegisterFuncLookup((ctxt)->xpathCtxt, \
- (void *) xsltXPathFunctionLookup, \
+ (xmlXPathFuncLookupFunc) xsltXPathFunctionLookup, \
(void *)(ctxt->xpathCtxt));
xmlXPathFunction
View
@@ -223,9 +223,7 @@ xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst,
xsltGenericDebug(xsltGenericDebugContext,
"Found xalan:write extension\n");
#endif
- filename = xsltEvalStaticAttrValueTemplate(style, inst,
- (const xmlChar *)"select",
- XSLT_XALAN_NAMESPACE, &comp->has_filename);
+ comp->ver11 = 0; /* the filename need to be interpreted */
} else if (xmlStrEqual(inst->name, (const xmlChar *) "document")) {
filename = xsltEvalStaticAttrValueTemplate(style, inst,
(const xmlChar *)"href",
View
@@ -1369,6 +1369,19 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
(const xmlChar *)
"select",
XSLT_XALAN_NAMESPACE);
+ if (URL != NULL) {
+ xmlXPathCompExprPtr cmp;
+ xmlChar *val;
+
+ /*
+ * Trying to handle bug #59212
+ */
+ cmp = xmlXPathCompile(URL);
+ val = xsltEvalXPathString(ctxt, cmp);
+ xmlXPathFreeCompExpr(cmp);
+ xmlFree(URL);
+ URL = val;
+ }
if (URL == NULL)
URL = xsltEvalAttrValueTemplate(ctxt, inst,
(const xmlChar *)
@@ -3239,7 +3252,8 @@ xsltApplyStylesheetInternal(xsltStylesheetPtr style, xmlDocPtr doc,
*/
ctxt->output = res;
ctxt->insert = (xmlNodePtr) res;
- ctxt->globalVars = xmlHashCreate(20);
+ if (ctxt->globalVars == NULL)
+ ctxt->globalVars = xmlHashCreate(20);
if (params != NULL)
xsltEvalUserParams(ctxt, params);
xsltInitCtxtExts(ctxt);

0 comments on commit e67a388

Please sign in to comment.