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