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.
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)
10 * Claudio Sacerdoti Coen <sacerdot@cs.unibo.it>
11 * Stefano Zacchiroli <zack@cs.unibo.it>
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.
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.
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
27 * For more information, please send an email to {sacerdot,zack}@cs.unibo.it
30 #ifndef __gdome_xslt_h__
31 #define __gdome_xslt_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>
42 #endif /* __cplusplus */
44 /******************************/
45 /* XSLT stylesheet Processing */
46 /******************************/
48 xsltStylesheetPtr processStylesheet (GdomeDocument* style);
51 /*******************************/
52 /* XSLT stylesheet Application */
53 /*******************************/
55 GdomeDocument* applyStylesheet (GdomeDocument* source,
56 xsltStylesheetPtr style_libxslt,
63 int saveResultToFilename (const char* name,
64 GdomeDocument* result,
65 xsltStylesheetPtr style_libxslt,
67 int saveResultToFile (FILE* file,
68 GdomeDocument* result,
69 xsltStylesheetPtr style_libxslt);
70 int saveResultToFd (int fd,
71 GdomeDocument* result,
72 xsltStylesheetPtr style_libxslt);
74 /**********************************************/
75 /* Error and Debugging Callbacks Registration */
76 /**********************************************/
78 typedef void(*gdomeXsltMsgCallback)(const char *);
80 void setErrorCallback (gdomeXsltMsgCallback callback);
81 void setDebugCallback (gdomeXsltMsgCallback callback);
85 #endif /* __cplusplus */
87 #endif /* __gdome_xslt_h__ */