libxml2 Reference Manual |
---|
xinclude - implementation of XInclude
API to handle XInclude processing, implements the World Wide Web Consortium Last Call Working Draft 10 November 2003
Author(s): Daniel Veillard
#define XINCLUDE_FALLBACK; #define XINCLUDE_HREF; #define XINCLUDE_NODE; #define XINCLUDE_NS; #define XINCLUDE_OLD_NS; #define XINCLUDE_PARSE; #define XINCLUDE_PARSE_ENCODING; #define XINCLUDE_PARSE_TEXT; #define XINCLUDE_PARSE_XML; #define XINCLUDE_PARSE_XPOINTER; typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt; typedef xmlXIncludeCtxt * xmlXIncludeCtxtPtr; void xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt); int xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt); xmlXIncludeCtxtPtr xmlXIncludeNewContext (xmlDocPtr doc); int xmlXIncludeProcess (xmlDocPtr doc); int xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags); int xmlXIncludeProcessFlagsData (xmlDocPtr doc,
int flags,
void * data); int xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr node); int xmlXIncludeProcessTree (xmlNodePtr tree); int xmlXIncludeProcessTreeFlags (xmlNodePtr tree,
int flags); int xmlXIncludeProcessTreeFlagsData (xmlNodePtr tree,
int flags,
void * data); void xmlXIncludeSetErrorHandler (xmlXIncludeCtxtPtr ctxt,
xmlStructuredErrorFunc handler,
void * data); int xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
int flags);
#define XINCLUDE_NS;
Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
#define XINCLUDE_OLD_NS;
Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
struct _xmlXIncludeCtxt { The content of this structure is not made public by the API. } xmlXIncludeCtxt;
xmlXIncludeCtxt * xmlXIncludeCtxtPtr;
void xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt)
Free an XInclude context
ctxt: | the XInclude context |
int xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt)
Available since 2.13.0.
ctxt: | an XInclude processing context |
Returns: | the last error code. |
xmlXIncludeCtxtPtr xmlXIncludeNewContext (xmlDocPtr doc)
Creates a new XInclude context
doc: | an XML Document |
Returns: | the new set |
int xmlXIncludeProcess (xmlDocPtr doc)
Implement the XInclude substitution on the XML document @doc
doc: | an XML document |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
int xmlXIncludeProcessFlags (xmlDocPtr doc,
int flags)
Implement the XInclude substitution on the XML document @doc
doc: | an XML document |
flags: | a set of xmlParserOption used for parsing XML includes |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
int xmlXIncludeProcessFlagsData (xmlDocPtr doc,
int flags,
void * data)
Implement the XInclude substitution on the XML document @doc
doc: | an XML document |
flags: | a set of xmlParserOption used for parsing XML includes |
data: | application data that will be passed to the parser context in the _private field of the parser context(s) |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
int xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
xmlNodePtr node)
Implement the XInclude substitution for the given subtree reusing the information and data coming from the given context.
ctxt: | an existing XInclude context |
node: | a node in an XML document |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
int xmlXIncludeProcessTree (xmlNodePtr tree)
Implement the XInclude substitution for the given subtree
tree: | a node in an XML document |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
int xmlXIncludeProcessTreeFlags (xmlNodePtr tree,
int flags)
Implement the XInclude substitution for the given subtree
tree: | a node in an XML document |
flags: | a set of xmlParserOption used for parsing XML includes |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
int xmlXIncludeProcessTreeFlagsData (xmlNodePtr tree,
int flags,
void * data)
Implement the XInclude substitution on the XML node @tree
tree: | an XML node |
flags: | a set of xmlParserOption used for parsing XML includes |
data: | application data that will be passed to the parser context in the _private field of the parser context(s) |
Returns: | 0 if no substitution were done, -1 if some processing failed or the number of substitutions done. |
void xmlXIncludeSetErrorHandler (xmlXIncludeCtxtPtr ctxt,
xmlStructuredErrorFunc handler,
void * data)
Register a callback function that will be called on errors and warnings. If handler is NULL, the error handler will be deactivated. Available since 2.13.0.
ctxt: | an XInclude processing context |
handler: | error handler |
data: | user data which will be passed to the handler |
int xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
int flags)
Set the flags used for further processing of XML resources.
ctxt: | an XInclude processing context |
flags: | a set of xmlParserOption used for parsing XML includes |
Returns: | 0 in case of success and -1 in case of error. |