summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--libxslt/functions.c10
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index bb3ed28c..e4e52f27 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jan 14 18:45:08 PST 2007 William Brack <wbrack@mmm.com.hk>
+
+ * libxslt/functions.c: fixed two problems related to checking
+ of fragments, related to python htmlCtxtReadFile problem
+ reported on mailing list by Nic Ferrier.
+
Fri Jan 12 23:24:08 PST 2007 William Brack <wbrack@mmm.com.hk>
* libxslt/extensions.c: reverted last change, fixed some
diff --git a/libxslt/functions.c b/libxslt/functions.c
index 9e120a94..7ae24999 100644
--- a/libxslt/functions.c
+++ b/libxslt/functions.c
@@ -133,10 +133,11 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
*/
fragment = (xmlChar *)uri->fragment;
if (fragment != NULL) {
+ xmlChar *newURI;
uri->fragment = NULL;
- URI = xmlSaveUri(uri);
- idoc = xsltLoadDocument(tctxt, URI);
- xmlFree(URI);
+ newURI = xmlSaveUri(uri);
+ idoc = xsltLoadDocument(tctxt, newURI);
+ xmlFree(newURI);
} else
idoc = xsltLoadDocument(tctxt, URI);
xmlFreeURI(uri);
@@ -144,7 +145,8 @@ xsltDocumentFunctionLoadDocument(xmlXPathParserContextPtr ctxt, xmlChar* URI)
if (idoc == NULL) {
if ((URI == NULL) ||
(URI[0] == '#') ||
- (xmlStrEqual(tctxt->style->doc->URL, URI)))
+ ((tctxt->style->doc != NULL) &&
+ (xmlStrEqual(tctxt->style->doc->URL, URI))))
{
/*
* This selects the stylesheet's doc itself.