* libxslt/functions.c: fixed two problems related to checking
of fragments, related to python htmlCtxtReadFile problem
reported on mailing list by Nic Ferrier.
svn path=/trunk/; revision=1417
+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
*/
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);
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.