2 * Summary: interface for the document handling
3 * Description: implements document loading and cache (multiple
4 * document() reference for the same resources must
7 * Copy: See Copyright for the status of this software.
9 * Author: Daniel Veillard
12 #ifndef __XML_XSLT_DOCUMENTS_H__
13 #define __XML_XSLT_DOCUMENTS_H__
15 #include <libxml/tree.h>
16 #include "xsltexports.h"
17 #include "xsltInternals.h"
23 XSLTPUBFUN xsltDocumentPtr XSLTCALL
24 xsltNewDocument (xsltTransformContextPtr ctxt
,
26 XSLTPUBFUN xsltDocumentPtr XSLTCALL
27 xsltLoadDocument (xsltTransformContextPtr ctxt
,
29 XSLTPUBFUN xsltDocumentPtr XSLTCALL
30 xsltFindDocument (xsltTransformContextPtr ctxt
,
32 XSLTPUBFUN
void XSLTCALL
33 xsltFreeDocuments (xsltTransformContextPtr ctxt
);
35 XSLTPUBFUN xsltDocumentPtr XSLTCALL
36 xsltLoadStyleDocument (xsltStylesheetPtr style
,
38 XSLTPUBFUN xsltDocumentPtr XSLTCALL
39 xsltNewStyleDocument (xsltStylesheetPtr style
,
41 XSLTPUBFUN
void XSLTCALL
42 xsltFreeStyleDocuments (xsltStylesheetPtr style
);
45 * Hooks for document loading
51 * Enum defining the kind of loader requirement.
54 XSLT_LOAD_START
= 0, /* loading for a top stylesheet */
55 XSLT_LOAD_STYLESHEET
= 1, /* loading for a stylesheet include/import */
56 XSLT_LOAD_DOCUMENT
= 2 /* loading document at transformation time */
61 * @URI: the URI of the document to load
62 * @dict: the dictionary to use when parsing that document
63 * @options: parsing options, a set of xmlParserOption
64 * @ctxt: the context, either a stylesheet or a transformation context
65 * @type: the xsltLoadType indicating the kind of loading required
67 * An xsltDocLoaderFunc is a signature for a function which can be
68 * registered to load document not provided by the compilation or
69 * transformation API themselve, for example when an xsl:import,
70 * xsl:include is found at compilation time or when a document()
71 * call is made at runtime.
73 * Returns the pointer to the document (which will be modified and
74 * freed by the engine later), or NULL in case of error.
76 typedef xmlDocPtr (*xsltDocLoaderFunc
) (const xmlChar
*URI
,
82 XSLTPUBFUN
void XSLTCALL
83 xsltSetLoaderFunc (xsltDocLoaderFunc f
);
85 /* the loader may be needed by extension libraries so it is exported */
86 XSLTPUBVAR xsltDocLoaderFunc xsltDocDefaultLoader
;
92 #endif /* __XML_XSLT_DOCUMENTS_H__ */