1 * Summary: unfinished XLink detection module
2 * Description: unfinished XLink detection module
4 * Copy: See Copyright for the status of this software.
6 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
8 /if not defined(XML_XLINK_H__)
11 /include "libxmlrpg/xmlversion"
12 /include "libxmlrpg/tree"
14 /if defined(LIBXML_XPTR_ENABLED)
16 * Various defines for the various Link properties.
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.
25 d xlinkRef s * based(######typedef######) xmlChar *
26 d xlinkRole s * based(######typedef######) xmlChar *
27 d xlinkTitle s * based(######typedef######) xmlChar *
29 d xlinkType s 10i 0 based(######typedef######) enum
32 d XLINK_TYPE_SIMPLE...
34 d XLINK_TYPE_EXTENDED...
36 d XLINK_TYPE_EXTENDED_SET...
39 d xlinkShow s 10i 0 based(######typedef######) enum
46 d XLINK_SHOW_REPLACE...
49 d xlinkActuate s 10i 0 based(######typedef######) enum
50 d XLINK_ACTUATE_NONE...
52 d XLINK_ACTUATE_AUTO...
54 d XLINK_ACTUATE_ONREQUEST...
57 * xlinkNodeDetectFunc:
58 * @ctx: user data pointer
59 * @node: the node to check
61 * This is the prototype for the link detection routine.
62 * It calls the default link detection callbacks upon link detection.
64 d xlinkNodeDetectFunc...
65 d s * based(######typedef######)
68 * The link detection module interact with the upper layers using
69 * a set of callback registered at parsing time.
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
78 * This is the prototype for a simple link detection callback.
80 d xlinkSimpleLinkFunk...
81 d s * based(######typedef######)
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
99 * This is the prototype for a extended link detection callback.
101 d xlinkExtendedLinkFunk...
102 d s * based(######typedef######)
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
115 * This is the prototype for a extended link set detection callback.
117 d xlinkExtendedLinkSetFunk...
118 d s * based(######typedef######)
121 * This is the structure containing a set of Links detection callbacks.
123 * There is no default xlink callbacks, if one want to get link
124 * recognition activated, those call backs must be provided before parsing.
127 d s * based(######typedef######) xmlChar *
129 d xlinkHandler ds based(xlinkHandlerPtr)
131 d simple like(xlinkSimpleLinkFunk)
132 d extended like(xlinkExtendedLinkFunk)
133 d set like(xlinkExtendedLinkSetFunk)
135 * The default detection routine, can be overridden, they call the default
136 * detection callbacks.
138 d xlinkGetDefaultDetect...
139 d pr extproc('xlinkGetDefaultDetect')
140 d like(xlinkNodeDetectFunc)
142 d xlinkSetDefaultDetect...
143 d pr extproc('xlinkSetDefaultDetect')
144 d func value like(xlinkNodeDetectFunc)
146 * Routines to set/get the default handlers.
148 d xlinkGetDefaultHandler...
149 d pr extproc('xlinkGetDefaultHandler')
150 d like(xlinkHandlerPtr)
152 d xlinkSetDefaultHandler...
153 d pr extproc('xlinkSetDefaultHandler')
154 d handler value like(xlinkHandlerPtr)
156 * Link detection module itself.
158 d xlinkIsLink pr extproc('xlinkIsLink')
160 d doc value like(xmlDocPtr)
161 d node value like(xmlNodePtr)
163 /endif LIBXML_XPTR_ENABLED