--- libxslt-1.1.19/libxslt/imports.c 2006-05-31 16:20:12.000000000 +0200 +++ libxslt-1.1.19.bench/libxslt/imports.c 2007-04-27 14:05:38.000000000 +0200 @@ -92,10 +92,12 @@ xmlChar *URI = NULL; xsltStylesheetPtr res; xsltSecurityPrefsPtr sec; - + FILE *profile; + if ((cur == NULL) || (style == NULL)) return (ret); - + profile = fopen("/tmp/xsltbench.txt","a"); + uriRef = xmlGetNsProp(cur, (const xmlChar *)"href", NULL); if (uriRef == NULL) { xsltTransformError(NULL, style, cur, @@ -105,7 +107,9 @@ base = xmlNodeGetBase(style->doc, cur); URI = xmlBuildURI(uriRef, base); - if (URI == NULL) { + fprintf(profile,"startimport: %s: %d\n", URI,xsltTimestamp()); + + if (URI == NULL) { xsltTransformError(NULL, style, cur, "xsl:import : invalid URI reference %s\n", uriRef); goto error; @@ -138,7 +142,6 @@ goto error; } } - import = xsltDocDefaultLoader(URI, style->dict, XSLT_PARSE_OPTIONS, (void *) style, XSLT_LOAD_STYLESHEET); if (import == NULL) { @@ -146,8 +149,11 @@ "xsl:import : unable to load %s\n", URI); goto error; } +fprintf(profile,"loaddoc: %s:: %d\n", URI,xsltTimestamp()); +fclose(profile); +res = xsltParseStylesheetImportedDoc(import, style); + profile = fopen("/tmp/xsltbench.txt","a"); - res = xsltParseStylesheetImportedDoc(import, style); if (res != NULL) { res->next = style->imports; style->imports = res; @@ -158,7 +164,9 @@ } else { xmlFreeDoc(import); } - + + fprintf(profile,"endimport: %s::: %d\n", URI,xsltTimestamp()); + error: if (uriRef != NULL) xmlFree(uriRef); @@ -167,6 +175,7 @@ if (URI != NULL) xmlFree(URI); + fclose(profile); return (ret); }