Hash :
11af4294
Author :
Date :
2003-08-21T10:39:13
make the deprecated interfaces log an error message to be sure it won't * SAX.c: make the deprecated interfaces log an error message to be sure it won't get used. Daniel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756
/*
* SAX.c : Old SAX v1 handlers to build a tree.
* Deprecated except for compatibility
*
* See Copyright for the status of this software.
*
* Daniel Veillard <daniel@veillard.com>
*/
#define IN_LIBXML
#include "libxml.h"
#include <stdlib.h>
#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/valid.h>
#include <libxml/entities.h>
#include <libxml/xmlerror.h>
#include <libxml/debugXML.h>
#include <libxml/xmlIO.h>
#include <libxml/SAX.h>
#include <libxml/uri.h>
#include <libxml/valid.h>
#include <libxml/HTMLtree.h>
#include <libxml/globals.h>
#include <libxml/SAX2.h>
/* #define DEBUG_SAX */
/* #define DEBUG_SAX_TREE */
static int deprecated_msg = 0;
#define DEPRECATED(n) \
if (deprecated_msg == 0) \
xmlGenericError(xmlGenericErrorContext, \
"Use of deprecated SAXv1 function %s\n", n); \
deprecated_msg++;
/**
* getPublicId:
* @ctx: the user data (XML parser context)
*
* Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
* DEPRECATED: use xmlSAX2GetPublicId()
*
* Returns a xmlChar *
*/
const xmlChar *
getPublicId(void *ctx)
{
DEPRECATED("getPublicId")
return(xmlSAX2GetPublicId(ctx));
}
/**
* getSystemId:
* @ctx: the user data (XML parser context)
*
* Provides the system ID, basically URL or filename e.g.
* http://www.sgmlsource.com/dtds/memo.dtd
* DEPRECATED: use xmlSAX2GetSystemId()
*
* Returns a xmlChar *
*/
const xmlChar *
getSystemId(void *ctx)
{
DEPRECATED("getSystemId")
return(xmlSAX2GetSystemId(ctx));
}
/**
* getLineNumber:
* @ctx: the user data (XML parser context)
*
* Provide the line number of the current parsing point.
* DEPRECATED: use xmlSAX2GetLineNumber()
*
* Returns an int
*/
int
getLineNumber(void *ctx)
{
DEPRECATED("getLineNumber")
return(xmlSAX2GetLineNumber(ctx));
}
/**
* getColumnNumber:
* @ctx: the user data (XML parser context)
*
* Provide the column number of the current parsing point.
* DEPRECATED: use xmlSAX2GetColumnNumber()
*
* Returns an int
*/
int
getColumnNumber(void *ctx)
{
DEPRECATED("getColumnNumber")
return(xmlSAX2GetColumnNumber(ctx));
}
/**
* isStandalone:
* @ctx: the user data (XML parser context)
*
* Is this document tagged standalone ?
* DEPRECATED: use xmlSAX2IsStandalone()
*
* Returns 1 if true
*/
int
isStandalone(void *ctx)
{
DEPRECATED("isStandalone")
return(xmlSAX2IsStandalone(ctx));
}
/**
* hasInternalSubset:
* @ctx: the user data (XML parser context)
*
* Does this document has an internal subset
* DEPRECATED: use xmlSAX2HasInternalSubset()
*
* Returns 1 if true
*/
int
hasInternalSubset(void *ctx)
{
DEPRECATED("hasInternalSubset")
return(xmlSAX2HasInternalSubset(ctx));
}
/**
* hasExternalSubset:
* @ctx: the user data (XML parser context)
*
* Does this document has an external subset
* DEPRECATED: use xmlSAX2HasExternalSubset()
*
* Returns 1 if true
*/
int
hasExternalSubset(void *ctx)
{
DEPRECATED("hasExternalSubset")
return(xmlSAX2HasExternalSubset(ctx));
}
/**
* internalSubset:
* @ctx: the user data (XML parser context)
* @name: the root element name
* @ExternalID: the external ID
* @SystemID: the SYSTEM ID (e.g. filename or URL)
*
* Callback on internal subset declaration.
* DEPRECATED: use xmlSAX2InternalSubset()
*/
void
internalSubset(void *ctx, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *SystemID)
{
DEPRECATED("internalSubset")
xmlSAX2InternalSubset(ctx, name, ExternalID, SystemID);
}
/**
* externalSubset:
* @ctx: the user data (XML parser context)
* @name: the root element name
* @ExternalID: the external ID
* @SystemID: the SYSTEM ID (e.g. filename or URL)
*
* Callback on external subset declaration.
* DEPRECATED: use xmlSAX2ExternalSubset()
*/
void
externalSubset(void *ctx, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *SystemID)
{
DEPRECATED("externalSubset")
xmlSAX2ExternalSubset(ctx, name, ExternalID, SystemID);
}
/**
* resolveEntity:
* @ctx: the user data (XML parser context)
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
*
* The entity loader, to control the loading of external entities,
* the application can either:
* - override this resolveEntity() callback in the SAX block
* - or better use the xmlSetExternalEntityLoader() function to
* set up it's own entity resolution routine
* DEPRECATED: use xmlSAX2ResolveEntity()
*
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/
xmlParserInputPtr
resolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId)
{
DEPRECATED("resolveEntity")
return(xmlSAX2ResolveEntity(ctx, publicId, systemId));
}
/**
* getEntity:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Get an entity by name
* DEPRECATED: use xmlSAX2GetEntity()
*
* Returns the xmlEntityPtr if found.
*/
xmlEntityPtr
getEntity(void *ctx, const xmlChar *name)
{
DEPRECATED("getEntity")
return(xmlSAX2GetEntity(ctx, name));
}
/**
* getParameterEntity:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* Get a parameter entity by name
* DEPRECATED: use xmlSAX2GetParameterEntity()
*
* Returns the xmlEntityPtr if found.
*/
xmlEntityPtr
getParameterEntity(void *ctx, const xmlChar *name)
{
DEPRECATED("getParameterEntity")
return(xmlSAX2GetParameterEntity(ctx, name));
}
/**
* entityDecl:
* @ctx: the user data (XML parser context)
* @name: the entity name
* @type: the entity type
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @content: the entity value (without processing).
*
* An entity definition has been parsed
* DEPRECATED: use xmlSAX2EntityDecl()
*/
void
entityDecl(void *ctx, const xmlChar *name, int type,
const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
{
DEPRECATED("entityDecl")
xmlSAX2EntityDecl(ctx, name, type, publicId, systemId, content);
}
/**
* attributeDecl:
* @ctx: the user data (XML parser context)
* @elem: the name of the element
* @fullname: the attribute name
* @type: the attribute type
* @def: the type of default value
* @defaultValue: the attribute default value
* @tree: the tree of enumerated value set
*
* An attribute definition has been parsed
* DEPRECATED: use xmlSAX2AttributeDecl()
*/
void
attributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
int type, int def, const xmlChar *defaultValue,
xmlEnumerationPtr tree)
{
DEPRECATED("attributeDecl")
xmlSAX2AttributeDecl(ctx, elem, fullname, type, def, defaultValue, tree);
}
/**
* elementDecl:
* @ctx: the user data (XML parser context)
* @name: the element name
* @type: the element type
* @content: the element value tree
*
* An element definition has been parsed
* DEPRECATED: use xmlSAX2ElementDecl()
*/
void
elementDecl(void *ctx, const xmlChar * name, int type,
xmlElementContentPtr content)
{
DEPRECATED("elementDecl")
xmlSAX2ElementDecl(ctx, name, type, content);
}
/**
* notationDecl:
* @ctx: the user data (XML parser context)
* @name: The name of the notation
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
*
* What to do when a notation declaration has been parsed.
* DEPRECATED: use xmlSAX2NotationDecl()
*/
void
notationDecl(void *ctx, const xmlChar *name,
const xmlChar *publicId, const xmlChar *systemId)
{
DEPRECATED("notationDecl")
xmlSAX2NotationDecl(ctx, name, publicId, systemId);
}
/**
* unparsedEntityDecl:
* @ctx: the user data (XML parser context)
* @name: The name of the entity
* @publicId: The public ID of the entity
* @systemId: The system ID of the entity
* @notationName: the name of the notation
*
* What to do when an unparsed entity declaration is parsed
* DEPRECATED: use xmlSAX2UnparsedEntityDecl()
*/
void
unparsedEntityDecl(void *ctx, const xmlChar *name,
const xmlChar *publicId, const xmlChar *systemId,
const xmlChar *notationName)
{
DEPRECATED("unparsedEntityDecl")
xmlSAX2UnparsedEntityDecl(ctx, name, publicId, systemId, notationName);
}
/**
* setDocumentLocator:
* @ctx: the user data (XML parser context)
* @loc: A SAX Locator
*
* Receive the document locator at startup, actually xmlDefaultSAXLocator
* Everything is available on the context, so this is useless in our case.
* DEPRECATED
*/
void
setDocumentLocator(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
{
DEPRECATED("setDocumentLocator")
}
/**
* startDocument:
* @ctx: the user data (XML parser context)
*
* called when the document start being processed.
* DEPRECATED: use xmlSAX2StartDocument()
*/
void
startDocument(void *ctx)
{
DEPRECATED("startDocument")
xmlSAX2StartDocument(ctx);
}
/**
* endDocument:
* @ctx: the user data (XML parser context)
*
* called when the document end has been detected.
* DEPRECATED: use xmlSAX2EndDocument()
*/
void
endDocument(void *ctx)
{
DEPRECATED("endDocument")
xmlSAX2EndDocument(ctx);
}
/**
* attribute:
* @ctx: the user data (XML parser context)
* @fullname: The attribute name, including namespace prefix
* @value: The attribute value
*
* Handle an attribute that has been read by the parser.
* The default handling is to convert the attribute into an
* DOM subtree and past it in a new xmlAttr element added to
* the element.
* DEPRECATED: use xmlSAX2Attribute()
*/
void
attribute(void *ctx ATTRIBUTE_UNUSED, const xmlChar *fullname ATTRIBUTE_UNUSED, const xmlChar *value ATTRIBUTE_UNUSED)
{
DEPRECATED("attribute")
}
/**
* startElement:
* @ctx: the user data (XML parser context)
* @fullname: The element name, including namespace prefix
* @atts: An array of name/value attributes pairs, NULL terminated
*
* called when an opening tag has been processed.
* DEPRECATED: use xmlSAX2StartElement()
*/
void
startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
{
DEPRECATED("startElement")
xmlSAX2StartElement(ctx, fullname, atts);
}
/**
* endElement:
* @ctx: the user data (XML parser context)
* @name: The element name
*
* called when the end of an element has been detected.
* DEPRECATED: use xmlSAX2EndElement()
*/
void
endElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
{
DEPRECATED("endElement")
xmlSAX2EndElement(ctx, name);
}
/**
* reference:
* @ctx: the user data (XML parser context)
* @name: The entity name
*
* called when an entity reference is detected.
* DEPRECATED: use xmlSAX2Reference()
*/
void
reference(void *ctx, const xmlChar *name)
{
DEPRECATED("reference")
xmlSAX2Reference(ctx, name);
}
/**
* characters:
* @ctx: the user data (XML parser context)
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* receiving some chars from the parser.
* DEPRECATED: use xmlSAX2Characters()
*/
void
characters(void *ctx, const xmlChar *ch, int len)
{
DEPRECATED("characters")
xmlSAX2Characters(ctx, ch, len);
}
/**
* ignorableWhitespace:
* @ctx: the user data (XML parser context)
* @ch: a xmlChar string
* @len: the number of xmlChar
*
* receiving some ignorable whitespaces from the parser.
* UNUSED: by default the DOM building will use characters
* DEPRECATED: use xmlSAX2IgnorableWhitespace()
*/
void
ignorableWhitespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED)
{
DEPRECATED("ignorableWhitespace")
}
/**
* processingInstruction:
* @ctx: the user data (XML parser context)
* @target: the target name
* @data: the PI data's
*
* A processing instruction has been parsed.
* DEPRECATED: use xmlSAX2ProcessingInstruction()
*/
void
processingInstruction(void *ctx, const xmlChar *target,
const xmlChar *data)
{
DEPRECATED("processingInstruction")
xmlSAX2ProcessingInstruction(ctx, target, data);
}
/**
* globalNamespace:
* @ctx: the user data (XML parser context)
* @href: the namespace associated URN
* @prefix: the namespace prefix
*
* An old global namespace has been parsed.
* DEPRECATED
*/
void
globalNamespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *href ATTRIBUTE_UNUSED, const xmlChar *prefix ATTRIBUTE_UNUSED)
{
DEPRECATED("globalNamespace")
}
/**
* setNamespace:
* @ctx: the user data (XML parser context)
* @name: the namespace prefix
*
* Set the current element namespace.
* DEPRECATED
*/
void
setNamespace(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name ATTRIBUTE_UNUSED)
{
DEPRECATED("setNamespace")
}
/**
* getNamespace:
* @ctx: the user data (XML parser context)
*
* Get the current element namespace.
* DEPRECATED
*
* Returns the xmlNsPtr or NULL if none
*/
xmlNsPtr
getNamespace(void *ctx ATTRIBUTE_UNUSED)
{
DEPRECATED("getNamespace")
return(NULL);
}
/**
* checkNamespace:
* @ctx: the user data (XML parser context)
* @namespace: the namespace to check against
*
* Check that the current element namespace is the same as the
* one read upon parsing.
* DEPRECATED
*
* Returns 1 if true 0 otherwise
*/
int
checkNamespace(void *ctx ATTRIBUTE_UNUSED, xmlChar *namespace ATTRIBUTE_UNUSED)
{
DEPRECATED("checkNamespace")
return(0);
}
/**
* namespaceDecl:
* @ctx: the user data (XML parser context)
* @href: the namespace associated URN
* @prefix: the namespace prefix
*
* A namespace has been parsed.
* DEPRECATED
*/
void
namespaceDecl(void *ctx ATTRIBUTE_UNUSED, const xmlChar *href ATTRIBUTE_UNUSED, const xmlChar *prefix ATTRIBUTE_UNUSED)
{
DEPRECATED("namespaceDecl")
}
/**
* comment:
* @ctx: the user data (XML parser context)
* @value: the comment content
*
* A comment has been parsed.
* DEPRECATED: use xmlSAX2Comment()
*/
void
comment(void *ctx, const xmlChar *value)
{
DEPRECATED("comment")
xmlSAX2Comment(ctx, value);
}
/**
* cdataBlock:
* @ctx: the user data (XML parser context)
* @value: The pcdata content
* @len: the block length
*
* called when a pcdata block has been parsed
* DEPRECATED: use xmlSAX2CDataBlock()
*/
void
cdataBlock(void *ctx, const xmlChar *value, int len)
{
DEPRECATED("cdataBlock")
xmlSAX2CDataBlock(ctx, value, len);
}
/**
* initxmlDefaultSAXHandler:
* @hdlr: the SAX handler
* @warning: flag if non-zero sets the handler warning procedure
*
* Initialize the default XML SAX version 1 handler
* DEPRECATED: use xmlSAX2InitDefaultSAXHandler() for the new SAX2 blocks
*/
void
initxmlDefaultSAXHandler(xmlSAXHandler *hdlr, int warning)
{
if(hdlr->initialized == 1)
return;
hdlr->internalSubset = xmlSAX2InternalSubset;
hdlr->externalSubset = xmlSAX2ExternalSubset;
hdlr->isStandalone = xmlSAX2IsStandalone;
hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
hdlr->resolveEntity = xmlSAX2ResolveEntity;
hdlr->getEntity = xmlSAX2GetEntity;
hdlr->getParameterEntity = xmlSAX2GetParameterEntity;
hdlr->entityDecl = xmlSAX2EntityDecl;
hdlr->attributeDecl = xmlSAX2AttributeDecl;
hdlr->elementDecl = xmlSAX2ElementDecl;
hdlr->notationDecl = xmlSAX2NotationDecl;
hdlr->unparsedEntityDecl = xmlSAX2UnparsedEntityDecl;
hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
hdlr->startDocument = xmlSAX2StartDocument;
hdlr->endDocument = xmlSAX2EndDocument;
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->reference = xmlSAX2Reference;
hdlr->characters = xmlSAX2Characters;
hdlr->cdataBlock = xmlSAX2CDataBlock;
hdlr->ignorableWhitespace = xmlSAX2Characters;
hdlr->processingInstruction = xmlSAX2ProcessingInstruction;
if (warning == 0)
hdlr->warning = NULL;
else
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
#ifdef LIBXML_HTML_ENABLED
/**
* inithtmlDefaultSAXHandler:
* @hdlr: the SAX handler
*
* Initialize the default HTML SAX version 1 handler
* DEPRECATED: use xmlSAX2InitHtmlDefaultSAXHandler() for the new SAX2 blocks
*/
void
inithtmlDefaultSAXHandler(xmlSAXHandler *hdlr)
{
if(hdlr->initialized == 1)
return;
hdlr->internalSubset = xmlSAX2InternalSubset;
hdlr->externalSubset = NULL;
hdlr->isStandalone = NULL;
hdlr->hasInternalSubset = NULL;
hdlr->hasExternalSubset = NULL;
hdlr->resolveEntity = NULL;
hdlr->getEntity = xmlSAX2GetEntity;
hdlr->getParameterEntity = NULL;
hdlr->entityDecl = NULL;
hdlr->attributeDecl = NULL;
hdlr->elementDecl = NULL;
hdlr->notationDecl = NULL;
hdlr->unparsedEntityDecl = NULL;
hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
hdlr->startDocument = xmlSAX2StartDocument;
hdlr->endDocument = xmlSAX2EndDocument;
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->reference = NULL;
hdlr->characters = xmlSAX2Characters;
hdlr->cdataBlock = xmlSAX2CDataBlock;
hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
hdlr->processingInstruction = NULL;
hdlr->comment = xmlSAX2Comment;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
#endif /* LIBXML_HTML_ENABLED */
#ifdef LIBXML_DOCB_ENABLED
/**
* initdocbDefaultSAXHandler:
* @hdlr: the SAX handler
*
* Initialize the default DocBook SAX version 1 handler
* DEPRECATED: use xmlSAX2InitDocbDefaultSAXHandler() for the new SAX2 blocks
*/
void
initdocbDefaultSAXHandler(xmlSAXHandler *hdlr)
{
if(hdlr->initialized == 1)
return;
hdlr->internalSubset = xmlSAX2InternalSubset;
hdlr->externalSubset = NULL;
hdlr->isStandalone = xmlSAX2IsStandalone;
hdlr->hasInternalSubset = xmlSAX2HasInternalSubset;
hdlr->hasExternalSubset = xmlSAX2HasExternalSubset;
hdlr->resolveEntity = xmlSAX2ResolveEntity;
hdlr->getEntity = xmlSAX2GetEntity;
hdlr->getParameterEntity = NULL;
hdlr->entityDecl = xmlSAX2EntityDecl;
hdlr->attributeDecl = NULL;
hdlr->elementDecl = NULL;
hdlr->notationDecl = NULL;
hdlr->unparsedEntityDecl = NULL;
hdlr->setDocumentLocator = xmlSAX2SetDocumentLocator;
hdlr->startDocument = xmlSAX2StartDocument;
hdlr->endDocument = xmlSAX2EndDocument;
hdlr->startElement = xmlSAX2StartElement;
hdlr->endElement = xmlSAX2EndElement;
hdlr->reference = xmlSAX2Reference;
hdlr->characters = xmlSAX2Characters;
hdlr->cdataBlock = NULL;
hdlr->ignorableWhitespace = xmlSAX2IgnorableWhitespace;
hdlr->processingInstruction = NULL;
hdlr->comment = xmlSAX2Comment;
hdlr->warning = xmlParserWarning;
hdlr->error = xmlParserError;
hdlr->fatalError = xmlParserError;
hdlr->initialized = 1;
}
#endif /* LIBXML_DOCB_ENABLED */