]> matita.cs.unibo.it Git - helm.git/blob - helm/software/DEVEL/gdome_xslt/C/gdome_xslt/gdome_xslt.h
Grave bug fixed: Ce that point to definitions were handled as those that point
[helm.git] / helm / software / DEVEL / gdome_xslt / C / gdome_xslt / gdome_xslt.h
1
2 /* This file implements a XSLT engine working on Gdome documents. In fact,
3  * it just maps Gdome documents to libxml documents back and forth, and
4  * applies the transformation on libxml documents using libxlt.
5  * 
6  * The code is largely based on the code of T.J. Mather's XML::GDOME::XSLT
7  * Perl module (http://kobesearch.cpan.org/search?dist=XML-GDOME-XSLT)
8  *
9  * Copyright (C) 2002:
10  *      Claudio Sacerdoti Coen          <sacerdot@cs.unibo.it>
11  *      Stefano Zacchiroli              <zack@cs.unibo.it>
12  * 
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2.1 of the License, or (at your option) any later version.
17  * 
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  * 
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the Free Software
25  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26  *
27  * For more information, please send an email to {sacerdot,zack}@cs.unibo.it
28  */
29
30 #ifndef __gdome_xslt_h__
31 #define __gdome_xslt_h__
32
33 #include <gdome.h>
34 #include <libxslt/xsltconfig.h>
35 #include <libxslt/xslt.h>
36 #include <libxslt/xsltutils.h>
37 #include <libxslt/transform.h>
38 #include <libxslt/imports.h>
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif /* __cplusplus */
43
44         /******************************/
45         /* XSLT stylesheet Processing */
46         /******************************/
47
48 xsltStylesheetPtr       processStylesheet       (GdomeDocument* style);
49
50
51         /*******************************/
52         /* XSLT stylesheet Application */
53         /*******************************/
54
55 GdomeDocument*          applyStylesheet         (GdomeDocument* source,
56                                                  xsltStylesheetPtr style_libxslt,
57                                                  const char** params);
58
59         /******************/
60         /* Results Output */
61         /******************/
62
63 int                     saveResultToFilename    (const char* name,
64                                                  GdomeDocument* result,
65                                                  xsltStylesheetPtr style_libxslt,
66                                                  int compression);
67 int                     saveResultToFile        (FILE* file,
68                                                  GdomeDocument* result,
69                                                  xsltStylesheetPtr style_libxslt);
70 int                     saveResultToFd          (int fd,
71                                                  GdomeDocument* result,
72                                                  xsltStylesheetPtr style_libxslt);
73
74         /**********************************************/
75         /* Error and Debugging Callbacks Registration */
76         /**********************************************/
77
78 typedef                 void(*gdomeXsltMsgCallback)(const char *);
79
80 void                    setErrorCallback        (gdomeXsltMsgCallback callback);
81 void                    setDebugCallback        (gdomeXsltMsgCallback callback);
82
83 #ifdef __cplusplus
84 }
85 #endif /* __cplusplus */
86
87 #endif /* __gdome_xslt_h__ */