1 * Summary: Tree debugging APIs 2 * Description: Interfaces to a set of routines used for debugging the tree 3 * produced by the XML parser. 4 * 5 * Copy: See Copyright for the status of this software. 6 * 7 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A. 8 9 /if not defined(DEBUG_XML__) 10 /define DEBUG_XML__ 11 12 /include "libxmlrpg/xmlversion" 13 /include "libxmlrpg/tree" 14 15 /if defined(LIBXML_DEBUG_ENABLED) 16 17 /include "libxmlrpg/xpath" 18 19 * The standard Dump routines. 20 21 d xmlDebugDumpString... 22 d pr extproc('xmlDebugDumpString') 23 d output * value FILE * 24 d str * value options(*string) const xmlChar * 25 26 d xmlDebugDumpAttr... 27 d pr extproc('xmlDebugDumpAttr') 28 d output * value FILE * 29 d attr value like(xmlAttrPtr) 30 d depth 10i 0 value 31 32 d xmlDebugDumpAttrList... 33 d pr extproc('xmlDebugDumpAttrList') 34 d output * value FILE * 35 d attr value like(xmlAttrPtr) 36 d depth 10i 0 value 37 38 d xmlDebugDumpOneNode... 39 d pr extproc('xmlDebugDumpOneNode') 40 d output * value FILE * 41 d node value like(xmlNodePtr) 42 d depth 10i 0 value 43 44 d xmlDebugDumpNode... 45 d pr extproc('xmlDebugDumpNode') 46 d output * value FILE * 47 d node value like(xmlNodePtr) 48 d depth 10i 0 value 49 50 d xmlDebugDumpNodeList... 51 d pr extproc('xmlDebugDumpNodeList') 52 d output * value FILE * 53 d node value like(xmlNodePtr) 54 d depth 10i 0 value 55 56 d xmlDebugDumpDocumentHead... 57 d pr extproc('xmlDebugDumpDocumentHead') 58 d output * value FILE * 59 d doc value like(xmlDocPtr) 60 61 d xmlDebugDumpDocument... 62 d pr extproc('xmlDebugDumpDocument') 63 d output * value FILE * 64 d doc value like(xmlDocPtr) 65 66 d xmlDebugDumpDTD... 67 d pr extproc('xmlDebugDumpDTD') 68 d output * value FILE * 69 d dtd value like(xmlDtdPtr) 70 71 d xmlDebugDumpEntities... 72 d pr extproc('xmlDebugDumpEntities') 73 d output * value FILE * 74 d doc value like(xmlDocPtr) 75 76 **************************************************************** 77 * * 78 * Checking routines * 79 * * 80 **************************************************************** 81 82 d xmlDebugCheckDocument... 83 d pr 10i 0 extproc('xmlDebugCheckDocument') 84 d output * value FILE * 85 d doc value like(xmlDocPtr) 86 87 **************************************************************** 88 * * 89 * XML shell helpers * 90 * * 91 **************************************************************** 92 93 d xmlLsOneNode pr extproc('xmlLsOneNode') 94 d output * value FILE * 95 d node value like(xmlNodePtr) 96 97 d xmlLsCountNode pr 10i 0 extproc('xmlLsCountNode') 98 d node value like(xmlNodePtr) 99 100 d xmlBoolToText pr * extproc('xmlBoolToText') const char * 101 d boolval 10i 0 value 102 103 **************************************************************** 104 * * 105 * The XML shell related structures and functions * 106 * * 107 **************************************************************** 108 109 /if defined(LIBXML_XPATH_ENABLED) 110 111 * xmlShellReadlineFunc: 112 * @prompt: a string prompt 113 * 114 * This is a generic signature for the XML shell input function. 115 * 116 * Returns a string which will be freed by the Shell. 117 118 d xmlShellReadlineFunc... 119 d s * based(######typedef######) 120 d procptr 121 122 * xmlShellCtxt: 123 * 124 * A debugging shell context. 125 * TODO: add the defined function tables. 126 127 d xmlShellCtxtPtr... 128 d s * based(######typedef######) 129 130 d xmlSchellCtxt ds based(xmlShellCtxtPtr) 131 d align qualified 132 d filename * char * 133 d doc like(xmlDocPtr) 134 d node like(xmlNodePtr) 135 d pctxt like(xmlXPathContextPtr) 136 d loaded 10i 0 137 d output * FILE * 138 d input like(xmlShellReadlineFunc) 139 140 * xmlShellCmd: 141 * @ctxt: a shell context 142 * @arg: a string argument 143 * @node: a first node 144 * @node2: a second node 145 * 146 * This is a generic signature for the XML shell functions. 147 * 148 * Returns an int, negative returns indicating errors. 149 150 d xmlShellCmd s * based(######typedef######) 151 d procptr 152 153 d xmlShellPrintXPathError... 154 d pr extproc('xmlShellPrintXPathError') 155 d errorType 10i 0 value 156 d arg * value options(*string) const char * 157 158 d xmlShellPrintXPathResult... 159 d pr extproc('xmlShellPrintXPathResult') 160 d list value like(xmlXPathObjectPtr) 161 162 d xmlShellList pr 10i 0 extproc('xmlShellList') 163 d ctxt value like(xmlShellCtxtPtr) 164 d arg * value options(*string) char * 165 d node value like(xmlNodePtr) 166 d node2 value like(xmlNodePtr) 167 168 d xmlShellBase pr 10i 0 extproc('xmlShellBase') 169 d ctxt value like(xmlShellCtxtPtr) 170 d arg * value options(*string) char * 171 d node value like(xmlNodePtr) 172 d node2 value like(xmlNodePtr) 173 174 d xmlShellDir pr 10i 0 extproc('xmlShellDir') 175 d ctxt value like(xmlShellCtxtPtr) 176 d arg * value options(*string) char * 177 d node value like(xmlNodePtr) 178 d node2 value like(xmlNodePtr) 179 180 d xmlShellLoad pr 10i 0 extproc('xmlShellLoad') 181 d ctxt value like(xmlShellCtxtPtr) 182 d filename * value options(*string) char * 183 d node value like(xmlNodePtr) 184 d node2 value like(xmlNodePtr) 185 186 /if defined(LIBXML_OUTPUT_ENABLED) 187 d xmlShellPrintNode... 188 d pr extproc('xmlShellPrintNode') 189 d node value like(xmlNodePtr) 190 191 d xmlShellCat pr 10i 0 extproc('xmlShellCat') 192 d ctxt value like(xmlShellCtxtPtr) 193 d arg * value options(*string) char * 194 d node value like(xmlNodePtr) 195 d node2 value like(xmlNodePtr) 196 197 d xmlShellWrite pr 10i 0 extproc('xmlShellWrite') 198 d ctxt value like(xmlShellCtxtPtr) 199 d filename * value options(*string) char * 200 d node value like(xmlNodePtr) 201 d node2 value like(xmlNodePtr) 202 203 d xmlShellSave pr 10i 0 extproc('xmlShellSave') 204 d ctxt value like(xmlShellCtxtPtr) 205 d filename * value options(*string) char * 206 d node value like(xmlNodePtr) 207 d node2 value like(xmlNodePtr) 208 /endif LIBXML_OUTPUT_ENABLD 209 210 /if defined(LIBXML_VALID_ENABLED) 211 d xmlShellValidate... 212 d pr 10i 0 extproc('xmlShellValidate') 213 d ctxt value like(xmlShellCtxtPtr) 214 d dtd * value options(*string) char * 215 d node value like(xmlNodePtr) 216 d node2 value like(xmlNodePtr) 217 /endif LIBXML_VALID_ENABLED 218 219 d xmlShellDu pr 10i 0 extproc('xmlShellDu') 220 d ctxt value like(xmlShellCtxtPtr) 221 d arg * value options(*string) char * 222 d tree value like(xmlNodePtr) 223 d node2 value like(xmlNodePtr) 224 225 d xmlShellPwd pr 10i 0 extproc('xmlShellPwd') 226 d ctxt value like(xmlShellCtxtPtr) 227 d buffer * value options(*string) char * 228 d node value like(xmlNodePtr) 229 d node2 value like(xmlNodePtr) 230 231 * The Shell interface. 232 233 d xmlShell pr extproc('xmlShell') 234 d doc value like(xmlDocPtr) 235 d filename * value options(*string) char * 236 d input value like(xmlShellReadlineFunc) 237 d output * value FILE * 238 239 /endif LIBXML_XPATH_ENABLED 240 /endif LIBXML_DEBUG_ENABLED 241 /endif DEBUG_XML__ 242