]> matita.cs.unibo.it Git - helm.git/commitdiff
reindented and recommented kindly
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 13 Mar 2003 15:46:34 +0000 (15:46 +0000)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 13 Mar 2003 15:46:34 +0000 (15:46 +0000)
helm/DEVEL/gdome_xslt/C/gdome_xslt/gdome_xslt.c

index 3c5dc42e2151670a5be31fa2211dc96d9e072b9f..87d3d4324ae85c1d2c159068a6af94b9896b9b3c 100644 (file)
@@ -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);
 }