From ed366baabab4a0e0b6eff2b1f5c2a198d30594a6 Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Sun, 2 May 2004 19:48:18 +0000 Subject: [PATCH] enhanced normalization of comp steps when an imported stylesheet has it's * libxslt/imports.c: enhanced normalization of comp steps when an imported stylesheet has it's own imports (bug 141279) --- ChangeLog | 6 ++++++ libxslt/imports.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d949ddd..75a2127 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun May 2 12:47:32 PDT 2004 William Brack + + * libxslt/imports.c: enhanced normalization of comp steps + when an imported stylesheet has it's own imports + (bug 141279) + Sat May 1 10:35:03 PDT 2004 William Brack * libxslt/transform.c: added code to recognize diff --git a/libxslt/imports.c b/libxslt/imports.c index 9bc9a3e..85b62cf 100644 --- a/libxslt/imports.c +++ b/libxslt/imports.c @@ -52,6 +52,14 @@ * Module interfaces * * * ************************************************************************/ +static void xsltFixImportedCompSteps(xsltStylesheetPtr master, + xsltStylesheetPtr style) { + xsltStylesheetPtr res; + for (res = style; res != NULL; res = res->imports) + xmlHashScan(res->templatesHash, + (xmlHashScanner) xsltNormalizeCompSteps, master); + master->extrasNr += style->extrasNr; +} /** * xsltParseStylesheetImport: @@ -134,9 +142,7 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) { if (res != NULL) { res->next = style->imports; style->imports = res; - xmlHashScan(res->templatesHash, - (xmlHashScanner) xsltNormalizeCompSteps, style); - style->extrasNr += res->extrasNr; + xsltFixImportedCompSteps(style, res); ret = 0; } else { xmlFreeDoc(import); -- 2.7.4