libxml2

Loading...
Searching...
No Matches
Macros | Typedefs | Functions
xinclude.h File Reference

Implementation of XInclude 1.0. More...

## Macros
#define | XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
| Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude.
#define | XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
| Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude.
#define | XINCLUDE_NODE (const xmlChar *) "include"
| Macro defining "include".
#define | XINCLUDE_FALLBACK (const xmlChar *) "fallback"
| Macro defining "fallback".
#define | XINCLUDE_HREF (const xmlChar *) "href"
| Macro defining "href".
#define | XINCLUDE_PARSE (const xmlChar *) "parse"
| Macro defining "parse".
#define | XINCLUDE_PARSE_XML (const xmlChar *) "xml"
| Macro defining "xml".
#define | XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
| Macro defining "text".
#define | XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
| Macro defining "encoding".
#define | XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
| Macro defining "xpointer".

## Typedefs
typedef struct _xmlXIncludeCtxt | xmlXIncludeCtxt
| XInclude context.

## Functions
int | xmlXIncludeProcess (xmlDoc *doc)
| Implement the XInclude substitution on the XML document `doc`
int | xmlXIncludeProcessFlags (xmlDoc *doc, int flags)
| Implement the XInclude substitution on the XML document `doc`
int | xmlXIncludeProcessFlagsData (xmlDoc *doc, int flags, void *data)
| Implement the XInclude substitution on the XML document `doc`
int | xmlXIncludeProcessTreeFlagsData (xmlNode *tree, int flags, void *data)
| Implement the XInclude substitution on the XML node `tree`
int | xmlXIncludeProcessTree (xmlNode *tree)
| Implement the XInclude substitution for the given subtree.
int | xmlXIncludeProcessTreeFlags (xmlNode *tree, int flags)
| Implement the XInclude substitution for the given subtree.
xmlXIncludeCtxt * | xmlXIncludeNewContext (xmlDoc *doc)
| Creates a new XInclude context.
int | xmlXIncludeSetFlags (xmlXIncludeCtxt *ctxt, int flags)
| Set the flags used for further processing of XML resources.
void | xmlXIncludeSetErrorHandler (xmlXIncludeCtxt *ctxt, xmlStructuredErrorFunc handler, void *data)
| Register a callback function that will be called on errors and warnings.
void | xmlXIncludeSetResourceLoader (xmlXIncludeCtxt *ctxt, xmlResourceLoader loader, void *data)
| Register a callback function that will be called to load included documents.
int | xmlXIncludeGetLastError (xmlXIncludeCtxt *ctxt)
void | xmlXIncludeFreeContext (xmlXIncludeCtxt *ctxt)
| Free an XInclude context.
int | xmlXIncludeProcessNode (xmlXIncludeCtxt *ctxt, xmlNode *tree)
| Implement the XInclude substitution for the given subtree reusing the information and data coming from the given context.

## Detailed Description

Implementation of XInclude 1.0.

API to process XML Inclusions.

Copyright
  See Copyright for the status of this software.

Author
  Daniel Veillard

## Function Documentation

## ◆ xmlXIncludeFreeContext()

void xmlXIncludeFreeContext | ( | xmlXIncludeCtxt * | ctxt | ) |

Free an XInclude context.

Parameters

  ctxt | the XInclude context

## ◆ xmlXIncludeGetLastError()

int xmlXIncludeGetLastError | ( | xmlXIncludeCtxt * | ctxt | ) |

Since
  2.13.0

Parameters

  ctxt | an XInclude processing context

Returns
  the last error code.

## ◆ xmlXIncludeNewContext()

xmlXIncludeCtxt * xmlXIncludeNewContext | ( | xmlDoc * | doc | ) |

Creates a new XInclude context.

Parameters

  doc | an XML Document

Returns
  the new set

## ◆ xmlXIncludeProcess()

int xmlXIncludeProcess | ( | xmlDoc * | doc | ) |

Implement the XInclude substitution on the XML document `doc`

Parameters

  doc | an XML document

Returns
  0 if no substitution were done, -1 if some processing failed or the number of substitutions done.

## ◆ xmlXIncludeProcessFlags()

int xmlXIncludeProcessFlags | ( | xmlDoc * | doc,
|  | int | flags
| ) |  |

Implement the XInclude substitution on the XML document `doc`

Parameters

  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.

## ◆ xmlXIncludeProcessFlagsData()

int xmlXIncludeProcessFlagsData | ( | xmlDoc * | doc,
|  | int | flags,
|  | void * | data
| ) |  |

Implement the XInclude substitution on the XML document `doc`

Parameters

  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.

## ◆ xmlXIncludeProcessNode()

int xmlXIncludeProcessNode | ( | xmlXIncludeCtxt * | ctxt,
|  | xmlNode * | node
| ) |  |

Implement the XInclude substitution for the given subtree reusing the information and data coming from the given context.

Parameters

  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.

## ◆ xmlXIncludeProcessTree()

int xmlXIncludeProcessTree | ( | xmlNode * | tree | ) |

Implement the XInclude substitution for the given subtree.

Parameters

  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.

## ◆ xmlXIncludeProcessTreeFlags()

int xmlXIncludeProcessTreeFlags | ( | xmlNode * | tree,
|  | int | flags
| ) |  |

Implement the XInclude substitution for the given subtree.

Parameters

  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.

## ◆ xmlXIncludeProcessTreeFlagsData()

int xmlXIncludeProcessTreeFlagsData | ( | xmlNode * | tree,
|  | int | flags,
|  | void * | data
| ) |  |

Implement the XInclude substitution on the XML node `tree`

Parameters

  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.

## ◆ xmlXIncludeSetErrorHandler()

void xmlXIncludeSetErrorHandler | ( | xmlXIncludeCtxt * | 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.

Since
  2.13.0

Parameters

  ctxt | an XInclude processing context
  handler | error handler
  data | user data which will be passed to the handler

## ◆ xmlXIncludeSetFlags()

int xmlXIncludeSetFlags | ( | xmlXIncludeCtxt * | ctxt,
|  | int | flags
| ) |  |

Set the flags used for further processing of XML resources.

Parameters

  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.

## ◆ xmlXIncludeSetResourceLoader()

void xmlXIncludeSetResourceLoader | ( | xmlXIncludeCtxt * | ctxt,
|  | xmlResourceLoader | loader,
|  | void * | data
| ) |  |

Register a callback function that will be called to load included documents.

Since
  2.14.0

Parameters

  ctxt | an XInclude processing context
  loader | resource loader
  data | user data which will be passed to the loader