uri.inc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. (**
  2. * Summary: library of generic URI related routines
  3. * Description: library of generic URI related routines
  4. * Implements RFC 2396
  5. *
  6. * Copy: See Copyright for the status of this software.
  7. *
  8. * Author: Daniel Veillard
  9. *)
  10. {$IFDEF POINTER}
  11. xmlURIPtr = ^xmlURI;
  12. {$ENDIF}
  13. {$IFDEF TYPE}
  14. (**
  15. * xmlURI:
  16. *
  17. * A parsed URI reference. This is a struct containing the various fields
  18. * as described in RFC 2396 but separated for further processing.
  19. *
  20. * Note: query is a deprecated field which is incorrectly unescaped.
  21. * query_raw takes precedence over query if the former is set.
  22. * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
  23. *)
  24. xmlUri = record
  25. scheme : pchar; (* the URI scheme *)
  26. opaque : pchar; (* opaque part *)
  27. authority : pchar; (* the authority part *)
  28. server : pchar; (* the server part *)
  29. user : pchar; (* the user part *)
  30. port : cint; (* the port number *)
  31. path : pchar; (* the path string *)
  32. query : pchar; (* the query string (deprecated - use with caution) *)
  33. fragment : pchar; (* the fragment identifier *)
  34. cleanup : cint; (* parsing potentially unclean URI *)
  35. query_raw : pchar; (* the query string (as it appears in the URI) *)
  36. end;
  37. {$ENDIF}
  38. {$IFDEF FUNCTION}
  39. (*
  40. * This function is in tree.h:
  41. * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
  42. * xmlNodePtr cur);
  43. *)
  44. function xmlCreateURI(): xmlURIPtr; EXTDECL; external xml2lib;
  45. function xmlBuildURI(URI: xmlCharPtr; base: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  46. function xmlBuildRelativeURI(URI: xmlCharPtr; base: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  47. function xmlParseURI(str: pchar): xmlURIPtr; EXTDECL; external xml2lib;
  48. function xmlParseURI(str: pchar; raw: cint): xmlURIPtr; EXTDECL; external xml2lib;
  49. function xmlParseURIReference(uri: xmlURIPtr; str: pchar): cint; EXTDECL; external xml2lib;
  50. function xmlSaveUri(uri: xmlURIPtr): pchar; EXTDECL; external xml2lib;
  51. procedure xmlPrintURI(stream: PFILE; uri: xmlURIPtr); EXTDECL; external xml2lib;
  52. function xmlURIEscapeStr(str: xmlCharPtr; list: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  53. function xmlURIUnescapeString(str: pchar; len: cint; target: pchar): xmlCharPtr; EXTDECL; external xml2lib;
  54. function xmlNormalizeURIPath(path: pchar): cint; EXTDECL; external xml2lib;
  55. function xmlURIEscape(str: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  56. procedure xmlPrintURI(uri: xmlURIPtr); EXTDECL; external xml2lib;
  57. function xmlCanonicPath(path: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  58. function xmlPathToURI(path: xmlCharPtr): xmlCharPtr; EXTDECL; external xml2lib;
  59. {$ENDIF}