xinclude.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Summary: implementation of XInclude
  3. * Description: API to handle XInclude processing,
  4. * implements the
  5. * World Wide Web Consortium Last Call Working Draft 10 November 2003
  6. * http://www.w3.org/TR/2003/WD-xinclude-20031110
  7. *
  8. * Copy: See Copyright for the status of this software.
  9. *
  10. * Author: Daniel Veillard
  11. */
  12. #ifndef __XML_XINCLUDE_H__
  13. #define __XML_XINCLUDE_H__
  14. #include <libxml/xmlversion.h>
  15. #include <libxml/xmlerror.h>
  16. #include <libxml/tree.h>
  17. #ifdef LIBXML_XINCLUDE_ENABLED
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. /**
  22. * XINCLUDE_NS:
  23. *
  24. * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
  25. */
  26. #define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
  27. /**
  28. * XINCLUDE_OLD_NS:
  29. *
  30. * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
  31. */
  32. #define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
  33. /**
  34. * XINCLUDE_NODE:
  35. *
  36. * Macro defining "include"
  37. */
  38. #define XINCLUDE_NODE (const xmlChar *) "include"
  39. /**
  40. * XINCLUDE_FALLBACK:
  41. *
  42. * Macro defining "fallback"
  43. */
  44. #define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
  45. /**
  46. * XINCLUDE_HREF:
  47. *
  48. * Macro defining "href"
  49. */
  50. #define XINCLUDE_HREF (const xmlChar *) "href"
  51. /**
  52. * XINCLUDE_PARSE:
  53. *
  54. * Macro defining "parse"
  55. */
  56. #define XINCLUDE_PARSE (const xmlChar *) "parse"
  57. /**
  58. * XINCLUDE_PARSE_XML:
  59. *
  60. * Macro defining "xml"
  61. */
  62. #define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
  63. /**
  64. * XINCLUDE_PARSE_TEXT:
  65. *
  66. * Macro defining "text"
  67. */
  68. #define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
  69. /**
  70. * XINCLUDE_PARSE_ENCODING:
  71. *
  72. * Macro defining "encoding"
  73. */
  74. #define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
  75. /**
  76. * XINCLUDE_PARSE_XPOINTER:
  77. *
  78. * Macro defining "xpointer"
  79. */
  80. #define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
  81. typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
  82. typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
  83. /*
  84. * standalone processing
  85. */
  86. XMLPUBFUN int
  87. xmlXIncludeProcess (xmlDocPtr doc);
  88. XMLPUBFUN int
  89. xmlXIncludeProcessFlags (xmlDocPtr doc,
  90. int flags);
  91. XMLPUBFUN int
  92. xmlXIncludeProcessFlagsData(xmlDocPtr doc,
  93. int flags,
  94. void *data);
  95. XMLPUBFUN int
  96. xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
  97. int flags,
  98. void *data);
  99. XMLPUBFUN int
  100. xmlXIncludeProcessTree (xmlNodePtr tree);
  101. XMLPUBFUN int
  102. xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
  103. int flags);
  104. /*
  105. * contextual processing
  106. */
  107. XMLPUBFUN xmlXIncludeCtxtPtr
  108. xmlXIncludeNewContext (xmlDocPtr doc);
  109. XMLPUBFUN int
  110. xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
  111. int flags);
  112. XMLPUBFUN void
  113. xmlXIncludeSetErrorHandler(xmlXIncludeCtxtPtr ctxt,
  114. xmlStructuredErrorFunc handler,
  115. void *data);
  116. XMLPUBFUN int
  117. xmlXIncludeGetLastError (xmlXIncludeCtxtPtr ctxt);
  118. XMLPUBFUN void
  119. xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
  120. XMLPUBFUN int
  121. xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
  122. xmlNodePtr tree);
  123. #ifdef __cplusplus
  124. }
  125. #endif
  126. #endif /* LIBXML_XINCLUDE_ENABLED */
  127. #endif /* __XML_XINCLUDE_H__ */