catalog.inc 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. (**
  2. * Summary: interfaces to the Catalog handling system
  3. * Description: the catalog module implements the support for
  4. * XML Catalogs and SGML catalogs
  5. *
  6. * SGML Open Technical Resolution TR9401:1997.
  7. * http://www.jclark.com/sp/catalog.htm
  8. *
  9. * XML Catalogs Working Draft 06 August 2001
  10. * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
  11. *
  12. * Copy: See Copyright for the status of this software.
  13. *
  14. * Author: Daniel Veillard
  15. *)
  16. {$IFDEF LIBXML_CATALOG_ENABLED}
  17. {$IFDEF CONST}
  18. (**
  19. * XML_CATALOGS_NAMESPACE:
  20. *
  21. * The namespace for the XML Catalogs elements.
  22. *)
  23. XML_CATALOGS_NAMESPACE: xmlCharPtr = 'urn:oasis:names:tc:entity:xmlns:xml:catalog';
  24. (**
  25. * XML_CATALOG_PI:
  26. *
  27. * The specific XML Catalog Processing Instuction name.
  28. *)
  29. XML_CATALOG_PI: xmlCharPtr = 'urn:oasis:names:tc:entity:xmlns:xml:catalog';
  30. {$ENDIF}
  31. {$IFDEF POINTER}
  32. xmlCatalogPtr = ^xmlCatalog;
  33. {$ENDIF}
  34. {$IFDEF TYPE}
  35. (*
  36. * The API is voluntarily limited to general cataloging.
  37. *)
  38. xmlCatalogPrefer = (
  39. XML_CATA_PREFER_NONE = 0,
  40. XML_CATA_PREFER_PUBLIC = 1,
  41. XML_CATA_PREFER_SYSTEM
  42. );
  43. xmlCatalogAllow = (
  44. XML_CATA_ALLOW_NONE = 0,
  45. XML_CATA_ALLOW_GLOBAL = 1,
  46. XML_CATA_ALLOW_DOCUMENT = 2,
  47. XML_CATA_ALLOW_ALL = 3
  48. );
  49. xmlCatalog = record end;
  50. {$ENDIF}
  51. {$IFDEF FUNCTION}
  52. (*
  53. * Operations on a given catalog.
  54. *)
  55. function xmlNewCatalog(sgml: cint): xmlCatalogPtr; EXTDECL; external xml2lib;
  56. function xmlLoadACatalog(filename: pchar): xmlCatalogPtr; EXTDECL; external xml2lib;
  57. function xmlLoadSGMLSuperCatalog(filename: pchar): xmlCatalogPtr; EXTDECL; external xml2lib;
  58. function xmlLoadACatalog(catal: xmlCatalogPtr): cint; EXTDECL; external xml2lib;
  59. function xmlACatalogAdd(catal: xmlCatalogPtr; _type, orig, replace: xmlCharPtr): cint; EXTDECL; external xml2lib;
  60. function xmlACatalogRemove(catal: xmlCatalogPtr; value: xmlCharPtr): cint; EXTDECL; external xml2lib;
  61. function xmlACatalogResolve(catal: xmlCatalogPtr; pubID, sysID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  62. function xmlACatalogResolveSystem(catal: xmlCatalogPtr; sysID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  63. function xmlACatalogResolvePublic(catal: xmlCatalogPtr; pubID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  64. function xmlACatalogResolveURI(catal: xmlCatalogPtr; URI: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  65. {$IFDEF LIBXML_OUTPUT_ENABLED}
  66. procedure xmlACatalogDump(catal: xmlCatalogPtr; _out: PFILE); EXTDECL; external xml2lib;
  67. {$ENDIF} (* LIBXML_OUTPUT_ENABLED *)
  68. procedure xmlFreeCatalog(catal: xmlCatalogPtr); EXTDECL; external xml2lib;
  69. function xmlCatalogIsEmpty(catal: xmlCatalogPtr): cint; EXTDECL; external xml2lib;
  70. (*
  71. * Global operations.
  72. *)
  73. procedure xmlInitializeCatalog; EXTDECL; external xml2lib;
  74. function xmlLoadCatalog(filename: pchar): cint; EXTDECL; external xml2lib;
  75. function xmlLoadCatalogs(paths: pchar): cint; EXTDECL; external xml2lib;
  76. procedure xmlCatalogCleanup; EXTDECL; external xml2lib;
  77. {$IFDEF LIBXML_OUTPUT_ENABLED}
  78. procedure xmlCatalogDump(_out: PFILE); EXTDECL; external xml2lib;
  79. {$ENDIF} (* LIBXML_OUTPUT_ENABLED *)
  80. function xmlCatalogResolve(pubID, sysID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  81. function xmlCatalogResolveSystem(sysID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  82. function xmlCatalogResolvePublic(pubID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  83. function xmlCatalogResolveURI(URI: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  84. function xmlCatalogAdd(_type, orig, replace: xmlCharPtr): cint; EXTDECL; external xml2lib;
  85. function xmlCatalogRemove(value: xmlCharPtr): cint; EXTDECL; external xml2lib;
  86. function xmlParseCatalogFile(filename: pchar): xmlDocPtr; EXTDECL; external xml2lib;
  87. function xmlCatalogConvert: cint; EXTDECL; external xml2lib;
  88. (*
  89. * Strictly minimal interfaces for per-document catalogs used
  90. * by the parser.
  91. *)
  92. procedure xmlCatalogFreeLocal(catalogs: pointer); EXTDECL; external xml2lib;
  93. function xmlCatalogAddLocal(catalogs: pointer; URL: xmlCharPtr): pointer; EXTDECL; external xml2lib;
  94. function xmlCatalogLocalResolve(catalogs: pointer; pubID, sysID: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  95. function xmlCatalogLocalResolveURI(catalogs: pointer; URI: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  96. (*
  97. * Preference settings.
  98. *)
  99. function xmlCatalogSetDebug(level: cint): cint; EXTDECL; external xml2lib;
  100. function xmlCatalogSetDefaultPrefer(prefer: xmlCatalogPrefer): cint; EXTDECL; external xml2lib;
  101. procedure xmlCatalogSetDefaults(allow: xmlCatalogAllow); EXTDECL; external xml2lib;
  102. function xmlCatalogGetDefaults: xmlCatalogAllow; EXTDECL; external xml2lib;
  103. {$ENDIF}
  104. {$ENDIF} (* LIBXML_CATALOG_ENABLED *)