964e605fba5927bb2b1215e67a3007d8df37bb30
[platform/upstream/libxml2.git] / os400 / libxmlrpg / xlink.rpgle
1       * Summary: unfinished XLink detection module
2       * Description: unfinished XLink detection module
3       *
4       * Copy: See Copyright for the status of this software.
5       *
6       * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
7
8       /if not defined(XML_XLINK_H__)
9       /define XML_XLINK_H__
10
11       /include "libxmlrpg/xmlversion"
12       /include "libxmlrpg/tree"
13
14       /if defined(LIBXML_XPTR_ENABLED)
15
16       * Various defines for the various Link properties.
17       *
18       * NOTE: the link detection layer will try to resolve QName expansion
19       *       of namespaces. If "foo" is the prefix for "http://foo.com/"
20       *       then the link detection layer will expand role="foo:myrole"
21       *       to "http://foo.com/:myrole".
22       * NOTE: the link detection layer will expand URI-Refences found on
23       *       href attributes by using the base mechanism if found.
24
25      d xlinkRef        s               *   based(######typedef######)           xmlChar *
26      d xlinkRole       s               *   based(######typedef######)           xmlChar *
27      d xlinkTitle      s               *   based(######typedef######)           xmlChar *
28
29      d xlinkType       s             10i 0 based(######typedef######)           enum
30      d  XLINK_TYPE_NONE...
31      d                 c                   0
32      d  XLINK_TYPE_SIMPLE...
33      d                 c                   1
34      d  XLINK_TYPE_EXTENDED...
35      d                 c                   2
36      d  XLINK_TYPE_EXTENDED_SET...
37      d                 c                   3
38
39      d xlinkShow       s             10i 0 based(######typedef######)           enum
40      d  XLINK_SHOW_NONE...
41      d                 c                   0
42      d  XLINK_SHOW_NEW...
43      d                 c                   1
44      d  XLINK_SHOW_EMBED...
45      d                 c                   2
46      d  XLINK_SHOW_REPLACE...
47      d                 c                   3
48
49      d xlinkActuate    s             10i 0 based(######typedef######)           enum
50      d  XLINK_ACTUATE_NONE...
51      d                 c                   0
52      d  XLINK_ACTUATE_AUTO...
53      d                 c                   1
54      d  XLINK_ACTUATE_ONREQUEST...
55      d                 c                   2
56
57       * xlinkNodeDetectFunc:
58       * @ctx:  user data pointer
59       * @node:  the node to check
60       *
61       * This is the prototype for the link detection routine.
62       * It calls the default link detection callbacks upon link detection.
63
64      d xlinkNodeDetectFunc...
65      d                 s               *   based(######typedef######)
66      d                                     procptr
67
68       * The link detection module interact with the upper layers using
69       * a set of callback registered at parsing time.
70
71       * xlinkSimpleLinkFunk:
72       * @ctx:  user data pointer
73       * @node:  the node carrying the link
74       * @href:  the target of the link
75       * @role:  the role string
76       * @title:  the link title
77       *
78       * This is the prototype for a simple link detection callback.
79
80      d xlinkSimpleLinkFunk...
81      d                 s               *   based(######typedef######)
82      d                                     procptr
83
84       * xlinkExtendedLinkFunk:
85       * @ctx:  user data pointer
86       * @node:  the node carrying the link
87       * @nbLocators: the number of locators detected on the link
88       * @hrefs:  pointer to the array of locator hrefs
89       * @roles:  pointer to the array of locator roles
90       * @nbArcs: the number of arcs detected on the link
91       * @from:  pointer to the array of source roles found on the arcs
92       * @to:  pointer to the array of target roles found on the arcs
93       * @show:  array of values for the show attributes found on the arcs
94       * @actuate:  array of values for the actuate attributes found on the arcs
95       * @nbTitles: the number of titles detected on the link
96       * @title:  array of titles detected on the link
97       * @langs:  array of xml:lang values for the titles
98       *
99       * This is the prototype for a extended link detection callback.
100
101      d xlinkExtendedLinkFunk...
102      d                 s               *   based(######typedef######)
103      d                                     procptr
104
105       * xlinkExtendedLinkSetFunk:
106       * @ctx:  user data pointer
107       * @node:  the node carrying the link
108       * @nbLocators: the number of locators detected on the link
109       * @hrefs:  pointer to the array of locator hrefs
110       * @roles:  pointer to the array of locator roles
111       * @nbTitles: the number of titles detected on the link
112       * @title:  array of titles detected on the link
113       * @langs:  array of xml:lang values for the titles
114       *
115       * This is the prototype for a extended link set detection callback.
116
117      d xlinkExtendedLinkSetFunk...
118      d                 s               *   based(######typedef######)
119      d                                     procptr
120
121       * This is the structure containing a set of Links detection callbacks.
122       *
123       * There is no default xlink callbacks, if one want to get link
124       * recognition activated, those call backs must be provided before parsing.
125
126      d xlinkHandlerPtr...
127      d                 s               *   based(######typedef######)           xmlChar *
128
129      d xlinkHandler    ds                  based(xlinkHandlerPtr)
130      d                                     align qualified
131      d  simple                             like(xlinkSimpleLinkFunk)
132      d  extended                           like(xlinkExtendedLinkFunk)
133      d  set                                like(xlinkExtendedLinkSetFunk)
134
135       * The default detection routine, can be overridden, they call the default
136       * detection callbacks.
137
138      d xlinkGetDefaultDetect...
139      d                 pr                  extproc('xlinkGetDefaultDetect')
140      d                                     like(xlinkNodeDetectFunc)
141
142      d xlinkSetDefaultDetect...
143      d                 pr                  extproc('xlinkSetDefaultDetect')
144      d  func                               value like(xlinkNodeDetectFunc)
145
146       * Routines to set/get the default handlers.
147
148      d xlinkGetDefaultHandler...
149      d                 pr                  extproc('xlinkGetDefaultHandler')
150      d                                     like(xlinkHandlerPtr)
151
152      d xlinkSetDefaultHandler...
153      d                 pr                  extproc('xlinkSetDefaultHandler')
154      d  handler                            value like(xlinkHandlerPtr)
155
156       * Link detection module itself.
157
158      d xlinkIsLink     pr                  extproc('xlinkIsLink')
159      d                                     like(xlinkType)
160      d  doc                                value like(xmlDocPtr)
161      d  node                               value like(xmlNodePtr)
162
163       /endif                                                                    LIBXML_XPTR_ENABLED
164       /endif                                                                    XML_XLINK_H__