From: Stefano Zacchiroli Date: Thu, 13 Mar 2003 15:46:34 +0000 (+0000) Subject: reindented and recommented kindly X-Git-Tag: before_refactoring~122 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d2ef4a0e438ed6acee836b3786e377b133c098af;p=helm.git reindented and recommented kindly --- diff --git a/helm/DEVEL/gdome_xslt/C/gdome_xslt/gdome_xslt.c b/helm/DEVEL/gdome_xslt/C/gdome_xslt/gdome_xslt.c index 3c5dc42e2..87d3d4324 100644 --- a/helm/DEVEL/gdome_xslt/C/gdome_xslt/gdome_xslt.c +++ b/helm/DEVEL/gdome_xslt/C/gdome_xslt/gdome_xslt.c @@ -64,6 +64,10 @@ GdomeDocument* gdome_of_libxml(xmlDocPtr n) // From now on no Gdome internal should be used directly. + /******************************/ + /* XSLT stylesheet Processing */ + /******************************/ + xsltStylesheetPtr processStylesheet(GdomeDocument* style) { xmlDocPtr style_copy; @@ -81,7 +85,12 @@ xsltStylesheetPtr processStylesheet(GdomeDocument* style) return xsltParseStylesheetDoc(style_copy); } -GdomeDocument* applyStylesheet(GdomeDocument* source, xsltStylesheetPtr style_libxslt, const char** params) + /*******************************/ + /* XSLT stylesheet Application */ + /*******************************/ + +GdomeDocument* applyStylesheet(GdomeDocument* source, xsltStylesheetPtr + style_libxslt, const char** params) { xmlDocPtr source_libxml; xmlDocPtr output_libxml; @@ -91,21 +100,20 @@ GdomeDocument* applyStylesheet(GdomeDocument* source, xsltStylesheetPtr style_li xsltSetGenericDebugFunc(NULL, NULL); - output_libxml = xsltApplyStylesheet(style_libxslt, - source_libxml, - params); + output_libxml = xsltApplyStylesheet(style_libxslt, source_libxml, + params); if (output_libxml == NULL) return NULL; return gdome_of_libxml(output_libxml); } -/***************** serialization functions *****************/ + /******************/ + /* Results Output */ + /******************/ -int saveResultToFilename (const char* name, - GdomeDocument* result, - xsltStylesheetPtr style_libxslt, - int compression) +int saveResultToFilename (const char* name, GdomeDocument* result, + xsltStylesheetPtr style_libxslt, int compression) { xmlDocPtr result_libxml; @@ -114,15 +122,12 @@ int saveResultToFilename (const char* name, xsltSetGenericDebugFunc(NULL, NULL); - return xsltSaveResultToFilename(name, - result_libxml, - style_libxslt, - compression); + return xsltSaveResultToFilename(name, result_libxml, + style_libxslt, compression); } -int saveResultToFile (FILE* file, - GdomeDocument* result, - xsltStylesheetPtr style_libxslt) +int saveResultToFile (FILE* file, GdomeDocument* result, + xsltStylesheetPtr style_libxslt) { xmlDocPtr result_libxml; @@ -131,14 +136,11 @@ int saveResultToFile (FILE* file, xsltSetGenericDebugFunc(NULL, NULL); - return xsltSaveResultToFile(file, - result_libxml, - style_libxslt); + return xsltSaveResultToFile(file, result_libxml, style_libxslt); } -int saveResultToFd (int fd, - GdomeDocument* result, - xsltStylesheetPtr style_libxslt) +int saveResultToFd (int fd, GdomeDocument* result, xsltStylesheetPtr + style_libxslt) { xmlDocPtr result_libxml; @@ -147,8 +149,6 @@ int saveResultToFd (int fd, xsltSetGenericDebugFunc(NULL, NULL); - return xsltSaveResultToFd(fd, - result_libxml, - style_libxslt); + return xsltSaveResultToFd(fd, result_libxml, style_libxslt); }