Annotation of XML/xpointer.h, revision 1.3
1.1 daniel 1: /*
2: * xpointer.h : API to handle XML Pointers
3: *
4: * World Wide Web Consortium Working Draft 03-March-1998
5: * http://www.w3.org/TR/1998/WD-xptr-19980303
6: *
7: * See Copyright for the status of this software.
8: *
9: * Daniel.Veillard@w3.org
10: */
11:
12: #ifndef __XML_XPTR_H__
13: #define __XML_XPTR_H__
14:
15: #include "tree.h"
16:
17: #ifdef __cplusplus
18: extern "C" {
19: #endif
20:
21: /*
1.3 ! daniel 22: * Predefined keyword vakues:
! 23: */
! 24:
! 25: typedef enum xmlPointerKeyword {
! 26: XML_XPTR_CHILD = 1,
! 27: XML_XPTR_DESCENDANT,
! 28: XML_XPTR_ANCESTOR,
! 29: XML_XPTR_PRECEDING,
! 30: XML_XPTR_FOLLOWING,
! 31: XML_XPTR_PSIBLING,
! 32: XML_XPTR_FSIBLING
! 33: } xmlPointerKeyword;
! 34:
! 35: /*
1.1 daniel 36: * An XML Pointer
37: */
38:
39: typedef struct xmlPointer {
1.3 ! daniel 40: xmlDocPtr doc; /* the document pointed */
! 41: xmlNodePtr elem; /* the element pointed */
! 42: int instance; /* the instance value -1 otherwise */
! 43: int index; /* the offset if string(), -1 otherwise */
! 44: int len; /* the length if string(), 0 for 'end', -1 otherwise */
! 45: struct xmlPointer *span;/* the next in case of a span() or all */
1.1 daniel 46: } xmlPointer;
47: typedef xmlPointer *xmlPointerPtr;
48:
49: /*
50: * API
51: */
52: xmlPointerPtr
1.2 daniel 53: xmlPointerQuery(xmlDocPtr doc, CHAR *selector);
1.1 daniel 54: CHAR *
55: xmlPointerText(xmlPointerPtr ptr);
56: void
57: xmlPointerFree(xmlPointerPtr ptr);
58:
59: #ifdef __cplusplus
60: }
61: #endif
62: #endif /* __XML_XPTR_H__ */
Webmaster