1/*----------------------------------------------------------------------------
2|   Copyright (c) 2000 Jochen Loewer (loewerj@hotmail.com)
3|-----------------------------------------------------------------------------
4|
5|   $Id: domxslt.h,v 1.6 2004/08/14 14:42:27 rolf Exp $
6|
7|
8|   A (partial) XSLT implementation for tDOM, according to the W3C
9|   recommendation (16 Nov 1999,
10|   http://www.w3.org/TR/1999/REC-xslt-19991116).
11|
12|
13|   The contents of this file are subject to the Mozilla Public License
14|   Version 1.1 (the "License"); you may not use this file except in
15|   compliance with the License. You may obtain a copy of the License at
16|   http://www.mozilla.org/MPL/
17|
18|   Software distributed under the License is distributed on an "AS IS"
19|   basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
20|   License for the specific language governing rights and limitations
21|   under the License.
22|
23|   The Original Code is tDOM.
24|
25|   The Initial Developer of the Original Code is Jochen Loewer
26|   Portions created by Jochen Loewer are Copyright (C) 1998, 1999
27|   Jochen Loewer. All Rights Reserved.
28|
29|   Contributor(s):
30|
31|
32|   $Log: domxslt.h,v $
33|   Revision 1.6  2004/08/14 14:42:27  rolf
34|   Use 'Id' cvs keyword (instead of 'Header') in the file heads.
35|
36|   Revision 1.5  2003/01/11 00:19:02  rolf
37|   Added conversion of XSLT stylesheet DOM trees to 'cached' xslt cmds
38|   (new domDoc method toXSLTcmd). Works for non threaded tcl; needs
39|   additional work for multi-threaded tcl and documentation.
40|
41|   Revision 1.4  2002/12/27 23:40:10  rolf
42|   The xslt method now understands also the options
43|   -ignoreUndeclaredParameters and -xsltmessagecmd.
44|
45|   Revision 1.3  2002/06/02 06:36:24  zoran
46|   Added thread safety with capability of sharing DOM trees between
47|   threads and ability to read/write-lock DOM documents
48|
49|   Revision 1.2  2002/04/08 02:11:12  rolf
50|   Added -parameters option to domNode xslt method, to enable setting of
51|   top level parameters from tcl level.
52|
53|   Revision 1.1.1.1  2002/02/22 01:05:35  rolf
54|   tDOM0.7test with Jochens first set of patches
55|
56|   Revision 1.1  2002/02/04 08:08:19  jolo
57|   Initial revision
58|
59|
60|
61|   written by Jochen Loewer
62|   June, 2000
63|
64\---------------------------------------------------------------------------*/
65
66#ifndef __DOMXSLT_H__
67#define __DOMXSLT_H__
68
69#include <dom.h>
70#include <domxpath.h>
71
72
73typedef void (*xsltMsgCB) (void *clientData, char *str,
74                          int length, int terminate);
75
76/*----------------------------------------------------------------------------
77|   Prototypes
78|
79\---------------------------------------------------------------------------*/
80int xsltProcess (domDocument       * xsltDoc,
81                 domNode           * xmlNode,
82                 void              * xsltCmdData,
83                 char             ** parameters,
84                 int                 ignoreUndeclaredParameters,
85                 xpathFuncCallback   funcCB,
86                 void              * xpathFuncClientData,
87                 xsltMsgCB           xsltMsgCB,
88                 void              * xsltMsgClientData,
89                 char             ** errMsg,
90                 domDocument      ** resultDoc
91                );
92
93void * xsltCompileStylesheet (
94    domDocument       * xsltDoc,
95    xpathFuncCallback   funcCB,
96    void              * xpathFuncClientData,
97    int                 guardXSLTTree,
98    char             ** errMsg
99    );
100
101void xsltFreeStateWrapper (void *clientData);
102
103void sortByDocOrder (xpathResultSet *rs);
104
105#endif
106
107