Changeset 97 for trunk/include
- Timestamp:
- Aug 12, 2001, 5:34:51 PM (24 years ago)
- Location:
- trunk/include
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/encodings/base.h
r37 r97 7 7 */ 8 8 9 /* 10 *@@ XWPENCODINGMAP: 11 * entry in an 8-bit to Unicode conversion table. 12 */ 9 #if __cplusplus 10 extern "C" { 11 #endif 13 12 14 typedef struct _XWPENCODINGMAP 15 { 16 unsigned short usFrom; 17 unsigned short usUni; 18 } XWPENCODINGMAP, *PXWPENCODINGMAP; 13 #ifndef ENC_BASE_HEADER_INCLUDED 14 #define ENC_BASE_HEADER_INCLUDED 19 15 20 /* 21 *@@ XWPENCODINGID: 22 * enum identifying each encoding set which is 23 * generally supported. Each ID corresponds to 24 * one header file in include\encodings\. 25 */ 16 /* 17 *@@ XWPENCODINGMAP: 18 * entry in an 8-bit to Unicode conversion table. 19 */ 26 20 27 typedef enum _XWPENCODINGID 28 { 29 enc_cp437, 30 enc_cp737, 31 enc_cp775, 32 enc_cp850, 33 enc_cp852, 34 enc_cp855, 35 enc_cp857, 36 enc_cp860, 37 enc_cp861, 38 enc_cp862, 39 enc_cp863, 40 enc_cp864, 41 enc_cp865, 42 enc_cp866, 43 enc_cp869, 44 enc_cp874, 45 enc_cp932, 46 enc_cp936, 47 enc_cp949, 48 enc_cp950, 49 enc_cp1250, 50 enc_cp1251, 51 enc_cp1252, 52 enc_cp1253, 53 enc_cp1254, 54 enc_cp1255, 55 enc_cp1256, 56 enc_cp1257, 57 enc_cp1258, 58 enc_iso8859_1, 59 enc_iso8859_2, 60 enc_iso8859_3, 61 enc_iso8859_4, 62 enc_iso8859_5, 63 enc_iso8859_6, 64 enc_iso8859_7, 65 enc_iso8859_8, 66 enc_iso8859_9, 67 enc_iso8859_10, 68 enc_iso8859_13, 69 enc_iso8859_14, 70 enc_iso8859_15 71 } XWPENCODINGID; 21 typedef struct _XWPENCODINGMAP 22 { 23 unsigned short usFrom; 24 unsigned short usUni; 25 } XWPENCODINGMAP, *PXWPENCODINGMAP; 72 26 27 /* 28 *@@ XWPENCODINGID: 29 * enum identifying each encoding set which is 30 * generally supported. Each ID corresponds to 31 * one header file in include\encodings\. 32 */ 73 33 34 typedef enum _XWPENCODINGID 35 { 36 enc_cp437, 37 enc_cp737, 38 enc_cp775, 39 enc_cp850, 40 enc_cp852, 41 enc_cp855, 42 enc_cp857, 43 enc_cp860, 44 enc_cp861, 45 enc_cp862, 46 enc_cp863, 47 enc_cp864, 48 enc_cp865, 49 enc_cp866, 50 enc_cp869, 51 enc_cp874, 52 enc_cp932, 53 enc_cp936, 54 enc_cp949, 55 enc_cp950, 56 enc_cp1250, 57 enc_cp1251, 58 enc_cp1252, 59 enc_cp1253, 60 enc_cp1254, 61 enc_cp1255, 62 enc_cp1256, 63 enc_cp1257, 64 enc_cp1258, 65 enc_iso8859_1, 66 enc_iso8859_2, 67 enc_iso8859_3, 68 enc_iso8859_4, 69 enc_iso8859_5, 70 enc_iso8859_6, 71 enc_iso8859_7, 72 enc_iso8859_8, 73 enc_iso8859_9, 74 enc_iso8859_10, 75 enc_iso8859_13, 76 enc_iso8859_14, 77 enc_iso8859_15 78 } XWPENCODINGID; 79 80 unsigned long encDecodeUTF8(const char **ppch); 81 82 #endif 83 84 #if __cplusplus 85 } 86 #endif 87 -
trunk/include/expat/ascii.h
r36 r97 70 70 71 71 #define ASCII_TAB 0x09 72 #define ASCII_SPACE 0x20 72 #define ASCII_SPACE 0x20 73 73 #define ASCII_EXCL 0x21 74 74 #define ASCII_QUOT 0x22 -
trunk/include/expat/expat.h
r71 r97 14 14 15 15 #ifndef XMLPARSEAPI 16 # ifdef __declspec 17 # define XMLPARSEAPI __declspec(dllimport) 18 # else 19 # define XMLPARSEAPI /* nothing */ 20 # endif 21 #endif /* not defined XMLPARSEAPI */ 16 #ifdef EXPATENTRY 17 #define XMLPARSEAPI(type) type EXPATENTRY 18 // V0.9.14 (2001-08-09) [umoeller] 19 #else 20 #define XMLPARSEAPI(type) type 21 #endif 22 #endif 22 23 23 24 #ifdef __cplusplus … … 105 106 // -- XML_CQUANT_PLUS plus sign 106 107 107 const XML_Char*name;108 XML_Char *name; 108 109 109 110 unsigned int numchildren; 110 111 111 112 struct _XMLCONTENT *children; 112 113 113 } XMLCONTENT, *PXMLCONTENT; 114 114 … … 119 119 */ 120 120 121 typedef void (* EXPATENTRY XML_ElementDeclHandler) (void *userData, 122 const XML_Char *name, 123 XMLCONTENT *model); 124 125 void XMLPARSEAPI XML_SetElementDeclHandler(XML_Parser parser, 121 typedef void (*XML_ElementDeclHandler) (void *userData, 122 const XML_Char *name, 123 XMLCONTENT *model); 124 125 XMLPARSEAPI(void) 126 XML_SetElementDeclHandler(XML_Parser parser, 126 127 XML_ElementDeclHandler eldecl); 127 128 … … 136 137 */ 137 138 138 typedef void (* EXPATENTRY XML_AttlistDeclHandler) (void *userData, 139 const XML_Char *elname, 140 const XML_Char *attname, 141 const XML_Char *att_type, 142 const XML_Char *dflt, 143 int isrequired); 144 145 void XMLPARSEAPI XML_SetAttlistDeclHandler(XML_Parser parser, 139 typedef void (*XML_AttlistDeclHandler) (void *userData, 140 const XML_Char *elname, 141 const XML_Char *attname, 142 const XML_Char *att_type, 143 const XML_Char *dflt, 144 int isrequired); 145 146 XMLPARSEAPI(void) 147 XML_SetAttlistDeclHandler(XML_Parser parser, 146 148 XML_AttlistDeclHandler attdecl); 147 149 … … 155 157 */ 156 158 157 typedef void (* EXPATENTRY XML_XmlDeclHandler) (void *userData, 158 const XML_Char *version, 159 const XML_Char *encoding, 160 int standalone); 161 162 void XMLPARSEAPI XML_SetXmlDeclHandler(XML_Parser parser, 159 typedef void (*XML_XmlDeclHandler) (void *userData, 160 const XML_Char *version, 161 const XML_Char *encoding, 162 int standalone); 163 164 XMLPARSEAPI(void) 165 XML_SetXmlDeclHandler(XML_Parser parser, 163 166 XML_XmlDeclHandler xmldecl); 164 167 … … 170 173 } XML_Memory_Handling_Suite; 171 174 172 /* Constructs a new parser; encoding is the encoding specified by the external 173 protocol or null if there is none specified. */ 174 175 XML_Parser XMLPARSEAPI XML_ParserCreate(const XML_Char *encoding); 176 177 /* Constructs a new parser and namespace processor. Element type names 178 and attribute names that belong to a namespace will be expanded; 175 /* Constructs a new parser; encoding is the encoding specified by the 176 external protocol or null if there is none specified. */ 177 178 XMLPARSEAPI(XML_Parser) 179 XML_ParserCreate(const XML_Char *encoding); 180 181 /* Constructs a new parser and namespace processor. Element type 182 names and attribute names that belong to a namespace will be expanded; 179 183 unprefixed attribute names are never expanded; unprefixed element type 180 184 names are expanded only if there is a default namespace. The expanded 181 name is the concatenation of the namespace URI, the namespace separator character, 182 and the local part of the name. If the namespace separator is '\0' then 183 the namespace URI and the local part will be concatenated without any 184 separator. When a namespace is not declared, the name and prefix will be 185 passed through without expansion. */ 186 187 XML_Parser XMLPARSEAPI XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); 185 name is the concatenation of the namespace URI, the namespace 186 separator character, and the local part of the name. If the namespace 187 separator is '\0' then the namespace URI and the local part will be 188 concatenated without any separator. When a namespace is not declared, 189 the name and prefix will be passed through without expansion. */ 190 191 XMLPARSEAPI(XML_Parser) 192 XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator); 188 193 189 194 … … 198 203 */ 199 204 200 XML_Parser XMLPARSEAPI XML_ParserCreate_MM(const XML_Char *encoding, 205 XMLPARSEAPI(XML_Parser) 206 XML_ParserCreate_MM(const XML_Char *encoding, 201 207 const XML_Memory_Handling_Suite *memsuite, 202 208 const XML_Char *namespaceSeparator); … … 205 211 names and values are 0 terminated. */ 206 212 207 typedef void (* EXPATENTRYXML_StartElementHandler)(void *userData,208 209 210 211 typedef void (* EXPATENTRYXML_EndElementHandler)(void *userData,212 213 typedef void (*XML_StartElementHandler)(void *userData, 214 const XML_Char *name, 215 const XML_Char **atts); 216 217 typedef void (*XML_EndElementHandler)(void *userData, 218 const XML_Char *name); 213 219 214 220 215 221 /* s is not 0 terminated. */ 216 typedef void (* EXPATENTRYXML_CharacterDataHandler)(void *userData,217 218 222 typedef void (*XML_CharacterDataHandler)(void *userData, 223 const XML_Char *s, 224 int len); 219 225 220 226 /* target and data are 0 terminated */ 221 typedef void (* EXPATENTRYXML_ProcessingInstructionHandler)(void *userData,222 223 227 typedef void (*XML_ProcessingInstructionHandler)(void *userData, 228 const XML_Char *target, 229 const XML_Char *data); 224 230 225 231 /* data is 0 terminated */ 226 typedef void (* EXPATENTRYXML_CommentHandler)(void *userData, const XML_Char *data);227 228 typedef void (* EXPATENTRYXML_StartCdataSectionHandler)(void *userData);229 typedef void (* EXPATENTRYXML_EndCdataSectionHandler)(void *userData);232 typedef void (*XML_CommentHandler)(void *userData, const XML_Char *data); 233 234 typedef void (*XML_StartCdataSectionHandler)(void *userData); 235 typedef void (*XML_EndCdataSectionHandler)(void *userData); 230 236 231 237 /* This is called for any characters in the XML document for … … 242 248 multiple calls. */ 243 249 244 typedef void (* EXPATENTRYXML_DefaultHandler)(void *userData,245 246 250 typedef void (*XML_DefaultHandler)(void *userData, 251 const XML_Char *s, 252 int len); 247 253 248 254 /* This is called for the start of the DOCTYPE declaration, before 249 255 any DTD or internal subset is parsed. */ 250 256 251 typedef void (* EXPATENTRYXML_StartDoctypeDeclHandler)(void *userData,252 253 254 255 257 typedef void (*XML_StartDoctypeDeclHandler)(void *userData, 258 const XML_Char *doctypeName, 259 const XML_Char *sysid, 260 const XML_Char *pubid, 261 int has_internal_subset); 256 262 257 263 /* This is called for the start of the DOCTYPE declaration when the 258 264 closing > is encountered, but after processing any external subset. */ 259 typedef void (* EXPATENTRYXML_EndDoctypeDeclHandler)(void *userData);265 typedef void (*XML_EndDoctypeDeclHandler)(void *userData); 260 266 261 267 /* This is called for entity declarations. The is_parameter_entity … … 275 281 */ 276 282 277 typedef void (* EXPATENTRY XML_EntityDeclHandler)(void *userData, 278 const XML_Char *entityName, 279 int is_parameter_entity, 280 const XML_Char *value, 281 int value_length, 282 const XML_Char *base, 283 const XML_Char *systemId, 284 const XML_Char *publicId, 285 const XML_Char *notationName); 286 287 void XMLPARSEAPI XML_SetEntityDeclHandler(XML_Parser parser, 288 XML_EntityDeclHandler handler); 283 typedef void (*XML_EntityDeclHandler) (void *userData, 284 const XML_Char *entityName, 285 int is_parameter_entity, 286 const XML_Char *value, 287 int value_length, 288 const XML_Char *base, 289 const XML_Char *systemId, 290 const XML_Char *publicId, 291 const XML_Char *notationName); 292 293 XMLPARSEAPI(void) 294 XML_SetEntityDeclHandler(XML_Parser parser, 295 XML_EntityDeclHandler handler); 289 296 290 297 /* OBSOLETE -- OBSOLETE -- OBSOLETE … … 296 303 The other arguments may be. */ 297 304 298 typedef void (* EXPATENTRYXML_UnparsedEntityDeclHandler)(void *userData,299 const XML_Char *entityName,300 const XML_Char *base,301 const XML_Char *systemId,302 const XML_Char *publicId,303 const XML_Char *notationName);305 typedef void (*XML_UnparsedEntityDeclHandler)(void *userData, 306 const XML_Char *entityName, 307 const XML_Char *base, 308 const XML_Char *systemId, 309 const XML_Char *publicId, 310 const XML_Char *notationName); 304 311 305 312 /* This is called for a declaration of notation. … … 307 314 The notationName will never be null. The other arguments can be. */ 308 315 309 typedef void (* EXPATENTRYXML_NotationDeclHandler)(void *userData,310 const XML_Char *notationName,311 const XML_Char *base,312 const XML_Char *systemId,313 const XML_Char *publicId);316 typedef void (*XML_NotationDeclHandler)(void *userData, 317 const XML_Char *notationName, 318 const XML_Char *base, 319 const XML_Char *systemId, 320 const XML_Char *publicId); 314 321 315 322 /* When namespace processing is enabled, these are called once for … … 319 326 For an xmlns="" attribute, uri will be null. */ 320 327 321 typedef void (* EXPATENTRYXML_StartNamespaceDeclHandler)(void *userData,322 const XML_Char *prefix,323 const XML_Char *uri);324 325 typedef void (* EXPATENTRYXML_EndNamespaceDeclHandler)(void *userData,326 const XML_Char *prefix);328 typedef void (*XML_StartNamespaceDeclHandler)(void *userData, 329 const XML_Char *prefix, 330 const XML_Char *uri); 331 332 typedef void (*XML_EndNamespaceDeclHandler)(void *userData, 333 const XML_Char *prefix); 327 334 328 335 /* This is called if the document is not standalone (it has an … … 332 339 ERROR_EXPAT_NOT_STANDALONE error. */ 333 340 334 typedef int (* EXPATENTRYXML_NotStandaloneHandler)(void *userData);341 typedef int (*XML_NotStandaloneHandler)(void *userData); 335 342 336 343 /* This is called for a reference to an external parsed general entity. … … 340 347 The parser argument is the parser parsing the entity containing the reference; 341 348 it can be passed as the parser argument to XML_ExternalEntityParserCreate. 342 The systemId argument is the system identifier as specified in the entity declaration;343 it will not be null.349 The systemId argument is the system identifier as specified in the entity 350 declaration; it will not be null. 344 351 The base argument is the system identifier that should be used as the base for 345 352 resolving systemId if systemId was relative; this is set by XML_SetBase; 346 353 it may be null. 347 The publicId argument is the public identifier as specified in the entity declaration,348 or null if none was specified; the whitespace in the public identifier 349 will have been normalized as required by the XML spec.354 The publicId argument is the public identifier as specified in the entity 355 declaration, or null if none was specified; the whitespace in the public 356 identifier will have been normalized as required by the XML spec. 350 357 The context argument specifies the parsing context in the format 351 358 expected by the context argument to … … 354 361 The handler should return 0 if processing should not continue because of 355 362 a fatal error in the handling of the external entity. 356 In this case the calling parser will return an ERROR_EXPAT_EXTERNAL_ENTITY_HANDLING 357 error. 358 Note that unlike other handlers the first argument is the parser, not userData. */ 359 360 typedef int (* EXPATENTRY XML_ExternalEntityRefHandler)(XML_Parser parser, 361 const XML_Char *context, 362 const XML_Char *base, 363 const XML_Char *systemId, 364 const XML_Char *publicId); 363 In this case the calling parser will return an 364 ERROR_EXPAT_EXTERNAL_ENTITY_HANDLING error. 365 Note that unlike other handlers the first argument is the parser, not 366 userData. */ 367 368 typedef int (*XML_ExternalEntityRefHandler)(void *userData, // added V0.9.14 (2001-08-09) [umoeller] 369 XML_Parser parser, 370 const XML_Char *context, 371 const XML_Char *base, 372 const XML_Char *systemId, 373 const XML_Char *publicId); 365 374 366 375 /* This structure is filled in by the XML_UnknownEncodingHandler … … 369 378 The map[b] member gives information about byte sequences 370 379 whose first byte is b. 371 If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar value c. 380 If map[b] is c where c is >= 0, then b by itself encodes the Unicode scalar 381 value c. 372 382 If map[b] is -1, then the byte sequence is malformed. 373 383 If map[b] is -n, where n >= 2, then b is the first byte of an n-byte … … 397 407 2. No character may require more than 4 bytes to encode. 398 408 399 3. All characters encoded must have Unicode scalar values <= 0xFFFF, 400 (ie characters that would be encoded by surrogates in UTF-16 401 a re not allowed). Note that this restriction doesn't apply to402 the built-insupport for UTF-8 and UTF-16.409 3. All characters encoded must have Unicode scalar values <= 0xFFFF, (i.e., 410 characters that would be encoded by surrogates in UTF-16 are not 411 allowed). Note that this restriction doesn't apply to the built-in 412 support for UTF-8 and UTF-16. 403 413 404 414 4. No Unicode character may be encoded by more than one distinct sequence 405 415 of bytes. */ 406 416 407 /* 408 *@@ XML_Encoding: 409 * structure passed with the UnknownEncodingHandler (see 410 * XML_SetUnknownEncodingHandler). 411 * 412 * The map array contains information for every possible 413 * possible leading byte in a byte sequence. 414 * 415 * -- If the corresponding value is >= 0, then it's a single byte 416 * sequence and the byte encodes that Unicode value. 417 * 418 * -- If the value is -1, then that byte is invalid as the 419 * initial byte in a sequence. 420 * 421 * -- If the value is -2, -3, or -4, then the byte is the beginning 422 * of a 2, 3, or 4 byte sequence, respectively. The actual 423 * conversion is then accomplished by a call to the function 424 * pointed at by "convert". This function should return the 425 * Unicode scalar value for the sequence or -1 if the sequence 426 * is malformed. 427 * 428 * The "convert" pointer may be null if there are only 429 * single byte codes. The data parameter passed to the 430 * convert function is the data pointer from 431 * XML_Encoding. The string s is NOT null terminated and 432 * points at the sequence of bytes to be converted. 433 * 434 * The function pointed at by "release" is called by the parser 435 * when it is finished with the encoding. It may be null. 436 */ 437 438 typedef struct _XML_Encoding 439 { 440 int map[256]; 441 void *data; 442 int (* EXPATENTRY convert)(void *data, const char *s); 443 void (* EXPATENTRY release)(void *data); 417 typedef struct { 418 int map[256]; 419 void *data; 420 int (*convert)(void *data, const char *s); 421 void (*release)(void *data); 444 422 } XML_Encoding; 445 423 446 typedef int (* EXPATENTRY XML_UnknownEncodingHandler)(void *encodingHandlerData, 447 const XML_Char *name, 448 XML_Encoding *info); 449 450 void XMLPARSEAPI XML_SetElementHandler(XML_Parser parser, 451 XML_StartElementHandler start, 452 XML_EndElementHandler end); 453 454 void XMLPARSEAPI XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler); 455 456 void XMLPARSEAPI XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler); 457 458 void XMLPARSEAPI XML_SetCharacterDataHandler(XML_Parser parser, 459 XML_CharacterDataHandler handler); 460 461 void XMLPARSEAPI XML_SetProcessingInstructionHandler(XML_Parser parser, 462 XML_ProcessingInstructionHandler handler); 463 void XMLPARSEAPI XML_SetCommentHandler(XML_Parser parser, 464 XML_CommentHandler handler); 465 466 void XMLPARSEAPI XML_SetCdataSectionHandler(XML_Parser parser, 467 XML_StartCdataSectionHandler start, 468 XML_EndCdataSectionHandler end); 469 470 void XMLPARSEAPI XML_SetStartCdataSectionHandler(XML_Parser parser, 424 /* This is called for an encoding that is unknown to the parser. 425 The encodingHandlerData argument is that which was passed as the 426 second argument to XML_SetUnknownEncodingHandler. 427 The name argument gives the name of the encoding as specified in 428 the encoding declaration. 429 If the callback can provide information about the encoding, 430 it must fill in the XML_Encoding structure, and return 1. 431 Otherwise it must return 0. 432 If info does not describe a suitable encoding, 433 then the parser will return an XML_UNKNOWN_ENCODING error. */ 434 435 typedef int (*XML_UnknownEncodingHandler)(void *encodingHandlerData, 436 const XML_Char *name, 437 XML_Encoding *info); 438 439 XMLPARSEAPI(void) 440 XML_SetElementHandler(XML_Parser parser, 441 XML_StartElementHandler start, 442 XML_EndElementHandler end); 443 444 XMLPARSEAPI(void) 445 XML_SetStartElementHandler(XML_Parser, XML_StartElementHandler); 446 447 XMLPARSEAPI(void) 448 XML_SetEndElementHandler(XML_Parser, XML_EndElementHandler); 449 450 XMLPARSEAPI(void) 451 XML_SetCharacterDataHandler(XML_Parser parser, 452 XML_CharacterDataHandler handler); 453 454 XMLPARSEAPI(void) 455 XML_SetProcessingInstructionHandler(XML_Parser parser, 456 XML_ProcessingInstructionHandler handler); 457 XMLPARSEAPI(void) 458 XML_SetCommentHandler(XML_Parser parser, 459 XML_CommentHandler handler); 460 461 XMLPARSEAPI(void) 462 XML_SetCdataSectionHandler(XML_Parser parser, 463 XML_StartCdataSectionHandler start, 464 XML_EndCdataSectionHandler end); 465 466 XMLPARSEAPI(void) 467 XML_SetStartCdataSectionHandler(XML_Parser parser, 471 468 XML_StartCdataSectionHandler start); 472 469 473 void XMLPARSEAPI XML_SetEndCdataSectionHandler(XML_Parser parser, 470 XMLPARSEAPI(void) 471 XML_SetEndCdataSectionHandler(XML_Parser parser, 474 472 XML_EndCdataSectionHandler end); 475 473 476 /* This sets the default handler and also inhibits expansion of internal entities. 477 The entity reference will be passed to the default handler. */ 478 479 void XMLPARSEAPI XML_SetDefaultHandler(XML_Parser parser, 474 /* This sets the default handler and also inhibits expansion of 475 internal entities. The entity reference will be passed to the default 476 handler. */ 477 478 XMLPARSEAPI(void) 479 XML_SetDefaultHandler(XML_Parser parser, 480 480 XML_DefaultHandler handler); 481 481 482 /* This sets the default handler but does not inhibit expansion of internal entities. 483 The entity reference will not be passed to the default handler. */ 484 485 void XMLPARSEAPI XML_SetDefaultHandlerExpand(XML_Parser parser, 482 /* This sets the default handler but does not inhibit expansion of 483 internal entities. The entity reference will not be passed to the 484 default handler. */ 485 486 XMLPARSEAPI(void) 487 XML_SetDefaultHandlerExpand(XML_Parser parser, 486 488 XML_DefaultHandler handler); 487 489 488 void XMLPARSEAPI XML_SetDoctypeDeclHandler(XML_Parser parser, 490 XMLPARSEAPI(void) 491 XML_SetDoctypeDeclHandler(XML_Parser parser, 489 492 XML_StartDoctypeDeclHandler start, 490 493 XML_EndDoctypeDeclHandler end); 491 494 492 void XMLPARSEAPI XML_SetStartDoctypeDeclHandler(XML_Parser parser, 495 XMLPARSEAPI(void) 496 XML_SetStartDoctypeDeclHandler(XML_Parser parser, 493 497 XML_StartDoctypeDeclHandler start); 494 498 495 void XMLPARSEAPI XML_SetEndDoctypeDeclHandler(XML_Parser parser, 499 XMLPARSEAPI(void) 500 XML_SetEndDoctypeDeclHandler(XML_Parser parser, 496 501 XML_EndDoctypeDeclHandler end); 497 502 498 void XMLPARSEAPI XML_SetUnparsedEntityDeclHandler(XML_Parser parser, 503 XMLPARSEAPI(void) 504 XML_SetUnparsedEntityDeclHandler(XML_Parser parser, 499 505 XML_UnparsedEntityDeclHandler handler); 500 506 501 void XMLPARSEAPI XML_SetNotationDeclHandler(XML_Parser parser, 507 XMLPARSEAPI(void) 508 XML_SetNotationDeclHandler(XML_Parser parser, 502 509 XML_NotationDeclHandler handler); 503 510 504 void XMLPARSEAPI XML_SetNamespaceDeclHandler(XML_Parser parser, 511 XMLPARSEAPI(void) 512 XML_SetNamespaceDeclHandler(XML_Parser parser, 505 513 XML_StartNamespaceDeclHandler start, 506 514 XML_EndNamespaceDeclHandler end); 507 515 508 void XMLPARSEAPI XML_SetStartNamespaceDeclHandler(XML_Parser parser, 516 XMLPARSEAPI(void) 517 XML_SetStartNamespaceDeclHandler(XML_Parser parser, 509 518 XML_StartNamespaceDeclHandler start); 510 519 511 void XMLPARSEAPI XML_SetEndNamespaceDeclHandler(XML_Parser parser, 520 XMLPARSEAPI(void) 521 XML_SetEndNamespaceDeclHandler(XML_Parser parser, 512 522 XML_EndNamespaceDeclHandler end); 513 523 514 void XMLPARSEAPI XML_SetNotStandaloneHandler(XML_Parser parser, 524 XMLPARSEAPI(void) 525 XML_SetNotStandaloneHandler(XML_Parser parser, 515 526 XML_NotStandaloneHandler handler); 516 527 517 void XMLPARSEAPI XML_SetExternalEntityRefHandler(XML_Parser parser, 528 XMLPARSEAPI(void) 529 XML_SetExternalEntityRefHandler(XML_Parser parser, 518 530 XML_ExternalEntityRefHandler handler); 519 531 … … 521 533 as the first argument to the external entity ref handler instead 522 534 of the parser object. */ 523 void XMLPARSEAPI XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg); 524 525 void XMLPARSEAPI XML_SetUnknownEncodingHandler(XML_Parser parser, 535 XMLPARSEAPI(void) 536 XML_SetExternalEntityRefHandlerArg(XML_Parser, void *arg); 537 538 XMLPARSEAPI(void) 539 XML_SetUnknownEncodingHandler(XML_Parser parser, 526 540 XML_UnknownEncodingHandler handler, 527 541 void *encodingHandlerData); … … 530 544 processing instruction or character data. It causes the corresponding 531 545 markup to be passed to the default handler. */ 532 void XML_DefaultCurrent(XML_Parser parser); 546 XMLPARSEAPI(void) 547 XML_DefaultCurrent(XML_Parser parser); 533 548 534 549 /* If do_nst is non-zero, and namespace processing is in effect, and … … 543 558 */ 544 559 545 void XMLPARSEAPI XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); 560 XMLPARSEAPI(void) 561 XML_SetReturnNSTriplet(XML_Parser parser, int do_nst); 546 562 547 563 /* This value is passed as the userData argument to callbacks. */ 548 void XMLPARSEAPI XML_SetUserData(XML_Parser parser, void *userData); 564 XMLPARSEAPI(void) 565 XML_SetUserData(XML_Parser parser, void *userData); 549 566 550 567 /* Returns the last value set by XML_SetUserData or null. */ … … 555 572 or XML_ParseBuffer. */ 556 573 557 int XMLPARSEAPI XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); 574 XMLPARSEAPI(int) 575 XML_SetEncoding(XML_Parser parser, const XML_Char *encoding); 558 576 559 577 /* If this function is called, then the parser will be passed … … 561 579 The userData will still be accessible using XML_GetUserData. */ 562 580 563 void XMLPARSEAPI XML_UseParserAsHandlerArg(XML_Parser parser); 564 565 /* Sets the base to be used for resolving relative URIs in system identifiers in 566 declarations. Resolving relative identifiers is left to the application: 567 this value will be passed through as the base argument to the 568 XML_ExternalEntityRefHandler, XML_NotationDeclHandler 581 XMLPARSEAPI(void) 582 XML_UseParserAsHandlerArg(XML_Parser parser); 583 584 /* Sets the base to be used for resolving relative URIs in system 585 identifiers in declarations. Resolving relative identifiers is left 586 to the application: this value will be passed through as the base 587 argument to the XML_ExternalEntityRefHandler, XML_NotationDeclHandler 569 588 and XML_UnparsedEntityDeclHandler. The base argument will be copied. 570 589 Returns zero if out of memory, non-zero otherwise. */ 571 590 572 int XMLPARSEAPI XML_SetBase(XML_Parser parser, const XML_Char *base); 573 574 const XML_Char XMLPARSEAPI * XML_GetBase(XML_Parser parser); 591 XMLPARSEAPI(int) 592 XML_SetBase(XML_Parser parser, const XML_Char *base); 593 594 XMLPARSEAPI(const XML_Char *) 595 XML_GetBase(XML_Parser parser); 575 596 576 597 /* Returns the number of the attribute/value pairs passed in last call … … 580 601 XML_StartElementHandler. */ 581 602 582 int XMLPARSEAPI XML_GetSpecifiedAttributeCount(XML_Parser parser); 603 XMLPARSEAPI(int) 604 XML_GetSpecifiedAttributeCount(XML_Parser parser); 583 605 584 606 /* Returns the index of the ID attribute passed in the last call to … … 587 609 into the atts array passed to the XML_StartElementHandler. */ 588 610 589 int XMLPARSEAPI XML_GetIdAttributeIndex(XML_Parser parser); 611 XMLPARSEAPI(int) 612 XML_GetIdAttributeIndex(XML_Parser parser); 590 613 591 614 /* Parses some input. Returns 0 if a fatal error is detected. 592 615 The last call to XML_Parse must have isFinal true; 593 616 len may be zero for this call (or any other). */ 594 int XMLPARSEAPI XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); 595 596 void XMLPARSEAPI * XML_GetBuffer(XML_Parser parser, int len); 597 598 int XMLPARSEAPI XML_ParseBuffer(XML_Parser parser, int len, int isFinal); 599 600 /* Creates an XML_Parser object that can parse an external general entity; 601 context is a '\0'-terminated string specifying the parse context; 602 encoding is a '\0'-terminated string giving the name of the externally specified encoding, 603 or null if there is no externally specified encoding. 604 The context string consists of a sequence of tokens separated by formfeeds (\f); 605 a token consisting of a name specifies that the general entity of the name 606 is open; a token of the form prefix=uri specifies the namespace for a particular 607 prefix; a token of the form =uri specifies the default namespace. 608 This can be called at any point after the first call to an ExternalEntityRefHandler 609 so longer as the parser has not yet been freed. 610 The new parser is completely independent and may safely be used in a separate thread. 611 The handlers and userData are initialized from the parser argument. 612 Returns 0 if out of memory. Otherwise returns a new XML_Parser object. */ 613 XML_Parser XMLPARSEAPI XML_ExternalEntityParserCreate(XML_Parser parser, 617 XMLPARSEAPI(int) 618 XML_Parse(XML_Parser parser, const char *s, int len, int isFinal); 619 620 XMLPARSEAPI(void *) 621 XML_GetBuffer(XML_Parser parser, int len); 622 623 XMLPARSEAPI(int) 624 XML_ParseBuffer(XML_Parser parser, int len, int isFinal); 625 626 /* Creates an XML_Parser object that can parse an external general 627 entity; context is a '\0'-terminated string specifying the parse 628 context; encoding is a '\0'-terminated string giving the name of the 629 externally specified encoding, or null if there is no externally 630 specified encoding. The context string consists of a sequence of 631 tokens separated by formfeeds (\f); a token consisting of a name 632 specifies that the general entity of the name is open; a token of the 633 form prefix=uri specifies the namespace for a particular prefix; a 634 token of the form =uri specifies the default namespace. This can be 635 called at any point after the first call to an 636 ExternalEntityRefHandler so longer as the parser has not yet been 637 freed. The new parser is completely independent and may safely be 638 used in a separate thread. The handlers and userData are initialized 639 from the parser argument. Returns 0 if out of memory. Otherwise 640 returns a new XML_Parser object. */ 641 XMLPARSEAPI(XML_Parser) 642 XML_ExternalEntityParserCreate(XML_Parser parser, 614 643 const XML_Char *context, 615 644 const XML_Char *encoding); … … 621 650 }; 622 651 623 int XMLPARSEAPI XML_SetParamEntityParsing(XML_Parser parser, 624 enum XML_ParamEntityParsing parsing); 652 /* Controls parsing of parameter entities (including the external DTD 653 subset). If parsing of parameter entities is enabled, then references 654 to external parameter entities (including the external DTD subset) 655 will be passed to the handler set with 656 XML_SetExternalEntityRefHandler. The context passed will be 0. 657 Unlike external general entities, external parameter entities can only 658 be parsed synchronously. If the external parameter entity is to be 659 parsed, it must be parsed during the call to the external entity ref 660 handler: the complete sequence of XML_ExternalEntityParserCreate, 661 XML_Parse/XML_ParseBuffer and XML_ParserFree calls must be made during 662 this call. After XML_ExternalEntityParserCreate has been called to 663 create the parser for the external parameter entity (context must be 0 664 for this call), it is illegal to make any calls on the old parser 665 until XML_ParserFree has been called on the newly created parser. If 666 the library has been compiled without support for parameter entity 667 parsing (ie without XML_DTD being defined), then 668 XML_SetParamEntityParsing will return 0 if parsing of parameter 669 entities is requested; otherwise it will return non-zero. */ 670 671 XMLPARSEAPI(int) 672 XML_SetParamEntityParsing(XML_Parser parser, 673 enum XML_ParamEntityParsing parsing); 674 675 /* XMLERROR { 676 ERROR_EXPAT_NONE, 677 ERROR_EXPAT_NO_MEMORY, 678 ERROR_EXPAT_SYNTAX, 679 ERROR_EXPAT_NO_ELEMENTS, 680 ERROR_EXPAT_INVALID_TOKEN, 681 ERROR_EXPAT_UNCLOSED_TOKEN, 682 ERROR_EXPAT_PARTIAL_CHAR, 683 ERROR_EXPAT_TAG_MISMATCH, 684 ERROR_EXPAT_DUPLICATE_ATTRIBUTE, 685 ERROR_EXPAT_JUNK_AFTER_DOC_ELEMENT, 686 ERROR_EXPAT_PARAM_ENTITY_REF, 687 ERROR_EXPAT_UNDEFINED_ENTITY, 688 ERROR_EXPAT_RECURSIVE_ENTITY_REF, 689 ERROR_EXPAT_ASYNC_ENTITY, 690 ERROR_EXPAT_BAD_CHAR_REF, 691 ERROR_EXPAT_BINARY_ENTITY_REF, 692 ERROR_EXPAT_ATTRIBUTE_EXTERNAL_ENTITY_REF, 693 ERROR_EXPAT_MISPLACED_XML_PI, 694 ERROR_EXPAT_UNKNOWN_ENCODING, 695 ERROR_EXPAT_INCORRECT_ENCODING, 696 ERROR_EXPAT_UNCLOSED_CDATA_SECTION, 697 ERROR_EXPAT_EXTERNAL_ENTITY_HANDLING, 698 ERROR_EXPAT_NOT_STANDALONE, 699 ERROR_EXPAT_UNEXPECTED_STATE 700 }; */ 625 701 626 702 #define ERROR_XML_FIRST 40000 // first error code used … … 656 732 returns information about the error. */ 657 733 658 XMLERROR XMLPARSEAPI XML_GetErrorCode(XML_Parser parser); 734 XMLPARSEAPI(XMLERROR) 735 XML_GetErrorCode(XML_Parser parser); 659 736 660 737 /* These functions return information about the current parse location. … … 666 743 of the sequence of characters that generated the event. */ 667 744 668 int XMLPARSEAPIXML_GetCurrentLineNumber(XML_Parser parser);669 int XMLPARSEAPIXML_GetCurrentColumnNumber(XML_Parser parser);670 long XMLPARSEAPIXML_GetCurrentByteIndex(XML_Parser parser);745 XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser); 746 XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser); 747 XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser); 671 748 672 749 /* Return the number of bytes in the current event. 673 750 Returns 0 if the event is in an internal entity. */ 674 751 675 int XMLPARSEAPI XML_GetCurrentByteCount(XML_Parser parser); 752 XMLPARSEAPI(int) 753 XML_GetCurrentByteCount(XML_Parser parser); 676 754 677 755 /* If XML_CONTEXT_BYTES is defined, returns the input buffer, sets … … 679 757 of the current parse position, and sets the integer pointed to by size 680 758 to the size of this buffer (the number of input bytes). Otherwise 681 returns a null pointer. Also returns a null pointer if a parse isn't active. 759 returns a null pointer. Also returns a null pointer if a parse isn't 760 active. 682 761 683 762 NOTE: The character pointer returned should not be used outside 684 763 the handler that makes the call. */ 685 764 686 const char XMLPARSEAPI * XML_GetInputContext(XML_Parser parser, 765 XMLPARSEAPI(const char *) 766 XML_GetInputContext(XML_Parser parser, 687 767 int *offset, 688 768 int *size); … … 694 774 695 775 /* Frees memory used by the parser. */ 696 void XMLPARSEAPI XML_ParserFree(XML_Parser parser); 776 XMLPARSEAPI(void) 777 XML_ParserFree(XML_Parser parser); 697 778 698 779 /* Returns a string describing the error. */ 699 // const XML_LChar XMLPARSEAPI * XML_ErrorString(int code); 700 // moved this to xml.c V0.9.9 (2001-02-16) [umoeller] 780 XMLPARSEAPI(const XML_LChar *) 781 XML_ErrorString(int code); 701 782 702 783 /* Return a string containing the version number of this expat */ 703 const XML_LChar XMLPARSEAPI *XML_ExpatVersion(void); 784 XMLPARSEAPI(const XML_LChar *) 785 XML_ExpatVersion(void); 786 787 typedef struct { 788 int major; 789 int minor; 790 int micro; 791 } XML_Expat_Version; 792 793 /* Return an XML_Expat_Version structure containing numeric version 794 number information for this version of expat */ 795 796 XMLPARSEAPI(XML_Expat_Version) 797 XML_ExpatVersionInfo(void); 798 799 #define XML_MAJOR_VERSION @EXPAT_MAJOR_VERSION@ 800 #define XML_MINOR_VERSION @EXPAT_MINOR_VERSION@ 801 #define XML_MICRO_VERSION @EXPAT_EDIT@ 704 802 705 803 #ifdef __cplusplus -
trunk/include/expat/expat_setup.h
r38 r97 20 20 21 21 #define XML_DTD 1 22 #define XML_BYTE_ORDER 12 23 #define XML_CONTEXT_BYTES 1024 22 24 23 25 #endif -
trunk/include/expat/xmlrole.h
r38 r97 6 6 #ifndef XmlRole_INCLUDED 7 7 #define XmlRole_INCLUDED 1 8 9 #include "expat\expat_setup.h"10 // V0.9.9 (2001-02-10) [umoeller]11 // to save the app from having to include this as well12 8 13 9 #include "expat\xmltok.h" … … 78 74 79 75 typedef struct prolog_state { 80 int (* EXPATENTRYhandler)(struct prolog_state *state,81 82 83 84 76 int (*handler)(struct prolog_state *state, 77 int tok, 78 const char *ptr, 79 const char *end, 80 const ENCODING *enc); 85 81 unsigned level; 86 82 #ifdef XML_DTD -
trunk/include/expat/xmltok.h
r38 r97 6 6 #ifndef XmlTok_INCLUDED 7 7 #define XmlTok_INCLUDED 1 8 9 #include "expat\expat_setup.h"10 // V0.9.9 (2001-02-10) [umoeller]11 // to save the app from having to include this as well12 8 13 9 #ifdef __cplusplus … … 21 17 #define XML_TOK_NONE -4 /* The string to be scanned is empty */ 22 18 #define XML_TOK_TRAILING_CR -3 /* A CR at the end of the scan; 23 might be part of CRLF sequence */ 19 might be part of CRLF sequence */ 24 20 #define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */ 25 21 #define XML_TOK_PARTIAL -1 /* only part of a token */ … … 116 112 } POSITION; 117 113 118 typedef struct 119 { 120 const char *name; 121 const char *valuePtr; 122 const char *valueEnd; 123 char normalized; 124 } ATTRIBUTE, *PATTRIBUTE; 114 typedef struct { 115 const char *name; 116 const char *valuePtr; 117 const char *valueEnd; 118 char normalized; 119 } ATTRIBUTE; 125 120 126 121 struct encoding; 127 typedef struct encoding ENCODING, *PENCODING; 128 129 typedef int EXPATENTRY SCANNERFUNC(const ENCODING *, 130 const char *, 131 const char *, 132 const char **); 133 typedef SCANNERFUNC *PSCANNERFUNC; 134 135 struct encoding 136 { 137 PSCANNERFUNC scanners[XML_N_STATES]; 138 PSCANNERFUNC literalScanners[XML_N_LITERAL_TYPES]; 139 int (* EXPATENTRY sameName)(const ENCODING *, 140 const char *, 141 const char *); 142 int (* EXPATENTRY nameMatchesAscii)(const ENCODING *, 143 const char *, 144 const char *, 145 const char *); 146 int (* EXPATENTRY nameLength)(const ENCODING *, 147 const char *); 148 const char *(*skipS)(const ENCODING *, 149 const char *); 150 int (* EXPATENTRY getAtts)(const ENCODING *enc, 151 const char *ptr, 152 int attsMax, 153 ATTRIBUTE *atts); 154 int (* EXPATENTRY charRefNumber)(const ENCODING *enc, 155 const char *ptr); 156 int (* EXPATENTRY predefinedEntityName)(const ENCODING *, 157 const char *, 158 const char *); 159 void (* EXPATENTRY updatePosition)(const ENCODING *, 160 const char *ptr, 161 const char *end, 162 POSITION *); 163 int (* EXPATENTRY isPublicId)(const ENCODING *enc, 164 const char *ptr, 165 const char *end, 166 const char **badPtr); 167 void (* EXPATENTRY utf8Convert)(const ENCODING *enc, 168 const char **fromP, 169 const char *fromLim, 170 char **toP, 171 const char *toLim); 172 void (* EXPATENTRY utf16Convert)(const ENCODING *enc, 173 const char **fromP, 174 const char *fromLim, 175 unsigned short **toP, 176 const unsigned short *toLim); 122 typedef struct encoding ENCODING; 123 124 struct encoding { 125 int (*scanners[XML_N_STATES])(const ENCODING *, 126 const char *, 127 const char *, 128 const char **); 129 int (*literalScanners[XML_N_LITERAL_TYPES])(const ENCODING *, 130 const char *, 131 const char *, 132 const char **); 133 int (*sameName)(const ENCODING *, 134 const char *, const char *); 135 int (*nameMatchesAscii)(const ENCODING *, 136 const char *, const char *, const char *); 137 int (*nameLength)(const ENCODING *, const char *); 138 const char *(*skipS)(const ENCODING *, const char *); 139 int (*getAtts)(const ENCODING *enc, const char *ptr, 140 int attsMax, ATTRIBUTE *atts); 141 int (*charRefNumber)(const ENCODING *enc, const char *ptr); 142 int (*predefinedEntityName)(const ENCODING *, const char *, const char *); 143 void (*updatePosition)(const ENCODING *, 144 const char *ptr, 145 const char *end, 146 POSITION *); 147 int (*isPublicId)(const ENCODING *enc, const char *ptr, const char *end, 148 const char **badPtr); 149 void (*utf8Convert)(const ENCODING *enc, 150 const char **fromP, 151 const char *fromLim, 152 char **toP, 153 const char *toLim); 154 void (*utf16Convert)(const ENCODING *enc, 155 const char **fromP, 156 const char *fromLim, 157 unsigned short **toP, 158 const unsigned short *toLim); 177 159 int minBytesPerChar; 178 160 char isUtf8; … … 221 203 222 204 /* This is used for performing a 2nd-level tokenization on 223 the content of a literal that has already been returned by XmlTok. */ 205 the content of a literal that has already been returned by XmlTok. */ 224 206 225 207 #define XmlLiteralTok(enc, literalType, ptr, end, nextTokPtr) \ … … 270 252 271 253 int XmlParseXmlDecl(int isGeneralTextEntity, 272 273 274 275 276 277 278 279 280 254 const ENCODING *enc, 255 const char *ptr, 256 const char *end, 257 const char **badPtr, 258 const char **versionPtr, 259 const char **versionEndPtr, 260 const char **encodingNamePtr, 261 const ENCODING **namedEncodingPtr, 262 int *standalonePtr); 281 263 282 264 int XmlInitEncoding(INIT_ENCODING *, const ENCODING **, const char *name); … … 289 271 ENCODING * 290 272 XmlInitUnknownEncoding(void *mem, 291 292 293 273 int *table, 274 int (*conv)(void *userData, const char *p), 275 void *userData); 294 276 295 277 int XmlParseXmlDeclNS(int isGeneralTextEntity, 296 297 298 299 300 301 302 303 304 278 const ENCODING *enc, 279 const char *ptr, 280 const char *end, 281 const char **badPtr, 282 const char **versionPtr, 283 const char **versionEndPtr, 284 const char **encodingNamePtr, 285 const ENCODING **namedEncodingPtr, 286 int *standalonePtr); 305 287 int XmlInitEncodingNS(INIT_ENCODING *, const ENCODING **, const char *name); 306 288 const ENCODING *XmlGetUtf8InternalEncodingNS(void); … … 308 290 ENCODING * 309 291 XmlInitUnknownEncodingNS(void *mem, 310 311 312 292 int *table, 293 int (*conv)(void *userData, const char *p), 294 void *userData); 313 295 #ifdef __cplusplus 314 296 } -
trunk/include/helpers/xml.h
r84 r97 85 85 #define ERROR_DOM_DUPLICATE_ATTRIBUTE (ERROR_XML_FIRST + 43) 86 86 87 // @@@todo these88 87 #define ERROR_DOM_VALIDATE_INVALID_ELEMENT (ERROR_XML_FIRST + 44) 89 88 #define ERROR_DOM_ELEMENT_DECL_OUTSIDE_DOCTYPE (ERROR_XML_FIRST + 45) 90 89 #define ERROR_DOM_ATTLIST_DECL_OUTSIDE_DOCTYPE (ERROR_XML_FIRST + 46) 90 91 #define ERROR_DOM_INCOMPLETE_ENCODING_MAP (ERROR_XML_FIRST + 47) 92 // callback to UnknownEncodingHandler has provided 93 // an incomplete encoding map V0.9.14 (2001-08-09) [umoeller] 94 95 #define ERROR_DOM_INVALID_EXTERNAL_HANDLER (ERROR_XML_FIRST + 48) 91 96 92 97 const char* xmlDescribeError(int code); … … 619 624 ********************************************************************/ 620 625 626 typedef struct _XMLDOM *PXMLDOM; 627 628 typedef int APIENTRY FNGETCPDATA(PXMLDOM pDom, ULONG ulCP, int *piMap); 629 typedef FNGETCPDATA *PFNGETCPDATA; 630 631 typedef APIRET APIENTRY FNEXTERNALHANDLER(PXMLDOM pDom, 632 XML_Parser *pSubParser, 633 const char *pcszSystemID, 634 const char *pcszPublicID); 635 typedef FNEXTERNALHANDLER *PFNEXTERNALHANDLER; 636 621 637 /* 622 638 *@@ XMLDOM: … … 638 654 // != NULL only if the document has a DOCTYPE 639 655 640 APIRET arcDOM; // validation errors etc. 641 BOOL fInvalid; // TRUE after validation failed 642 643 const char *pcszErrorDescription; 644 ULONG ulErrorLine; 645 ULONG ulErrorColumn; 646 PXSTRING pxstrFailingNode; // element or attribute name 656 // error handling 657 APIRET arcDOM; // validation errors etc.; 658 // if != 0, this has a detailed 659 // expat or DOM error code 660 BOOL fInvalid; // TRUE if validation failed 661 // (parser error otherwise) 662 663 const char *pcszErrorDescription; // error description 664 PXSTRING pxstrSystemID; // system ID of external entity 665 // where error occured, or NULL 666 // if in main document 667 ULONG ulErrorLine; // line where error occured 668 ULONG ulErrorColumn; // column where error occured 669 PXSTRING pxstrFailingNode; // element or attribute name 670 // or NULL 647 671 648 672 /* … … 650 674 */ 651 675 676 // params copied from xmlCreateDOM 677 ULONG flParserFlags; 678 PFNGETCPDATA pfnGetCPData; 679 PFNEXTERNALHANDLER pfnExternalHandler; 680 PVOID pvCallbackUser; 681 652 682 XML_Parser pParser; 653 683 // expat parser instance … … 662 692 // cache for attribute declarations according 663 693 // to attdecl element name 664 } XMLDOM , *PXMLDOM;694 } XMLDOM; 665 695 666 696 #define DF_PARSECOMMENTS 0x0001 667 697 #define DF_PARSEDTD 0x0002 668 698 #define DF_FAIL_IF_NO_DTD 0x0004 699 #define DF_DROP_WHITESPACE 0x0008 669 700 670 701 APIRET xmlCreateDOM(ULONG flParserFlags, 702 PFNGETCPDATA pfnGetCPData, 703 PFNEXTERNALHANDLER pfnExternalHandler, 704 PVOID pvCallbackUser, 671 705 PXMLDOM *ppDom); 672 706
Note:
See TracChangeset
for help on using the changeset viewer.