1/*
2 * Summary: interface for the XSLT import support
3 * Description: macros and fuctions needed to implement and
4 *              access the import tree
5 *
6 * Copy: See Copyright for the status of this software.
7 *
8 * Author: Daniel Veillard
9 */
10
11#ifndef __XML_XSLT_IMPORTS_H__
12#define __XML_XSLT_IMPORTS_H__
13
14#include <libxml/tree.h>
15#include "xsltexports.h"
16#include "xsltInternals.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/**
23 * XSLT_GET_IMPORT_PTR:
24 *
25 * A macro to import pointers from the stylesheet cascading order.
26 */
27#define XSLT_GET_IMPORT_PTR(res, style, name) {			\
28    xsltStylesheetPtr st = style;				\
29    res = NULL;							\
30    while (st != NULL) {					\
31	if (st->name != NULL) { res = st->name; break; }	\
32	st = xsltNextImport(st);				\
33    }}
34
35/**
36 * XSLT_GET_IMPORT_INT:
37 *
38 * A macro to import intergers from the stylesheet cascading order.
39 */
40#define XSLT_GET_IMPORT_INT(res, style, name) {			\
41    xsltStylesheetPtr st = style;				\
42    res = -1;							\
43    while (st != NULL) {					\
44	if (st->name != -1) { res = st->name; break; }	\
45	st = xsltNextImport(st);				\
46    }}
47
48/*
49 * Module interfaces
50 */
51XSLTPUBFUN int XSLTCALL
52			xsltParseStylesheetImport(xsltStylesheetPtr style,
53						  xmlNodePtr cur);
54XSLTPUBFUN int XSLTCALL
55			xsltParseStylesheetInclude
56						 (xsltStylesheetPtr style,
57						  xmlNodePtr cur);
58XSLTPUBFUN xsltStylesheetPtr XSLTCALL
59			xsltNextImport		 (xsltStylesheetPtr style);
60XSLTPUBFUN int XSLTCALL
61			xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt);
62XSLTPUBFUN int XSLTCALL
63			xsltFindElemSpaceHandling(xsltTransformContextPtr ctxt,
64						  xmlNodePtr node);
65XSLTPUBFUN xsltTemplatePtr XSLTCALL
66			xsltFindTemplate	 (xsltTransformContextPtr ctxt,
67						  const xmlChar *name,
68						  const xmlChar *nameURI);
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif /* __XML_XSLT_IMPORTS_H__ */
75
76