xmlparse.cc File Reference

#include <stddef.h>
#include <string.h>
#include <assert.h>
#include "ascii.h"
#include "expat.h"
#include "internal.h"
#include "xmltok.h"
#include "xmlrole.h"

Go to the source code of this file.

Data Structures

struct  NAMED
struct  HASH_TABLE
struct  HASH_TABLE_ITER
struct  binding
struct  prefix
struct  TAG_NAME
struct  tag
struct  ENTITY
struct  CONTENT_SCAFFOLD
struct  block
struct  STRING_POOL
struct  attribute_id
struct  DEFAULT_ATTRIBUTE
struct  NS_ATT
struct  ELEMENT_TYPE
struct  DTD
struct  open_internal_entity
struct  XML_ParserStruct

Defines

#define XML_BUILDING_EXPAT   1
#define XML_ENCODE_MAX   XML_UTF8_ENCODE_MAX
#define XmlConvert   XmlUtf8Convert
#define XmlGetInternalEncoding   XmlGetUtf8InternalEncoding
#define XmlGetInternalEncodingNS   XmlGetUtf8InternalEncodingNS
#define XmlEncode   XmlUtf8Encode
#define MUST_CONVERT(enc, s)   (!(enc)->isUtf8)
#define XmlInitEncodingNS   XmlInitEncoding
#define XmlInitUnknownEncodingNS   XmlInitUnknownEncoding
#define XmlGetInternalEncodingNS   XmlGetInternalEncoding
#define XmlParseXmlDeclNS   XmlParseXmlDecl
#define XML_T(x)   x
#define XML_L(x)   x
#define ROUND_UP(n, sz)   (((n) + ((sz) - 1)) & ~((sz) - 1))
#define CHAR_HASH(h, c)   (((h) * 0xF4243) ^ (unsigned char)(c))
#define SECOND_HASH(hash, mask, power)   ((((hash) & ~(mask)) >> ((power) - 1)) & ((mask) >> 2))
#define PROBE_STEP(hash, mask, power)   ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
#define INIT_TAG_BUF_SIZE   32
#define INIT_DATA_BUF_SIZE   1024
#define INIT_ATTS_SIZE   16
#define INIT_ATTS_VERSION   0xFFFFFFFF
#define INIT_BLOCK_SIZE   1024
#define INIT_BUFFER_SIZE   1024
#define EXPAND_SPARE   24
#define INIT_SCAFFOLD_ELEMENTS   32
#define poolStart(pool)   ((pool)->start)
#define poolEnd(pool)   ((pool)->ptr)
#define poolLength(pool)   ((pool)->ptr - (pool)->start)
#define poolChop(pool)   ((void)--(pool->ptr))
#define poolLastChar(pool)   (((pool)->ptr)[-1])
#define poolDiscard(pool)   ((pool)->ptr = (pool)->start)
#define poolFinish(pool)   ((pool)->start = (pool)->ptr)
#define poolAppendChar(pool, c)
#define MALLOC(s)   (parser->m_mem.malloc_fcn((s)))
#define REALLOC(p, s)   (parser->m_mem.realloc_fcn((p),(s)))
#define FREE(p)   (parser->m_mem.free_fcn((p)))
#define userData   (parser->m_userData)
#define handlerArg   (parser->m_handlerArg)
#define startElementHandler   (parser->m_startElementHandler)
#define endElementHandler   (parser->m_endElementHandler)
#define characterDataHandler   (parser->m_characterDataHandler)
#define processingInstructionHandler   (parser->m_processingInstructionHandler)
#define commentHandler   (parser->m_commentHandler)
#define startCdataSectionHandler   (parser->m_startCdataSectionHandler)
#define endCdataSectionHandler   (parser->m_endCdataSectionHandler)
#define defaultHandler   (parser->m_defaultHandler)
#define startDoctypeDeclHandler   (parser->m_startDoctypeDeclHandler)
#define endDoctypeDeclHandler   (parser->m_endDoctypeDeclHandler)
#define unparsedEntityDeclHandler   (parser->m_unparsedEntityDeclHandler)
#define notationDeclHandler   (parser->m_notationDeclHandler)
#define startNamespaceDeclHandler   (parser->m_startNamespaceDeclHandler)
#define endNamespaceDeclHandler   (parser->m_endNamespaceDeclHandler)
#define notStandaloneHandler   (parser->m_notStandaloneHandler)
#define externalEntityRefHandler   (parser->m_externalEntityRefHandler)
#define externalEntityRefHandlerArg   (parser->m_externalEntityRefHandlerArg)
#define internalEntityRefHandler   (parser->m_internalEntityRefHandler)
#define skippedEntityHandler   (parser->m_skippedEntityHandler)
#define unknownEncodingHandler   (parser->m_unknownEncodingHandler)
#define elementDeclHandler   (parser->m_elementDeclHandler)
#define attlistDeclHandler   (parser->m_attlistDeclHandler)
#define entityDeclHandler   (parser->m_entityDeclHandler)
#define xmlDeclHandler   (parser->m_xmlDeclHandler)
#define encoding   (parser->m_encoding)
#define initEncoding   (parser->m_initEncoding)
#define internalEncoding   (parser->m_internalEncoding)
#define unknownEncodingMem   (parser->m_unknownEncodingMem)
#define unknownEncodingData   (parser->m_unknownEncodingData)
#define unknownEncodingHandlerData   (parser->m_unknownEncodingHandlerData)
#define unknownEncodingRelease   (parser->m_unknownEncodingRelease)
#define protocolEncodingName   (parser->m_protocolEncodingName)
#define ns   (parser->m_ns)
#define ns_triplets   (parser->m_ns_triplets)
#define prologState   (parser->m_prologState)
#define processor   (parser->m_processor)
#define errorCode   (parser->m_errorCode)
#define eventPtr   (parser->m_eventPtr)
#define eventEndPtr   (parser->m_eventEndPtr)
#define positionPtr   (parser->m_positionPtr)
#define position   (parser->m_position)
#define openInternalEntities   (parser->m_openInternalEntities)
#define freeInternalEntities   (parser->m_freeInternalEntities)
#define defaultExpandInternalEntities   (parser->m_defaultExpandInternalEntities)
#define tagLevel   (parser->m_tagLevel)
#define buffer   (parser->m_buffer)
#define bufferPtr   (parser->m_bufferPtr)
#define bufferEnd   (parser->m_bufferEnd)
#define parseEndByteIndex   (parser->m_parseEndByteIndex)
#define parseEndPtr   (parser->m_parseEndPtr)
#define bufferLim   (parser->m_bufferLim)
#define dataBuf   (parser->m_dataBuf)
#define dataBufEnd   (parser->m_dataBufEnd)
#define _dtd   (parser->m_dtd)
#define curBase   (parser->m_curBase)
#define declEntity   (parser->m_declEntity)
#define doctypeName   (parser->m_doctypeName)
#define doctypeSysid   (parser->m_doctypeSysid)
#define doctypePubid   (parser->m_doctypePubid)
#define declAttributeType   (parser->m_declAttributeType)
#define declNotationName   (parser->m_declNotationName)
#define declNotationPublicId   (parser->m_declNotationPublicId)
#define declElementType   (parser->m_declElementType)
#define declAttributeId   (parser->m_declAttributeId)
#define declAttributeIsCdata   (parser->m_declAttributeIsCdata)
#define declAttributeIsId   (parser->m_declAttributeIsId)
#define freeTagList   (parser->m_freeTagList)
#define freeBindingList   (parser->m_freeBindingList)
#define inheritedBindings   (parser->m_inheritedBindings)
#define tagStack   (parser->m_tagStack)
#define atts   (parser->m_atts)
#define attsSize   (parser->m_attsSize)
#define nSpecifiedAtts   (parser->m_nSpecifiedAtts)
#define idAttIndex   (parser->m_idAttIndex)
#define nsAtts   (parser->m_nsAtts)
#define nsAttsVersion   (parser->m_nsAttsVersion)
#define nsAttsPower   (parser->m_nsAttsPower)
#define tempPool   (parser->m_tempPool)
#define temp2Pool   (parser->m_temp2Pool)
#define groupConnector   (parser->m_groupConnector)
#define groupSize   (parser->m_groupSize)
#define namespaceSeparator   (parser->m_namespaceSeparator)
#define parentParser   (parser->m_parentParser)
#define ps_parsing   (parser->m_parsingStatus.parsing)
#define ps_finalBuffer   (parser->m_parsingStatus.finalBuffer)
#define V1(a, b, c)   XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c)
#define V2(a, b, c)   XML_L("expat_")V1(a,b,c)
#define CONTEXT_SEP   XML_T(ASCII_FF)
#define INIT_POWER   6

Typedefs

typedef char ICHAR
typedef const XML_Char * KEY
typedef binding BINDING
typedef prefix PREFIX
typedef tag TAG
typedef block BLOCK
typedef attribute_id ATTRIBUTE_ID
typedef open_internal_entity OPEN_INTERNAL_ENTITY

Functions

enum XML_Error PTRCALL Processor (XML_Parser parser, const char *start, const char *end, const char **endPtr)
XML_Parser XMLCALL XML_ParserCreate (const XML_Char *encodingName)
XML_Parser XMLCALL XML_ParserCreateNS (const XML_Char *encodingName, XML_Char nsSep)
XML_Parser XMLCALL XML_ParserCreate_MM (const XML_Char *encodingName, const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep)
XML_Bool XMLCALL XML_ParserReset (XML_Parser parser, const XML_Char *encodingName)
enum XML_Status XMLCALL XML_SetEncoding (XML_Parser parser, const XML_Char *encodingName)
XML_Parser XMLCALL XML_ExternalEntityParserCreate (XML_Parser oldParser, const XML_Char *context, const XML_Char *encodingName)
void XMLCALL XML_ParserFree (XML_Parser parser)
void XMLCALL XML_UseParserAsHandlerArg (XML_Parser parser)
enum XML_Error XMLCALL XML_UseForeignDTD (XML_Parser parser, XML_Bool useDTD)
void XMLCALL XML_SetReturnNSTriplet (XML_Parser parser, int do_nst)
void XMLCALL XML_SetUserData (XML_Parser parser, void *p)
enum XML_Status XMLCALL XML_SetBase (XML_Parser parser, const XML_Char *p)
const XML_Char *XMLCALL XML_GetBase (XML_Parser parser)
int XMLCALL XML_GetSpecifiedAttributeCount (XML_Parser parser)
int XMLCALL XML_GetIdAttributeIndex (XML_Parser parser)
void XMLCALL XML_SetElementHandler (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)
void XMLCALL XML_SetStartElementHandler (XML_Parser parser, XML_StartElementHandler start)
void XMLCALL XML_SetEndElementHandler (XML_Parser parser, XML_EndElementHandler end)
void XMLCALL XML_SetCharacterDataHandler (XML_Parser parser, XML_CharacterDataHandler handler)
void XMLCALL XML_SetProcessingInstructionHandler (XML_Parser parser, XML_ProcessingInstructionHandler handler)
void XMLCALL XML_SetCommentHandler (XML_Parser parser, XML_CommentHandler handler)
void XMLCALL XML_SetCdataSectionHandler (XML_Parser parser, XML_StartCdataSectionHandler start, XML_EndCdataSectionHandler end)
void XMLCALL XML_SetStartCdataSectionHandler (XML_Parser parser, XML_StartCdataSectionHandler start)
void XMLCALL XML_SetEndCdataSectionHandler (XML_Parser parser, XML_EndCdataSectionHandler end)
void XMLCALL XML_SetDefaultHandler (XML_Parser parser, XML_DefaultHandler handler)
void XMLCALL XML_SetDefaultHandlerExpand (XML_Parser parser, XML_DefaultHandler handler)
void XMLCALL XML_SetDoctypeDeclHandler (XML_Parser parser, XML_StartDoctypeDeclHandler start, XML_EndDoctypeDeclHandler end)
void XMLCALL XML_SetStartDoctypeDeclHandler (XML_Parser parser, XML_StartDoctypeDeclHandler start)
void XMLCALL XML_SetEndDoctypeDeclHandler (XML_Parser parser, XML_EndDoctypeDeclHandler end)
void XMLCALL XML_SetUnparsedEntityDeclHandler (XML_Parser parser, XML_UnparsedEntityDeclHandler handler)
void XMLCALL XML_SetNotationDeclHandler (XML_Parser parser, XML_NotationDeclHandler handler)
void XMLCALL XML_SetNamespaceDeclHandler (XML_Parser parser, XML_StartNamespaceDeclHandler start, XML_EndNamespaceDeclHandler end)
void XMLCALL XML_SetStartNamespaceDeclHandler (XML_Parser parser, XML_StartNamespaceDeclHandler start)
void XMLCALL XML_SetEndNamespaceDeclHandler (XML_Parser parser, XML_EndNamespaceDeclHandler end)
void XMLCALL XML_SetNotStandaloneHandler (XML_Parser parser, XML_NotStandaloneHandler handler)
void XMLCALL XML_SetExternalEntityRefHandler (XML_Parser parser, XML_ExternalEntityRefHandler handler)
void XMLCALL XML_SetExternalEntityRefHandlerArg (XML_Parser parser, void *arg)
void XMLCALL XML_SetSkippedEntityHandler (XML_Parser parser, XML_SkippedEntityHandler handler)
void XMLCALL XML_SetUnknownEncodingHandler (XML_Parser parser, XML_UnknownEncodingHandler handler, void *data)
void XMLCALL XML_SetElementDeclHandler (XML_Parser parser, XML_ElementDeclHandler eldecl)
void XMLCALL XML_SetAttlistDeclHandler (XML_Parser parser, XML_AttlistDeclHandler attdecl)
void XMLCALL XML_SetEntityDeclHandler (XML_Parser parser, XML_EntityDeclHandler handler)
void XMLCALL XML_SetXmlDeclHandler (XML_Parser parser, XML_XmlDeclHandler handler)
int XMLCALL XML_SetParamEntityParsing (XML_Parser parser, enum XML_ParamEntityParsing peParsing)
enum XML_Status XMLCALL XML_Parse (XML_Parser parser, const char *s, int len, int isFinal)
enum XML_Status XMLCALL XML_ParseBuffer (XML_Parser parser, int len, int isFinal)
void *XMLCALL XML_GetBuffer (XML_Parser parser, int len)
enum XML_Status XMLCALL XML_StopParser (XML_Parser parser, XML_Bool resumable)
enum XML_Status XMLCALL XML_ResumeParser (XML_Parser parser)
void XMLCALL XML_GetParsingStatus (XML_Parser parser, XML_ParsingStatus *status)
enum XML_Error XMLCALL XML_GetErrorCode (XML_Parser parser)
XML_Index XMLCALL XML_GetCurrentByteIndex (XML_Parser parser)
int XMLCALL XML_GetCurrentByteCount (XML_Parser parser)
const char *XMLCALL XML_GetInputContext (XML_Parser parser, int *offset, int *size)
XML_Size XMLCALL XML_GetCurrentLineNumber (XML_Parser parser)
XML_Size XMLCALL XML_GetCurrentColumnNumber (XML_Parser parser)
void XMLCALL XML_FreeContentModel (XML_Parser parser, XML_Content *model)
void *XMLCALL XML_MemMalloc (XML_Parser parser, size_t size)
void *XMLCALL XML_MemRealloc (XML_Parser parser, void *ptr, size_t size)
void XMLCALL XML_MemFree (XML_Parser parser, void *ptr)
void XMLCALL XML_DefaultCurrent (XML_Parser parser)
const XML_LChar *XMLCALL XML_ErrorString (enum XML_Error code)
const XML_LChar *XMLCALL XML_ExpatVersion (void)
XML_Expat_Version XMLCALL XML_ExpatVersionInfo (void)
const XML_Feature *XMLCALL XML_GetFeatureList (void)


Define Documentation

#define _dtd   (parser->m_dtd)

Definition at line 619 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_ParserFree(), XML_ParserReset(), and XML_SetBase().

#define attlistDeclHandler   (parser->m_attlistDeclHandler)

Definition at line 585 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetAttlistDeclHandler().

#define atts   (parser->m_atts)

Definition at line 636 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), and XML_ParserFree().

#define attsSize   (parser->m_attsSize)

Definition at line 637 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define buffer   (parser->m_buffer)

Definition at line 611 of file xmlparse.cc.

Referenced by G4InterpolationManager::AppendScheme(), G4HadLeadBias::Bias(), G4NeutronHPorLFissionData::GetCrossSection(), G4NeutronHPorLElasticData::GetCrossSection(), G4NeutronHPorLEInelasticData::GetCrossSection(), G4NeutronHPorLCaptureData::GetCrossSection(), G4NeutronHPInelasticData::GetCrossSection(), G4NeutronHPFissionData::GetCrossSection(), G4NeutronHPElasticData::GetCrossSection(), G4NeutronHPCaptureData::GetCrossSection(), G4NeutronHPDeExGammas::Init(), G4HEInelastic::QuickSort(), G4ITModelHandler::RegisterModel(), G4ITModelHandler::SetModel(), xData_parseReadFile(), XML_GetBuffer(), XML_GetInputContext(), XML_Parse(), and XML_ParserFree().

#define bufferEnd   (parser->m_bufferEnd)

Definition at line 613 of file xmlparse.cc.

Referenced by XML_GetBuffer(), XML_GetInputContext(), XML_Parse(), and XML_ParseBuffer().

#define bufferLim   (parser->m_bufferLim)

Definition at line 616 of file xmlparse.cc.

Referenced by XML_GetBuffer(), and XML_Parse().

#define bufferPtr   (parser->m_bufferPtr)

Definition at line 612 of file xmlparse.cc.

Referenced by XML_GetBuffer(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define CHAR_HASH ( h,
 )     (((h) * 0xF4243) ^ (unsigned char)(c))

Definition at line 111 of file xmlparse.cc.

#define characterDataHandler   (parser->m_characterDataHandler)

Definition at line 559 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), and XML_SetCharacterDataHandler().

#define commentHandler   (parser->m_commentHandler)

Definition at line 562 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetCommentHandler().

#define CONTEXT_SEP   XML_T(ASCII_FF)

Definition at line 5378 of file xmlparse.cc.

#define curBase   (parser->m_curBase)

Definition at line 620 of file xmlparse.cc.

Referenced by XML_GetBase(), and XML_SetBase().

#define dataBuf   (parser->m_dataBuf)

Definition at line 617 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), and XML_ParserFree().

#define dataBufEnd   (parser->m_dataBufEnd)

Definition at line 618 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define declAttributeId   (parser->m_declAttributeId)

Definition at line 629 of file xmlparse.cc.

#define declAttributeIsCdata   (parser->m_declAttributeIsCdata)

Definition at line 630 of file xmlparse.cc.

#define declAttributeIsId   (parser->m_declAttributeIsId)

Definition at line 631 of file xmlparse.cc.

#define declAttributeType   (parser->m_declAttributeType)

Definition at line 625 of file xmlparse.cc.

#define declElementType   (parser->m_declElementType)

Definition at line 628 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate().

#define declEntity   (parser->m_declEntity)

Definition at line 621 of file xmlparse.cc.

#define declNotationName   (parser->m_declNotationName)

Definition at line 626 of file xmlparse.cc.

#define declNotationPublicId   (parser->m_declNotationPublicId)

Definition at line 627 of file xmlparse.cc.

#define defaultExpandInternalEntities   (parser->m_defaultExpandInternalEntities)

Definition at line 608 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetDefaultHandler(), and XML_SetDefaultHandlerExpand().

#define defaultHandler   (parser->m_defaultHandler)

Definition at line 566 of file xmlparse.cc.

Referenced by XML_DefaultCurrent(), XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetDefaultHandler(), and XML_SetDefaultHandlerExpand().

#define doctypeName   (parser->m_doctypeName)

Definition at line 622 of file xmlparse.cc.

#define doctypePubid   (parser->m_doctypePubid)

Definition at line 624 of file xmlparse.cc.

#define doctypeSysid   (parser->m_doctypeSysid)

Definition at line 623 of file xmlparse.cc.

#define elementDeclHandler   (parser->m_elementDeclHandler)

Definition at line 584 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetElementDeclHandler().

#define encoding   (parser->m_encoding)

Definition at line 588 of file xmlparse.cc.

Referenced by G4IonTable::Contains(), G4IonTable::CreateIon(), G4IonTable::FindIon(), G4ExcitedNucleonConstructor::GetEncoding(), G4ExcitedMesonConstructor::GetEncoding(), G4ExcitedDeltaConstructor::GetEncoding(), G4ExcitedBaryonConstructor::GetEncoding(), G4IonTable::GetNucleusEncoding(), G4IonTable::Insert(), G4TextPPRetriever::ModifyPropertyTable(), G4IonTable::Remove(), G4RKPropagation::Transport(), XML_DefaultCurrent(), XML_GetCurrentColumnNumber(), XML_GetCurrentLineNumber(), XML_GetFeatureList(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define endCdataSectionHandler   (parser->m_endCdataSectionHandler)

Definition at line 565 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_SetCdataSectionHandler(), and XML_SetEndCdataSectionHandler().

#define endDoctypeDeclHandler   (parser->m_endDoctypeDeclHandler)

Definition at line 568 of file xmlparse.cc.

Referenced by XML_SetDoctypeDeclHandler(), and XML_SetEndDoctypeDeclHandler().

#define endElementHandler   (parser->m_endElementHandler)

Definition at line 558 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetElementHandler(), and XML_SetEndElementHandler().

#define endNamespaceDeclHandler   (parser->m_endNamespaceDeclHandler)

Definition at line 574 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetEndNamespaceDeclHandler(), and XML_SetNamespaceDeclHandler().

#define entityDeclHandler   (parser->m_entityDeclHandler)

Definition at line 586 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetEntityDeclHandler().

#define errorCode   (parser->m_errorCode)

Definition at line 601 of file xmlparse.cc.

Referenced by XML_GetBuffer(), XML_GetErrorCode(), XML_Parse(), XML_ParseBuffer(), XML_ResumeParser(), and XML_StopParser().

#define eventEndPtr   (parser->m_eventEndPtr)

Definition at line 603 of file xmlparse.cc.

Referenced by XML_DefaultCurrent(), XML_GetCurrentByteCount(), XML_GetFeatureList(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define eventPtr   (parser->m_eventPtr)

Definition at line 602 of file xmlparse.cc.

Referenced by XML_DefaultCurrent(), XML_GetCurrentByteCount(), XML_GetCurrentByteIndex(), XML_GetCurrentColumnNumber(), XML_GetCurrentLineNumber(), XML_GetFeatureList(), XML_GetInputContext(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define EXPAND_SPARE   24

Definition at line 140 of file xmlparse.cc.

#define externalEntityRefHandler   (parser->m_externalEntityRefHandler)

Definition at line 576 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), and XML_SetExternalEntityRefHandler().

#define externalEntityRefHandlerArg   (parser->m_externalEntityRefHandlerArg)

Definition at line 578 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), and XML_SetExternalEntityRefHandlerArg().

#define FREE (  )     (parser->m_mem.free_fcn((p)))

Definition at line 553 of file xmlparse.cc.

Referenced by XML_FreeContentModel(), XML_GetBuffer(), XML_GetFeatureList(), XML_MemFree(), XML_ParserFree(), and XML_ParserReset().

#define freeBindingList   (parser->m_freeBindingList)

Definition at line 633 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), and XML_ParserFree().

#define freeInternalEntities   (parser->m_freeInternalEntities)

Definition at line 607 of file xmlparse.cc.

Referenced by XML_ParserFree(), and XML_ParserReset().

#define freeTagList   (parser->m_freeTagList)

Definition at line 632 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), XML_ParserFree(), and XML_ParserReset().

#define groupConnector   (parser->m_groupConnector)

Definition at line 645 of file xmlparse.cc.

Referenced by XML_ParserFree().

#define groupSize   (parser->m_groupSize)

Definition at line 646 of file xmlparse.cc.

#define handlerArg   (parser->m_handlerArg)

Definition at line 556 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetUserData(), and XML_UseParserAsHandlerArg().

#define idAttIndex   (parser->m_idAttIndex)

Definition at line 639 of file xmlparse.cc.

Referenced by XML_GetIdAttributeIndex().

#define inheritedBindings   (parser->m_inheritedBindings)

Definition at line 634 of file xmlparse.cc.

Referenced by XML_ParserFree(), and XML_ParserReset().

#define INIT_ATTS_SIZE   16

Definition at line 135 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define INIT_ATTS_VERSION   0xFFFFFFFF

Definition at line 136 of file xmlparse.cc.

#define INIT_BLOCK_SIZE   1024

Definition at line 137 of file xmlparse.cc.

#define INIT_BUFFER_SIZE   1024

Definition at line 138 of file xmlparse.cc.

Referenced by XML_GetBuffer().

#define INIT_DATA_BUF_SIZE   1024

Definition at line 134 of file xmlparse.cc.

#define INIT_POWER   6

Definition at line 5834 of file xmlparse.cc.

#define INIT_SCAFFOLD_ELEMENTS   32

Definition at line 213 of file xmlparse.cc.

#define INIT_TAG_BUF_SIZE   32

Definition at line 133 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define initEncoding   (parser->m_initEncoding)

Definition at line 589 of file xmlparse.cc.

#define internalEncoding   (parser->m_internalEncoding)

Definition at line 590 of file xmlparse.cc.

Referenced by XML_DefaultCurrent().

#define internalEntityRefHandler   (parser->m_internalEntityRefHandler)

Definition at line 580 of file xmlparse.cc.

#define MALLOC (  )     (parser->m_mem.malloc_fcn((s)))

Definition at line 551 of file xmlparse.cc.

Referenced by XML_GetBuffer(), XML_GetFeatureList(), XML_MemMalloc(), and XML_Parse().

#define MUST_CONVERT ( enc,
 )     (!(enc)->isUtf8)

Definition at line 41 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define namespaceSeparator   (parser->m_namespaceSeparator)

Definition at line 647 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_GetFeatureList().

#define notationDeclHandler   (parser->m_notationDeclHandler)

Definition at line 571 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetNotationDeclHandler().

#define notStandaloneHandler   (parser->m_notStandaloneHandler)

Definition at line 575 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetNotStandaloneHandler().

#define ns   (parser->m_ns)

Definition at line 597 of file xmlparse.cc.

Referenced by G4RadioactiveDecay::AddDecayRateTable(), G4VRestProcess::AtRestGetPhysicalInteractionLength(), G4VRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4VRestContinuousProcess::AtRestGetPhysicalInteractionLength(), G4VRestContinuousDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4VITRestProcess::AtRestGetPhysicalInteractionLength(), G4VITRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4ProtonAntiProtonAtRestChips::AtRestGetPhysicalInteractionLength(), G4PionMinusNuclearAtRestChips::AtRestGetPhysicalInteractionLength(), G4PionMinusAbsorptionAtRest::AtRestGetPhysicalInteractionLength(), G4NeutronCaptureAtRest::AtRestGetPhysicalInteractionLength(), G4KaonMinusAbsorption::AtRestGetPhysicalInteractionLength(), G4IVRestDiscreteProcess::AtRestGetPhysicalInteractionLength(), G4AntiProtonAnnihilationAtRest::AtRestGetPhysicalInteractionLength(), G4AntiNeutronAnnihilationAtRest::AtRestGetPhysicalInteractionLength(), G4ErrorSurfaceTrajState::BuildErrorMatrix(), G4ParticleChangeForDecay::CheckIt(), G4ParticleChange::CheckIt(), G4FastStep::CheckIt(), G4VParticleChange::CheckSecondary(), G4ShortLivedConstructor::ConstructMesons(), G4NeutronTrackingCut::ConstructProcess(), G4UnknownDecay::DecayIt(), G4RadioactiveDecay::DecayIt(), G4Decay::DecayIt(), G4XiZero::Definition(), G4XiMinus::Definition(), G4XicZero::Definition(), G4XicPlus::Definition(), G4XibZero::Definition(), G4XibMinus::Definition(), G4Upsiron::Definition(), G4TauPlus::Definition(), G4TauMinus::Definition(), G4SigmaZero::Definition(), G4SigmaPlus::Definition(), G4SigmaMinus::Definition(), G4SigmacZero::Definition(), G4SigmacPlusPlus::Definition(), G4SigmacPlus::Definition(), G4SigmabZero::Definition(), G4SigmabPlus::Definition(), G4SigmabMinus::Definition(), G4PionZero::Definition(), G4PionPlus::Definition(), G4PionMinus::Definition(), G4OmegaMinus::Definition(), G4OmegacZero::Definition(), G4OmegabMinus::Definition(), G4MuonPlus::Definition(), G4MuonMinus::Definition(), G4LambdacPlus::Definition(), G4Lambdab::Definition(), G4Lambda::Definition(), G4KaonZeroShort::Definition(), G4KaonZeroLong::Definition(), G4KaonPlus::Definition(), G4KaonMinus::Definition(), G4JPsi::Definition(), G4EtaPrime::Definition(), G4Etac::Definition(), G4Eta::Definition(), G4DsMesonPlus::Definition(), G4DsMesonMinus::Definition(), G4DMesonZero::Definition(), G4DMesonPlus::Definition(), G4DMesonMinus::Definition(), G4BsMesonZero::Definition(), G4BMesonZero::Definition(), G4BMesonPlus::Definition(), G4BMesonMinus::Definition(), G4BcMesonPlus::Definition(), G4BcMesonMinus::Definition(), G4AntiXiZero::Definition(), G4AntiXiMinus::Definition(), G4AntiXicZero::Definition(), G4AntiXicPlus::Definition(), G4AntiXibZero::Definition(), G4AntiXibMinus::Definition(), G4AntiSigmaZero::Definition(), G4AntiSigmaPlus::Definition(), G4AntiSigmaMinus::Definition(), G4AntiSigmacZero::Definition(), G4AntiSigmacPlusPlus::Definition(), G4AntiSigmacPlus::Definition(), G4AntiSigmabZero::Definition(), G4AntiSigmabPlus::Definition(), G4AntiSigmabMinus::Definition(), G4AntiOmegaMinus::Definition(), G4AntiOmegacZero::Definition(), G4AntiOmegabMinus::Definition(), G4AntiLambdacPlus::Definition(), G4AntiLambdab::Definition(), G4AntiLambda::Definition(), G4AntiDMesonZero::Definition(), G4AntiBsMesonZero::Definition(), G4AntiBMesonZero::Definition(), G4ParticleChangeForDecay::DumpInfo(), G4ParticleChange::DumpInfo(), G4IsotopeProperty::DumpInfo(), G4FastStep::DumpInfo(), G4ParticleDefinition::DumpTable(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4RadioactiveDecay::GetMeanLifeTime(), G4Decay::GetMeanLifeTime(), G4Scintillation::PostStepDoIt(), G4OpWLS::PostStepDoIt(), G4PrimaryVertex::Print(), G4PrimaryParticle::Print(), G4ParticlePropertyData::Print(), G4MCTSimVertex::Print(), G4MCTSimParticle::PrintSingle(), G4ProjectileDiffractiveChannel::Scatter(), G4NeutronKiller::SetTimeLimit(), G4SteppingVerbose::VerboseTrack(), XML_ExternalEntityParserCreate(), XML_GetFeatureList(), and XML_ParserCreate_MM().

#define ns_triplets   (parser->m_ns_triplets)

Definition at line 598 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), and XML_SetReturnNSTriplet().

#define nsAtts   (parser->m_nsAtts)

Definition at line 640 of file xmlparse.cc.

Referenced by XML_ParserFree().

#define nsAttsPower   (parser->m_nsAttsPower)

Definition at line 642 of file xmlparse.cc.

#define nsAttsVersion   (parser->m_nsAttsVersion)

Definition at line 641 of file xmlparse.cc.

#define nSpecifiedAtts   (parser->m_nSpecifiedAtts)

Definition at line 638 of file xmlparse.cc.

Referenced by XML_GetSpecifiedAttributeCount().

#define openInternalEntities   (parser->m_openInternalEntities)

Definition at line 606 of file xmlparse.cc.

Referenced by XML_DefaultCurrent(), XML_GetFeatureList(), XML_ParserFree(), and XML_ParserReset().

#define parentParser   (parser->m_parentParser)

Definition at line 648 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_ParserFree(), and XML_ParserReset().

#define parseEndByteIndex   (parser->m_parseEndByteIndex)

Definition at line 614 of file xmlparse.cc.

Referenced by XML_GetCurrentByteIndex(), XML_Parse(), and XML_ParseBuffer().

#define parseEndPtr   (parser->m_parseEndPtr)

Definition at line 615 of file xmlparse.cc.

Referenced by XML_GetCurrentByteIndex(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define poolAppendChar ( pool,
 ) 

Value:

(((pool)->ptr == (pool)->end && !poolGrow(pool)) \
   ? 0 \
   : ((*((pool)->ptr)++ = c), 1))

Definition at line 447 of file xmlparse.cc.

#define poolChop ( pool   )     ((void)--(pool->ptr))

Definition at line 443 of file xmlparse.cc.

#define poolDiscard ( pool   )     ((pool)->ptr = (pool)->start)

Definition at line 445 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define poolEnd ( pool   )     ((pool)->ptr)

Definition at line 441 of file xmlparse.cc.

#define poolFinish ( pool   )     ((pool)->start = (pool)->ptr)

Definition at line 446 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define poolLastChar ( pool   )     (((pool)->ptr)[-1])

Definition at line 444 of file xmlparse.cc.

#define poolLength ( pool   )     ((pool)->ptr - (pool)->start)

Definition at line 442 of file xmlparse.cc.

#define poolStart ( pool   )     ((pool)->start)

Definition at line 440 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define position   (parser->m_position)

Definition at line 605 of file xmlparse.cc.

Referenced by G4ElectroNuclearReaction::ApplyYourself(), G4QCaptureAtRest::AtRestDoIt(), G4PionMinusAbsorptionAtRest::AtRestDoIt(), G4NeutronCaptureAtRest::AtRestDoIt(), G4MuonMinusCaptureAtRest::AtRestDoIt(), G4KaonMinusAbsorption::AtRestDoIt(), G4AntiProtonAnnihilationAtRest::AtRestDoIt(), G4AntiNeutronAnnihilationAtRest::AtRestDoIt(), G4GDMLReadSolids::BooleanRead(), G3Division::CreatePVReplica(), G4KineticTrack::Decay(), G4INCL::CoulombNonRelativistic::distortOut(), G4Poisson(), G4PAIPhotonModel::GetAlongStepTransfer(), G4PAIxSection::GetCerenkovEnergyTransfer(), G4PAIxSection::GetEnergyTransfer(), G4PAIxSection::GetMMEnergyTransfer(), G4PAIxSection::GetPlasmonEnergyTransfer(), G4PAIPhotonModel::GetPostStepTransfer(), G4PAIModel::GetPostStepTransfer(), G4QSynchRad::GetRadius(), G4VXTRenergyLoss::GetRandomAngle(), G4SynchrotronRadiationInMat::GetRandomEnergySR(), G4PAIxSection::GetResonanceEnergyTransfer(), G4PAIxSection::GetRutherfordEnergyTransfer(), G4PAIySection::GetStepCerenkovLoss(), G4PAIySection::GetStepEnergyLoss(), G4PAIySection::GetStepPlasmonLoss(), G4Scatterer::GetTimeToInteraction(), G4VXTRenergyLoss::GetXTRrandomEnergy(), G4NeutronIsoIsoCrossSections::Init(), G4GDMLReadParamvol::ParametersRead(), G4GDMLReadStructure::PhysvolRead(), G4GDMLReadDefine::PositionRead(), G4VXTRenergyLoss::PostStepDoIt(), G4QNGamma::PostStepDoIt(), G4QLowEnergy::PostStepDoIt(), G4QIonIonElastic::PostStepDoIt(), G4QInelastic::PostStepDoIt(), G4QElastic::PostStepDoIt(), G4QDiffraction::PostStepDoIt(), G4QCoherentChargeExchange::PostStepDoIt(), G4QAtomicElectronScattering::PostStepDoIt(), G4MCTSimVertex::Print(), G4PSCylinderSurfaceFlux::ProcessHits(), G4GDMLReadSolids::ReflectedSolidRead(), G4GDMLReadStructure::ReplicaRead(), G4PAIModel::SampleFluctuations(), G4INCL::ParticleSampler::sampleParticles(), G4NuclNuclDiffuseElastic::SampleTableThetaCMS(), G4DiffuseElastic::SampleTableThetaCMS(), G4INCL::Particle::setPosition(), G4INCL::Cluster::setPosition(), G4INCL::StandardPropagationModel::shootComposite(), G4INCL::StandardPropagationModel::shootParticle(), G4CoupledTransportation::StartTracking(), XML_GetCurrentColumnNumber(), XML_GetCurrentLineNumber(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define positionPtr   (parser->m_positionPtr)

Definition at line 604 of file xmlparse.cc.

Referenced by XML_GetCurrentColumnNumber(), XML_GetCurrentLineNumber(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define PROBE_STEP ( hash,
mask,
power   )     ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))

Definition at line 125 of file xmlparse.cc.

#define processingInstructionHandler   (parser->m_processingInstructionHandler)

Definition at line 560 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetProcessingInstructionHandler().

#define processor   (parser->m_processor)

Definition at line 600 of file xmlparse.cc.

Referenced by G4UnionSolid::CreatePolyhedron(), G4SubtractionSolid::CreatePolyhedron(), G4IntersectionSolid::CreatePolyhedron(), XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define prologState   (parser->m_prologState)

Definition at line 599 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate().

#define protocolEncodingName   (parser->m_protocolEncodingName)

Definition at line 596 of file xmlparse.cc.

Referenced by XML_SetEncoding().

#define ps_finalBuffer   (parser->m_parsingStatus.finalBuffer)

Definition at line 650 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), XML_Parse(), XML_ParseBuffer(), and XML_ResumeParser().

#define ps_parsing   (parser->m_parsingStatus.parsing)

Definition at line 649 of file xmlparse.cc.

Referenced by XML_GetBuffer(), XML_GetFeatureList(), XML_Parse(), XML_ParseBuffer(), XML_ResumeParser(), XML_SetEncoding(), XML_SetParamEntityParsing(), XML_SetReturnNSTriplet(), XML_StopParser(), and XML_UseForeignDTD().

#define REALLOC ( p,
 )     (parser->m_mem.realloc_fcn((p),(s)))

Definition at line 552 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), XML_MemRealloc(), and XML_Parse().

#define ROUND_UP ( n,
sz   )     (((n) + ((sz) - 1)) & ~((sz) - 1))

Definition at line 74 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define SECOND_HASH ( hash,
mask,
power   )     ((((hash) & ~(mask)) >> ((power) - 1)) & ((mask) >> 2))

Definition at line 123 of file xmlparse.cc.

#define skippedEntityHandler   (parser->m_skippedEntityHandler)

Definition at line 582 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), and XML_SetSkippedEntityHandler().

#define startCdataSectionHandler   (parser->m_startCdataSectionHandler)

Definition at line 563 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetCdataSectionHandler(), and XML_SetStartCdataSectionHandler().

#define startDoctypeDeclHandler   (parser->m_startDoctypeDeclHandler)

Definition at line 567 of file xmlparse.cc.

Referenced by XML_SetDoctypeDeclHandler(), and XML_SetStartDoctypeDeclHandler().

#define startElementHandler   (parser->m_startElementHandler)

Definition at line 557 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_GetFeatureList(), XML_SetElementHandler(), and XML_SetStartElementHandler().

#define startNamespaceDeclHandler   (parser->m_startNamespaceDeclHandler)

Definition at line 572 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), XML_SetNamespaceDeclHandler(), and XML_SetStartNamespaceDeclHandler().

#define tagLevel   (parser->m_tagLevel)

Definition at line 610 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define tagStack   (parser->m_tagStack)

Definition at line 635 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), XML_ParserFree(), and XML_ParserReset().

#define temp2Pool   (parser->m_temp2Pool)

Definition at line 644 of file xmlparse.cc.

Referenced by XML_ParserFree(), and XML_ParserReset().

#define tempPool   (parser->m_tempPool)

Definition at line 643 of file xmlparse.cc.

Referenced by XML_GetFeatureList(), XML_ParserFree(), XML_ParserReset(), and XML_SetEncoding().

#define unknownEncodingData   (parser->m_unknownEncodingData)

Definition at line 592 of file xmlparse.cc.

Referenced by XML_ParserFree(), and XML_ParserReset().

#define unknownEncodingHandler   (parser->m_unknownEncodingHandler)

Definition at line 583 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetUnknownEncodingHandler().

#define unknownEncodingHandlerData   (parser->m_unknownEncodingHandlerData)

Definition at line 593 of file xmlparse.cc.

Referenced by XML_SetUnknownEncodingHandler().

#define unknownEncodingMem   (parser->m_unknownEncodingMem)

Definition at line 591 of file xmlparse.cc.

Referenced by XML_ParserFree(), and XML_ParserReset().

#define unknownEncodingRelease   (parser->m_unknownEncodingRelease)

Definition at line 595 of file xmlparse.cc.

Referenced by XML_ParserFree(), and XML_ParserReset().

#define unparsedEntityDeclHandler   (parser->m_unparsedEntityDeclHandler)

Definition at line 569 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetUnparsedEntityDeclHandler().

#define userData   (parser->m_userData)

Definition at line 555 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetUserData().

#define V1 ( a,
b,
 )     XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c)

Referenced by G4QBesIKJY::operator()().

#define V2 ( a,
b,
 )     XML_L("expat_")V1(a,b,c)

Referenced by G4QBesIKJY::operator()(), and XML_ExpatVersion().

#define XML_BUILDING_EXPAT   1

Definition at line 9 of file xmlparse.cc.

#define XML_ENCODE_MAX   XML_UTF8_ENCODE_MAX

Definition at line 36 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define XML_L (  )     x

Definition at line 69 of file xmlparse.cc.

Referenced by XML_ErrorString(), and XML_GetFeatureList().

#define XML_T (  )     x

Definition at line 68 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define XmlConvert   XmlUtf8Convert

Definition at line 37 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define xmlDeclHandler   (parser->m_xmlDeclHandler)

Definition at line 587 of file xmlparse.cc.

Referenced by XML_ExternalEntityParserCreate(), and XML_SetXmlDeclHandler().

#define XmlEncode   XmlUtf8Encode

Definition at line 40 of file xmlparse.cc.

Referenced by XML_GetFeatureList().

#define XmlGetInternalEncoding   XmlGetUtf8InternalEncoding

Definition at line 38 of file xmlparse.cc.

#define XmlGetInternalEncodingNS   XmlGetInternalEncoding

Definition at line 51 of file xmlparse.cc.

#define XmlGetInternalEncodingNS   XmlGetUtf8InternalEncodingNS

Definition at line 51 of file xmlparse.cc.

#define XmlInitEncodingNS   XmlInitEncoding

Definition at line 48 of file xmlparse.cc.

#define XmlInitUnknownEncodingNS   XmlInitUnknownEncoding

Definition at line 49 of file xmlparse.cc.

#define XmlParseXmlDeclNS   XmlParseXmlDecl

Definition at line 52 of file xmlparse.cc.


Typedef Documentation

typedef struct attribute_id ATTRIBUTE_ID

typedef struct binding BINDING

typedef struct block BLOCK

typedef char ICHAR

Definition at line 42 of file xmlparse.cc.

typedef const XML_Char* KEY

Definition at line 89 of file xmlparse.cc.

typedef struct open_internal_entity OPEN_INTERNAL_ENTITY

typedef struct prefix PREFIX

typedef struct tag TAG


Function Documentation

enum XML_Error PTRCALL Processor ( XML_Parser  parser,
const char *  start,
const char *  end,
const char **  endPtr 
)

void XMLCALL XML_DefaultCurrent ( XML_Parser  parser  ) 

Definition at line 1834 of file xmlparse.cc.

References defaultHandler, encoding, eventEndPtr, eventPtr, internalEncoding, and openInternalEntities.

01835 {
01836   if (defaultHandler) {
01837     if (openInternalEntities)
01838       reportDefault(parser,
01839                     internalEncoding,
01840                     openInternalEntities->internalEventPtr,
01841                     openInternalEntities->internalEventEndPtr);
01842     else
01843       reportDefault(parser, encoding, eventPtr, eventEndPtr);
01844   }
01845 }

const XML_LChar* XMLCALL XML_ErrorString ( enum XML_Error  code  ) 

Definition at line 1848 of file xmlparse.cc.

References XML_L.

Referenced by xData_parseEndOfXML().

01849 {
01850   static const XML_LChar* const message[] = {
01851     0,
01852     XML_L("out of memory"),
01853     XML_L("syntax error"),
01854     XML_L("no element found"),
01855     XML_L("not well-formed (invalid token)"),
01856     XML_L("unclosed token"),
01857     XML_L("partial character"),
01858     XML_L("mismatched tag"),
01859     XML_L("duplicate attribute"),
01860     XML_L("junk after document element"),
01861     XML_L("illegal parameter entity reference"),
01862     XML_L("undefined entity"),
01863     XML_L("recursive entity reference"),
01864     XML_L("asynchronous entity"),
01865     XML_L("reference to invalid character number"),
01866     XML_L("reference to binary entity"),
01867     XML_L("reference to external entity in attribute"),
01868     XML_L("XML or text declaration not at start of entity"),
01869     XML_L("unknown encoding"),
01870     XML_L("encoding specified in XML declaration is incorrect"),
01871     XML_L("unclosed CDATA section"),
01872     XML_L("error in processing external entity reference"),
01873     XML_L("document is not standalone"),
01874     XML_L("unexpected parser state - please send a bug report"),
01875     XML_L("entity declared in parameter entity"),
01876     XML_L("requested feature requires XML_DTD support in Expat"),
01877     XML_L("cannot change setting once parsing has begun"),
01878     XML_L("unbound prefix"),
01879     XML_L("must not undeclare prefix"),
01880     XML_L("incomplete markup in parameter entity"),
01881     XML_L("XML declaration not well-formed"),
01882     XML_L("text declaration not well-formed"),
01883     XML_L("illegal character(s) in public id"),
01884     XML_L("parser suspended"),
01885     XML_L("parser not suspended"),
01886     XML_L("parsing aborted"),
01887     XML_L("parsing finished"),
01888     XML_L("cannot suspend in external parameter entity"),
01889     XML_L("reserved prefix (xml) must not be undeclared or bound to another namespace name"),
01890     XML_L("reserved prefix (xmlns) must not be declared or undeclared"),
01891     XML_L("prefix must not be bound to one of the reserved namespace names")
01892   };
01893   if (code > 0 && unsigned(code) < sizeof(message)/sizeof(message[0]))
01894     return message[code];
01895   return NULL;
01896 }

const XML_LChar* XMLCALL XML_ExpatVersion ( void   ) 

Definition at line 1899 of file xmlparse.cc.

References V2.

01899                        {
01900 
01901   /* V1 is used to string-ize the version number. However, it would
01902      string-ize the actual version macro *names* unless we get them
01903      substituted before being passed to V1. CPP is defined to expand
01904      a macro, then rescan for more expansions. Thus, we use V2 to expand
01905      the version macros, then CPP will expand the resulting V1() macro
01906      with the correct numerals. */
01907   /* ### I'm assuming cpp is portable in this respect... */
01908 
01909 #define V1(a,b,c) XML_L(#a)XML_L(".")XML_L(#b)XML_L(".")XML_L(#c)
01910 #define V2(a,b,c) XML_L("expat_")V1(a,b,c)
01911 
01912   return V2(XML_MAJOR_VERSION, XML_MINOR_VERSION, XML_MICRO_VERSION);
01913 
01914 #undef V1
01915 #undef V2
01916 }

XML_Expat_Version XMLCALL XML_ExpatVersionInfo ( void   ) 

Definition at line 1919 of file xmlparse.cc.

01920 {
01921   XML_Expat_Version version;
01922 
01923   version.major = XML_MAJOR_VERSION;
01924   version.minor = XML_MINOR_VERSION;
01925   version.micro = XML_MICRO_VERSION;
01926 
01927   return version;
01928 }

XML_Parser XMLCALL XML_ExternalEntityParserCreate ( XML_Parser  oldParser,
const XML_Char *  context,
const XML_Char *  encodingName 
)

Definition at line 939 of file xmlparse.cc.

References _dtd, attlistDeclHandler, characterDataHandler, commentHandler, declElementType, defaultExpandInternalEntities, defaultHandler, elementDeclHandler, endCdataSectionHandler, endElementHandler, endNamespaceDeclHandler, entityDeclHandler, externalEntityRefHandler, externalEntityRefHandlerArg, handlerArg, namespaceSeparator, notationDeclHandler, notStandaloneHandler, ns, ns_triplets, parentParser, processingInstructionHandler, processor, prologState, skippedEntityHandler, startCdataSectionHandler, startElementHandler, startNamespaceDeclHandler, unknownEncodingHandler, unparsedEntityDeclHandler, userData, XML_ParserFree(), and xmlDeclHandler.

00942 {
00943   XML_Parser parser = oldParser;
00944   DTD *newDtd = NULL;
00945   DTD *oldDtd = _dtd;
00946   XML_StartElementHandler oldStartElementHandler = startElementHandler;
00947   XML_EndElementHandler oldEndElementHandler = endElementHandler;
00948   XML_CharacterDataHandler oldCharacterDataHandler = characterDataHandler;
00949   XML_ProcessingInstructionHandler oldProcessingInstructionHandler
00950       = processingInstructionHandler;
00951   XML_CommentHandler oldCommentHandler = commentHandler;
00952   XML_StartCdataSectionHandler oldStartCdataSectionHandler
00953       = startCdataSectionHandler;
00954   XML_EndCdataSectionHandler oldEndCdataSectionHandler
00955       = endCdataSectionHandler;
00956   XML_DefaultHandler oldDefaultHandler = defaultHandler;
00957   XML_UnparsedEntityDeclHandler oldUnparsedEntityDeclHandler
00958       = unparsedEntityDeclHandler;
00959   XML_NotationDeclHandler oldNotationDeclHandler = notationDeclHandler;
00960   XML_StartNamespaceDeclHandler oldStartNamespaceDeclHandler
00961       = startNamespaceDeclHandler;
00962   XML_EndNamespaceDeclHandler oldEndNamespaceDeclHandler
00963       = endNamespaceDeclHandler;
00964   XML_NotStandaloneHandler oldNotStandaloneHandler = notStandaloneHandler;
00965   XML_ExternalEntityRefHandler oldExternalEntityRefHandler
00966       = externalEntityRefHandler;
00967   XML_SkippedEntityHandler oldSkippedEntityHandler = skippedEntityHandler;
00968   XML_UnknownEncodingHandler oldUnknownEncodingHandler
00969       = unknownEncodingHandler;
00970   XML_ElementDeclHandler oldElementDeclHandler = elementDeclHandler;
00971   XML_AttlistDeclHandler oldAttlistDeclHandler = attlistDeclHandler;
00972   XML_EntityDeclHandler oldEntityDeclHandler = entityDeclHandler;
00973   XML_XmlDeclHandler oldXmlDeclHandler = xmlDeclHandler;
00974   ELEMENT_TYPE * oldDeclElementType = declElementType;
00975 
00976   void *oldUserData = userData;
00977   void *oldHandlerArg = handlerArg;
00978   XML_Bool oldDefaultExpandInternalEntities = defaultExpandInternalEntities;
00979   XML_Parser oldExternalEntityRefHandlerArg = externalEntityRefHandlerArg;
00980 #ifdef XML_DTD
00981   enum XML_ParamEntityParsing oldParamEntityParsing = paramEntityParsing;
00982   int oldInEntityValue = prologState.inEntityValue;
00983 #endif
00984   XML_Bool oldns_triplets = ns_triplets;
00985 
00986 #ifdef XML_DTD
00987   if (!context)
00988     newDtd = oldDtd;
00989 #endif /* XML_DTD */
00990 
00991   /* Note that the magical uses of the pre-processor to make field
00992      access look more like C++ require that `parser' be overwritten
00993      here.  This makes this function more painful to follow than it
00994      would be otherwise.
00995   */
00996   if (ns) {
00997     XML_Char tmp[2];
00998     *tmp = namespaceSeparator;
00999     parser = parserCreate(encodingName, &parser->m_mem, tmp, newDtd);
01000   }
01001   else {
01002     parser = parserCreate(encodingName, &parser->m_mem, NULL, newDtd);
01003   }
01004 
01005   if (!parser)
01006     return NULL;
01007 
01008   startElementHandler = oldStartElementHandler;
01009   endElementHandler = oldEndElementHandler;
01010   characterDataHandler = oldCharacterDataHandler;
01011   processingInstructionHandler = oldProcessingInstructionHandler;
01012   commentHandler = oldCommentHandler;
01013   startCdataSectionHandler = oldStartCdataSectionHandler;
01014   endCdataSectionHandler = oldEndCdataSectionHandler;
01015   defaultHandler = oldDefaultHandler;
01016   unparsedEntityDeclHandler = oldUnparsedEntityDeclHandler;
01017   notationDeclHandler = oldNotationDeclHandler;
01018   startNamespaceDeclHandler = oldStartNamespaceDeclHandler;
01019   endNamespaceDeclHandler = oldEndNamespaceDeclHandler;
01020   notStandaloneHandler = oldNotStandaloneHandler;
01021   externalEntityRefHandler = oldExternalEntityRefHandler;
01022   skippedEntityHandler = oldSkippedEntityHandler;
01023   unknownEncodingHandler = oldUnknownEncodingHandler;
01024   elementDeclHandler = oldElementDeclHandler;
01025   attlistDeclHandler = oldAttlistDeclHandler;
01026   entityDeclHandler = oldEntityDeclHandler;
01027   xmlDeclHandler = oldXmlDeclHandler;
01028   declElementType = oldDeclElementType;
01029   userData = oldUserData;
01030   if (oldUserData == oldHandlerArg)
01031     handlerArg = userData;
01032   else
01033     handlerArg = parser;
01034   if (oldExternalEntityRefHandlerArg != oldParser)
01035     externalEntityRefHandlerArg = oldExternalEntityRefHandlerArg;
01036   defaultExpandInternalEntities = oldDefaultExpandInternalEntities;
01037   ns_triplets = oldns_triplets;
01038   parentParser = oldParser;
01039 #ifdef XML_DTD
01040   paramEntityParsing = oldParamEntityParsing;
01041   prologState.inEntityValue = oldInEntityValue;
01042   if (context) {
01043 #endif /* XML_DTD */
01044     if (!dtdCopy(_dtd, oldDtd, &parser->m_mem)
01045       || !setContext(parser, context)) {
01046       XML_ParserFree(parser);
01047       return NULL;
01048     }
01049     processor = externalEntityInitProcessor;
01050 #ifdef XML_DTD
01051   }
01052   else {
01053     /* The DTD instance referenced by _dtd is shared between the document's
01054        root parser and external PE parsers, therefore one does not need to
01055        call setContext. In addition, one also *must* not call setContext,
01056        because this would overwrite existing prefix->binding pointers in
01057        _dtd with ones that get destroyed with the external PE parser.
01058        This would leave those prefixes with dangling pointers.
01059     */
01060     isParamEntity = XML_TRUE;
01061     XmlPrologStateInitExternalEntity(&prologState);
01062     processor = externalParEntInitProcessor;
01063   }
01064 #endif /* XML_DTD */
01065   return parser;
01066 }

void XMLCALL XML_FreeContentModel ( XML_Parser  parser,
XML_Content *  model 
)

Definition at line 1810 of file xmlparse.cc.

References FREE.

01811 {
01812   FREE(model);
01813 }

const XML_Char* XMLCALL XML_GetBase ( XML_Parser  parser  ) 

Definition at line 1196 of file xmlparse.cc.

References curBase.

01197 {
01198   return curBase;
01199 }

void* XMLCALL XML_GetBuffer ( XML_Parser  parser,
int  len 
)

Definition at line 1601 of file xmlparse.cc.

References buffer, bufferEnd, bufferLim, bufferPtr, errorCode, FREE, INIT_BUFFER_SIZE, MALLOC, and ps_parsing.

Referenced by XML_Parse().

01602 {
01603   switch (ps_parsing) {
01604   case XML_SUSPENDED:
01605     errorCode = XML_ERROR_SUSPENDED;
01606     return NULL;
01607   case XML_FINISHED:
01608     errorCode = XML_ERROR_FINISHED;
01609     return NULL;
01610   default: ;
01611   }
01612 
01613   if (len > bufferLim - bufferEnd) {
01614     /* FIXME avoid integer overflow */
01615     int neededSize = len + (int)(bufferEnd - bufferPtr);
01616 #ifdef XML_CONTEXT_BYTES
01617     int keep = (int)(bufferPtr - buffer);
01618 
01619     if (keep > XML_CONTEXT_BYTES)
01620       keep = XML_CONTEXT_BYTES;
01621     neededSize += keep;
01622 #endif  /* defined XML_CONTEXT_BYTES */
01623     if (neededSize  <= bufferLim - buffer) {
01624 #ifdef XML_CONTEXT_BYTES
01625       if (keep < bufferPtr - buffer) {
01626         int offset = (int)(bufferPtr - buffer) - keep;
01627         memmove(buffer, &buffer[offset], bufferEnd - bufferPtr + keep);
01628         bufferEnd -= offset;
01629         bufferPtr -= offset;
01630       }
01631 #else
01632       memmove(buffer, bufferPtr, bufferEnd - bufferPtr);
01633       bufferEnd = buffer + (bufferEnd - bufferPtr);
01634       bufferPtr = buffer;
01635 #endif  /* not defined XML_CONTEXT_BYTES */
01636     }
01637     else {
01638       char *newBuf;
01639       int bufferSize = (int)(bufferLim - bufferPtr);
01640       if (bufferSize == 0)
01641         bufferSize = INIT_BUFFER_SIZE;
01642       do {
01643         bufferSize *= 2;
01644       } while (bufferSize < neededSize);
01645       newBuf = (char *)MALLOC(bufferSize);
01646       if (newBuf == 0) {
01647         errorCode = XML_ERROR_NO_MEMORY;
01648         return NULL;
01649       }
01650       bufferLim = newBuf + bufferSize;
01651 #ifdef XML_CONTEXT_BYTES
01652       if (bufferPtr) {
01653         int keep = (int)(bufferPtr - buffer);
01654         if (keep > XML_CONTEXT_BYTES)
01655           keep = XML_CONTEXT_BYTES;
01656         memcpy(newBuf, &bufferPtr[-keep], bufferEnd - bufferPtr + keep);
01657         FREE(buffer);
01658         buffer = newBuf;
01659         bufferEnd = buffer + (bufferEnd - bufferPtr) + keep;
01660         bufferPtr = buffer + keep;
01661       }
01662       else {
01663         bufferEnd = newBuf + (bufferEnd - bufferPtr);
01664         bufferPtr = buffer = newBuf;
01665       }
01666 #else
01667       if (bufferPtr) {
01668         memcpy(newBuf, bufferPtr, bufferEnd - bufferPtr);
01669         FREE(buffer);
01670       }
01671       bufferEnd = newBuf + (bufferEnd - bufferPtr);
01672       bufferPtr = buffer = newBuf;
01673 #endif  /* not defined XML_CONTEXT_BYTES */
01674     }
01675   }
01676   return bufferEnd;
01677 }

int XMLCALL XML_GetCurrentByteCount ( XML_Parser  parser  ) 

Definition at line 1769 of file xmlparse.cc.

References eventEndPtr, and eventPtr.

01770 {
01771   if (eventEndPtr && eventPtr)
01772     return (int)(eventEndPtr - eventPtr);
01773   return 0;
01774 }

XML_Index XMLCALL XML_GetCurrentByteIndex ( XML_Parser  parser  ) 

Definition at line 1761 of file xmlparse.cc.

References eventPtr, parseEndByteIndex, and parseEndPtr.

01762 {
01763   if (eventPtr)
01764     return parseEndByteIndex - (parseEndPtr - eventPtr);
01765   return -1;
01766 }

XML_Size XMLCALL XML_GetCurrentColumnNumber ( XML_Parser  parser  ) 

Definition at line 1800 of file xmlparse.cc.

References encoding, eventPtr, position, and positionPtr.

Referenced by xData_parseEndOfXML().

01801 {
01802   if (eventPtr && eventPtr >= positionPtr) {
01803     XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
01804     positionPtr = eventPtr;
01805   }
01806   return position.columnNumber;
01807 }

XML_Size XMLCALL XML_GetCurrentLineNumber ( XML_Parser  parser  ) 

Definition at line 1790 of file xmlparse.cc.

References encoding, eventPtr, position, and positionPtr.

Referenced by xData_parseEndOfXML().

01791 {
01792   if (eventPtr && eventPtr >= positionPtr) {
01793     XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
01794     positionPtr = eventPtr;
01795   }
01796   return position.lineNumber + 1;
01797 }

enum XML_Error XMLCALL XML_GetErrorCode ( XML_Parser  parser  ) 

Definition at line 1755 of file xmlparse.cc.

References errorCode.

Referenced by xData_parseEndOfXML().

01756 {
01757   return errorCode;
01758 }

const XML_Feature* XMLCALL XML_GetFeatureList ( void   ) 

Definition at line 1931 of file xmlparse.cc.

References _dtd, atts, attsSize, ENTITY::base, prefix::binding, tag::bindings, tag::buf, tag::bufEnd, characterDataHandler, dataBuf, dataBufEnd, ELEMENT_TYPE::defaultAtts, defaultExpandInternalEntities, defaultHandler, DTD::elementTypes, encoding, endElementHandler, endNamespaceDeclHandler, eventEndPtr, eventPtr, externalEntityRefHandler, externalEntityRefHandlerArg, FREE, freeBindingList, freeTagList, DTD::generalEntities, handlerArg, DTD::hasParamEntityRefs, DEFAULT_ATTRIBUTE::id, INIT_ATTS_SIZE, INIT_TAG_BUF_SIZE, ENTITY::is_internal, DEFAULT_ATTRIBUTE::isCdata, TAG_NAME::localPart, MALLOC, MUST_CONVERT, CLHEP::detail::n, prefix::name, ENTITY::name, tag::name, namespaceSeparator, ELEMENT_TYPE::nDefaultAtts, binding::nextTagBinding, ENTITY::notation, ns, ns_triplets, ENTITY::open, openInternalEntities, tag::parent, DTD::pool, poolDiscard, poolFinish, poolStart, binding::prefix, TAG_NAME::prefix, binding::prevPrefixBinding, processor, ps_finalBuffer, ps_parsing, ENTITY::publicId, tag::rawName, tag::rawNameLength, REALLOC, ROUND_UP, skippedEntityHandler, DTD::standalone, startCdataSectionHandler, startElementHandler, TAG_NAME::str, TAG_NAME::strLen, ENTITY::systemId, tagLevel, tagStack, tempPool, ENTITY::textPtr, TAG_NAME::uriLen, XML_ENCODE_MAX, XML_L, XML_T, XmlConvert, and XmlEncode.

01932 {
01933   static const XML_Feature features[] = {
01934     {XML_FEATURE_SIZEOF_XML_CHAR,  XML_L("sizeof(XML_Char)"),
01935      sizeof(XML_Char)},
01936     {XML_FEATURE_SIZEOF_XML_LCHAR, XML_L("sizeof(XML_LChar)"),
01937      sizeof(XML_LChar)},
01938 #ifdef XML_UNICODE
01939     {XML_FEATURE_UNICODE,          XML_L("XML_UNICODE"), 0},
01940 #endif
01941 #ifdef XML_UNICODE_WCHAR_T
01942     {XML_FEATURE_UNICODE_WCHAR_T,  XML_L("XML_UNICODE_WCHAR_T"), 0},
01943 #endif
01944 #ifdef XML_DTD
01945     {XML_FEATURE_DTD,              XML_L("XML_DTD"), 0},
01946 #endif
01947 #ifdef XML_CONTEXT_BYTES
01948     {XML_FEATURE_CONTEXT_BYTES,    XML_L("XML_CONTEXT_BYTES"),
01949      XML_CONTEXT_BYTES},
01950 #endif
01951 #ifdef XML_MIN_SIZE
01952     {XML_FEATURE_MIN_SIZE,         XML_L("XML_MIN_SIZE"), 0},
01953 #endif
01954 #ifdef XML_NS
01955     {XML_FEATURE_NS,               XML_L("XML_NS"), 0},
01956 #endif
01957 #ifdef XML_LARGE_SIZE
01958     {XML_FEATURE_LARGE_SIZE,       XML_L("XML_LARGE_SIZE"), 0},
01959 #endif    
01960     {XML_FEATURE_END,              NULL, 0}
01961   };
01962 
01963   return features;
01964 }

int XMLCALL XML_GetIdAttributeIndex ( XML_Parser  parser  ) 

Definition at line 1208 of file xmlparse.cc.

References idAttIndex.

01209 {
01210   return idAttIndex;
01211 }

const char* XMLCALL XML_GetInputContext ( XML_Parser  parser,
int *  offset,
int *  size 
)

Definition at line 1777 of file xmlparse.cc.

References buffer, bufferEnd, and eventPtr.

01778 {
01779 #ifdef XML_CONTEXT_BYTES
01780   if (eventPtr && buffer) {
01781     *offset = (int)(eventPtr - buffer);
01782     *size   = (int)(bufferEnd - buffer);
01783     return buffer;
01784   }
01785 #endif /* defined XML_CONTEXT_BYTES */
01786   return (char *) 0;
01787 }

void XMLCALL XML_GetParsingStatus ( XML_Parser  parser,
XML_ParsingStatus *  status 
)

Definition at line 1748 of file xmlparse.cc.

01749 {
01750   assert(status != NULL);
01751   *status = parser->m_parsingStatus;
01752 }

int XMLCALL XML_GetSpecifiedAttributeCount ( XML_Parser  parser  ) 

Definition at line 1202 of file xmlparse.cc.

References nSpecifiedAtts.

01203 {
01204   return nSpecifiedAtts;
01205 }

void XMLCALL XML_MemFree ( XML_Parser  parser,
void *  ptr 
)

Definition at line 1828 of file xmlparse.cc.

References FREE.

01829 {
01830   FREE(ptr);
01831 }

void* XMLCALL XML_MemMalloc ( XML_Parser  parser,
size_t  size 
)

Definition at line 1816 of file xmlparse.cc.

References MALLOC.

01817 {
01818   return MALLOC(size);
01819 }

void* XMLCALL XML_MemRealloc ( XML_Parser  parser,
void *  ptr,
size_t  size 
)

Definition at line 1822 of file xmlparse.cc.

References REALLOC.

01823 {
01824   return REALLOC(ptr, size);
01825 }

enum XML_Status XMLCALL XML_Parse ( XML_Parser  parser,
const char *  s,
int  len,
int  isFinal 
)

Definition at line 1430 of file xmlparse.cc.

References buffer, bufferEnd, bufferLim, bufferPtr, encoding, errorCode, eventEndPtr, eventPtr, MALLOC, parseEndByteIndex, parseEndPtr, position, positionPtr, processor, ps_finalBuffer, ps_parsing, REALLOC, XML_GetBuffer(), and XML_ParseBuffer().

Referenced by xData_parse(), and xData_parseEndOfXML().

01431 {
01432   switch (ps_parsing) {
01433   case XML_SUSPENDED:
01434     errorCode = XML_ERROR_SUSPENDED;
01435     return XML_STATUS_ERROR;
01436   case XML_FINISHED:
01437     errorCode = XML_ERROR_FINISHED;
01438     return XML_STATUS_ERROR;
01439   default:
01440     ps_parsing = XML_PARSING;
01441   }
01442 
01443   if (len == 0) {
01444     ps_finalBuffer = (XML_Bool)isFinal;
01445     if (!isFinal)
01446       return XML_STATUS_OK;
01447     positionPtr = bufferPtr;
01448     parseEndPtr = bufferEnd;
01449 
01450     /* If data are left over from last buffer, and we now know that these
01451        data are the final chunk of input, then we have to check them again
01452        to detect errors based on that fact.
01453     */
01454     errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);
01455 
01456     if (errorCode == XML_ERROR_NONE) {
01457       switch (ps_parsing) {
01458       case XML_SUSPENDED:
01459         XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
01460         positionPtr = bufferPtr;
01461         return XML_STATUS_SUSPENDED;
01462       case XML_INITIALIZED: 
01463       case XML_PARSING:
01464         ps_parsing = XML_FINISHED;
01465         /* fall through */
01466       default:
01467         return XML_STATUS_OK;
01468       }
01469     }
01470     eventEndPtr = eventPtr;
01471     processor = errorProcessor;
01472     return XML_STATUS_ERROR;
01473   }
01474 #ifndef XML_CONTEXT_BYTES
01475   else if (bufferPtr == bufferEnd) {
01476     const char *end;
01477     int nLeftOver;
01478     enum XML_Error result;
01479     parseEndByteIndex += len;
01480     positionPtr = s;
01481     ps_finalBuffer = (XML_Bool)isFinal;
01482 
01483     errorCode = processor(parser, s, parseEndPtr = s + len, &end);
01484 
01485     if (errorCode != XML_ERROR_NONE) {
01486       eventEndPtr = eventPtr;
01487       processor = errorProcessor;
01488       return XML_STATUS_ERROR;
01489     }
01490     else {
01491       switch (ps_parsing) {
01492       case XML_SUSPENDED:
01493         result = XML_STATUS_SUSPENDED;
01494         break;
01495       case XML_INITIALIZED:
01496       case XML_PARSING:
01497         result = XML_STATUS_OK;
01498         if (isFinal) {
01499           ps_parsing = XML_FINISHED;
01500           return result;
01501         }
01502       }
01503     }
01504 
01505     XmlUpdatePosition(encoding, positionPtr, end, &position);
01506     nLeftOver = s + len - end;
01507     if (nLeftOver) {
01508       if (buffer == NULL || nLeftOver > bufferLim - buffer) {
01509         /* FIXME avoid integer overflow */
01510         char *temp;
01511         temp = (buffer == NULL
01512                 ? (char *)MALLOC(len * 2)
01513                 : (char *)REALLOC(buffer, len * 2));
01514         if (temp == NULL) {
01515           errorCode = XML_ERROR_NO_MEMORY;
01516           return XML_STATUS_ERROR;
01517         }
01518         buffer = temp;
01519         if (!buffer) {
01520           errorCode = XML_ERROR_NO_MEMORY;
01521           eventPtr = eventEndPtr = NULL;
01522           processor = errorProcessor;
01523           return XML_STATUS_ERROR;
01524         }
01525         bufferLim = buffer + len * 2;
01526       }
01527       memcpy(buffer, end, nLeftOver);
01528     }
01529     bufferPtr = buffer;
01530     bufferEnd = buffer + nLeftOver;
01531     positionPtr = bufferPtr;
01532     parseEndPtr = bufferEnd;
01533     eventPtr = bufferPtr;
01534     eventEndPtr = bufferPtr;
01535     return result;
01536   }
01537 #endif  /* not defined XML_CONTEXT_BYTES */
01538   else {
01539     void *buff = XML_GetBuffer(parser, len);
01540     if (buff == NULL)
01541       return XML_STATUS_ERROR;
01542     else {
01543       memcpy(buff, s, len);
01544       return XML_ParseBuffer(parser, len, isFinal);
01545     }
01546   }
01547 }

enum XML_Status XMLCALL XML_ParseBuffer ( XML_Parser  parser,
int  len,
int  isFinal 
)

Definition at line 1550 of file xmlparse.cc.

References bufferEnd, bufferPtr, encoding, errorCode, eventEndPtr, eventPtr, parseEndByteIndex, parseEndPtr, position, positionPtr, processor, ps_finalBuffer, and ps_parsing.

Referenced by XML_Parse().

01551 {
01552   const char *start;
01553   enum XML_Status result = XML_STATUS_OK;
01554 
01555   switch (ps_parsing) {
01556   case XML_SUSPENDED:
01557     errorCode = XML_ERROR_SUSPENDED;
01558     return XML_STATUS_ERROR;
01559   case XML_FINISHED:
01560     errorCode = XML_ERROR_FINISHED;
01561     return XML_STATUS_ERROR;
01562   default:
01563     ps_parsing = XML_PARSING;
01564   }
01565 
01566   start = bufferPtr;
01567   positionPtr = start;
01568   bufferEnd += len;
01569   parseEndPtr = bufferEnd;
01570   parseEndByteIndex += len;
01571   ps_finalBuffer = (XML_Bool)isFinal;
01572 
01573   errorCode = processor(parser, start, parseEndPtr, &bufferPtr);
01574 
01575   if (errorCode != XML_ERROR_NONE) {
01576     eventEndPtr = eventPtr;
01577     processor = errorProcessor;
01578     return XML_STATUS_ERROR;
01579   }
01580   else {
01581     switch (ps_parsing) {
01582     case XML_SUSPENDED:
01583       result = XML_STATUS_SUSPENDED;
01584       break;
01585     case XML_INITIALIZED: 
01586     case XML_PARSING:
01587       if (isFinal) {
01588         ps_parsing = XML_FINISHED;
01589         return result;
01590       }
01591     default: ;  /* should not happen */
01592     }
01593   }
01594 
01595   XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
01596   positionPtr = bufferPtr;
01597   return result;
01598 }

XML_Parser XMLCALL XML_ParserCreate ( const XML_Char *  encodingName  ) 

Definition at line 658 of file xmlparse.cc.

References XML_ParserCreate_MM().

Referenced by xData_parseInitialize().

00659 {
00660   return XML_ParserCreate_MM(encodingName, NULL, NULL);
00661 }

XML_Parser XMLCALL XML_ParserCreate_MM ( const XML_Char *  encodingName,
const XML_Memory_Handling_Suite *  memsuite,
const XML_Char *  nameSep 
)

Definition at line 681 of file xmlparse.cc.

References ns, and XML_ParserFree().

Referenced by XML_ParserCreate(), and XML_ParserCreateNS().

00684 {
00685   XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
00686   if (parser != NULL && ns) {
00687     /* implicit context only set for root parser, since child
00688        parsers (i.e. external entity parsers) will inherit it
00689     */
00690     if (!setContext(parser, implicitContext)) {
00691       XML_ParserFree(parser);
00692       return NULL;
00693     }
00694   }
00695   return parser;
00696 }

XML_Parser XMLCALL XML_ParserCreateNS ( const XML_Char *  encodingName,
XML_Char  nsSep 
)

Definition at line 664 of file xmlparse.cc.

References XML_ParserCreate_MM().

00665 {
00666   XML_Char tmp[2];
00667   *tmp = nsSep;
00668   return XML_ParserCreate_MM(encodingName, NULL, tmp);
00669 }

void XMLCALL XML_ParserFree ( XML_Parser  parser  ) 

Definition at line 1082 of file xmlparse.cc.

References _dtd, atts, buffer, dataBuf, FREE, freeBindingList, freeInternalEntities, freeTagList, groupConnector, inheritedBindings, open_internal_entity::next, nsAtts, openInternalEntities, tag::parent, parentParser, tagStack, temp2Pool, tempPool, unknownEncodingData, unknownEncodingMem, and unknownEncodingRelease.

Referenced by xData_parseEndOfXML(), XML_ExternalEntityParserCreate(), and XML_ParserCreate_MM().

01083 {
01084   TAG *tagList;
01085   OPEN_INTERNAL_ENTITY *entityList;
01086   if (parser == NULL)
01087     return;
01088   /* free tagStack and freeTagList */
01089   tagList = tagStack;
01090   for (;;) {
01091     TAG *p;
01092     if (tagList == NULL) {
01093       if (freeTagList == NULL)
01094         break;
01095       tagList = freeTagList;
01096       freeTagList = NULL;
01097     }
01098     p = tagList;
01099     tagList = tagList->parent;
01100     FREE(p->buf);
01101     destroyBindings(p->bindings, parser);
01102     FREE(p);
01103   }
01104   /* free openInternalEntities and freeInternalEntities */
01105   entityList = openInternalEntities;
01106   for (;;) {
01107     OPEN_INTERNAL_ENTITY *openEntity;
01108     if (entityList == NULL) {
01109       if (freeInternalEntities == NULL)
01110         break;
01111       entityList = freeInternalEntities;
01112       freeInternalEntities = NULL;
01113     }
01114     openEntity = entityList;
01115     entityList = entityList->next;
01116     FREE(openEntity);
01117   }
01118 
01119   destroyBindings(freeBindingList, parser);
01120   destroyBindings(inheritedBindings, parser);
01121   poolDestroy(&tempPool);
01122   poolDestroy(&temp2Pool);
01123 #ifdef XML_DTD
01124   /* external parameter entity parsers share the DTD structure
01125      parser->m_dtd with the root parser, so we must not destroy it
01126   */
01127   if (!isParamEntity && _dtd)
01128 #else
01129   if (_dtd)
01130 #endif /* XML_DTD */
01131     dtdDestroy(_dtd, (XML_Bool)!parentParser, &parser->m_mem);
01132   FREE((void *)atts);
01133   FREE(groupConnector);
01134   FREE(buffer);
01135   FREE(dataBuf);
01136   FREE(nsAtts);
01137   FREE(unknownEncodingMem);
01138   if (unknownEncodingRelease)
01139     unknownEncodingRelease(unknownEncodingData);
01140   FREE(parser);
01141 }

XML_Bool XMLCALL XML_ParserReset ( XML_Parser  parser,
const XML_Char *  encodingName 
)

Definition at line 884 of file xmlparse.cc.

References _dtd, tag::bindings, FREE, freeInternalEntities, freeTagList, inheritedBindings, open_internal_entity::next, openInternalEntities, tag::parent, parentParser, tagStack, temp2Pool, tempPool, unknownEncodingData, unknownEncodingMem, and unknownEncodingRelease.

00885 {
00886   TAG *tStk;
00887   OPEN_INTERNAL_ENTITY *openEntityList;
00888   if (parentParser)
00889     return XML_FALSE;
00890   /* move tagStack to freeTagList */
00891   tStk = tagStack;
00892   while (tStk) {
00893     TAG *tag = tStk;
00894     tStk = tStk->parent;
00895     tag->parent = freeTagList;
00896     moveToFreeBindingList(parser, tag->bindings);
00897     tag->bindings = NULL;
00898     freeTagList = tag;
00899   }
00900   /* move openInternalEntities to freeInternalEntities */
00901   openEntityList = openInternalEntities;
00902   while (openEntityList) {
00903     OPEN_INTERNAL_ENTITY *openEntity = openEntityList;
00904     openEntityList = openEntity->next;
00905     openEntity->next = freeInternalEntities;
00906     freeInternalEntities = openEntity;
00907   }
00908   moveToFreeBindingList(parser, inheritedBindings);
00909   FREE(unknownEncodingMem);
00910   if (unknownEncodingRelease)
00911     unknownEncodingRelease(unknownEncodingData);
00912   poolClear(&tempPool);
00913   poolClear(&temp2Pool);
00914   parserInit(parser, encodingName);
00915   dtdReset(_dtd, &parser->m_mem);
00916   return setContext(parser, implicitContext);
00917 }

enum XML_Status XMLCALL XML_ResumeParser ( XML_Parser  parser  ) 

Definition at line 1710 of file xmlparse.cc.

References bufferPtr, encoding, errorCode, eventEndPtr, eventPtr, parseEndPtr, position, positionPtr, processor, ps_finalBuffer, and ps_parsing.

01711 {
01712   enum XML_Status result = XML_STATUS_OK;
01713 
01714   if (ps_parsing != XML_SUSPENDED) {
01715     errorCode = XML_ERROR_NOT_SUSPENDED;
01716     return XML_STATUS_ERROR;
01717   }
01718   ps_parsing = XML_PARSING;
01719 
01720   errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);
01721 
01722   if (errorCode != XML_ERROR_NONE) {
01723     eventEndPtr = eventPtr;
01724     processor = errorProcessor;
01725     return XML_STATUS_ERROR;
01726   }
01727   else {
01728     switch (ps_parsing) {
01729     case XML_SUSPENDED:
01730       result = XML_STATUS_SUSPENDED;
01731       break;
01732     case XML_INITIALIZED: 
01733     case XML_PARSING:
01734       if (ps_finalBuffer) {
01735         ps_parsing = XML_FINISHED;
01736         return result;
01737       }
01738     default: ;
01739     }
01740   }
01741 
01742   XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
01743   positionPtr = bufferPtr;
01744   return result;
01745 }

void XMLCALL XML_SetAttlistDeclHandler ( XML_Parser  parser,
XML_AttlistDeclHandler  attdecl 
)

Definition at line 1395 of file xmlparse.cc.

References attlistDeclHandler.

01397 {
01398   attlistDeclHandler = attdecl;
01399 }

enum XML_Status XMLCALL XML_SetBase ( XML_Parser  parser,
const XML_Char *  p 
)

Definition at line 1182 of file xmlparse.cc.

References _dtd, and curBase.

01183 {
01184   if (p) {
01185     p = poolCopyString(&_dtd->pool, p);
01186     if (!p)
01187       return XML_STATUS_ERROR;
01188     curBase = p;
01189   }
01190   else
01191     curBase = NULL;
01192   return XML_STATUS_OK;
01193 }

void XMLCALL XML_SetCdataSectionHandler ( XML_Parser  parser,
XML_StartCdataSectionHandler  start,
XML_EndCdataSectionHandler  end 
)

Definition at line 1256 of file xmlparse.cc.

References endCdataSectionHandler, and startCdataSectionHandler.

01259 {
01260   startCdataSectionHandler = start;
01261   endCdataSectionHandler = end;
01262 }

void XMLCALL XML_SetCharacterDataHandler ( XML_Parser  parser,
XML_CharacterDataHandler  handler 
)

Definition at line 1235 of file xmlparse.cc.

References characterDataHandler.

Referenced by xData_parseInitialize().

01237 {
01238   characterDataHandler = handler;
01239 }

void XMLCALL XML_SetCommentHandler ( XML_Parser  parser,
XML_CommentHandler  handler 
)

Definition at line 1249 of file xmlparse.cc.

References commentHandler.

01251 {
01252   commentHandler = handler;
01253 }

void XMLCALL XML_SetDefaultHandler ( XML_Parser  parser,
XML_DefaultHandler  handler 
)

Definition at line 1277 of file xmlparse.cc.

References defaultExpandInternalEntities, and defaultHandler.

01279 {
01280   defaultHandler = handler;
01281   defaultExpandInternalEntities = XML_FALSE;
01282 }

void XMLCALL XML_SetDefaultHandlerExpand ( XML_Parser  parser,
XML_DefaultHandler  handler 
)

Definition at line 1285 of file xmlparse.cc.

References defaultExpandInternalEntities, and defaultHandler.

01287 {
01288   defaultHandler = handler;
01289   defaultExpandInternalEntities = XML_TRUE;
01290 }

void XMLCALL XML_SetDoctypeDeclHandler ( XML_Parser  parser,
XML_StartDoctypeDeclHandler  start,
XML_EndDoctypeDeclHandler  end 
)

Definition at line 1293 of file xmlparse.cc.

References endDoctypeDeclHandler, and startDoctypeDeclHandler.

01296 {
01297   startDoctypeDeclHandler = start;
01298   endDoctypeDeclHandler = end;
01299 }

void XMLCALL XML_SetElementDeclHandler ( XML_Parser  parser,
XML_ElementDeclHandler  eldecl 
)

Definition at line 1388 of file xmlparse.cc.

References elementDeclHandler.

01390 {
01391   elementDeclHandler = eldecl;
01392 }

void XMLCALL XML_SetElementHandler ( XML_Parser  parser,
XML_StartElementHandler  start,
XML_EndElementHandler  end 
)

Definition at line 1214 of file xmlparse.cc.

References endElementHandler, and startElementHandler.

Referenced by xData_parseInitialize().

01217 {
01218   startElementHandler = start;
01219   endElementHandler = end;
01220 }

enum XML_Status XMLCALL XML_SetEncoding ( XML_Parser  parser,
const XML_Char *  encodingName 
)

Definition at line 920 of file xmlparse.cc.

References protocolEncodingName, ps_parsing, and tempPool.

00921 {
00922   /* Block after XML_Parse()/XML_ParseBuffer() has been called.
00923      XXX There's no way for the caller to determine which of the
00924      XXX possible error cases caused the XML_STATUS_ERROR return.
00925   */
00926   if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
00927     return XML_STATUS_ERROR;
00928   if (encodingName == NULL)
00929     protocolEncodingName = NULL;
00930   else {
00931     protocolEncodingName = poolCopyString(&tempPool, encodingName);
00932     if (!protocolEncodingName)
00933       return XML_STATUS_ERROR;
00934   }
00935   return XML_STATUS_OK;
00936 }

void XMLCALL XML_SetEndCdataSectionHandler ( XML_Parser  parser,
XML_EndCdataSectionHandler  end 
)

Definition at line 1271 of file xmlparse.cc.

References endCdataSectionHandler.

01272                                                               {
01273   endCdataSectionHandler = end;
01274 }

void XMLCALL XML_SetEndDoctypeDeclHandler ( XML_Parser  parser,
XML_EndDoctypeDeclHandler  end 
)

Definition at line 1308 of file xmlparse.cc.

References endDoctypeDeclHandler.

01309                                                             {
01310   endDoctypeDeclHandler = end;
01311 }

void XMLCALL XML_SetEndElementHandler ( XML_Parser  parser,
XML_EndElementHandler  end 
)

Definition at line 1229 of file xmlparse.cc.

References endElementHandler.

01230                                                     {
01231   endElementHandler = end;
01232 }

void XMLCALL XML_SetEndNamespaceDeclHandler ( XML_Parser  parser,
XML_EndNamespaceDeclHandler  end 
)

Definition at line 1343 of file xmlparse.cc.

References endNamespaceDeclHandler.

01344                                                                 {
01345   endNamespaceDeclHandler = end;
01346 }

void XMLCALL XML_SetEntityDeclHandler ( XML_Parser  parser,
XML_EntityDeclHandler  handler 
)

Definition at line 1402 of file xmlparse.cc.

References entityDeclHandler.

01404 {
01405   entityDeclHandler = handler;
01406 }

void XMLCALL XML_SetExternalEntityRefHandler ( XML_Parser  parser,
XML_ExternalEntityRefHandler  handler 
)

Definition at line 1356 of file xmlparse.cc.

References externalEntityRefHandler.

01358 {
01359   externalEntityRefHandler = handler;
01360 }

void XMLCALL XML_SetExternalEntityRefHandlerArg ( XML_Parser  parser,
void *  arg 
)

Definition at line 1363 of file xmlparse.cc.

References externalEntityRefHandlerArg.

01364 {
01365   if (arg)
01366     externalEntityRefHandlerArg = (XML_Parser)arg;
01367   else
01368     externalEntityRefHandlerArg = parser;
01369 }

void XMLCALL XML_SetNamespaceDeclHandler ( XML_Parser  parser,
XML_StartNamespaceDeclHandler  start,
XML_EndNamespaceDeclHandler  end 
)

Definition at line 1328 of file xmlparse.cc.

References endNamespaceDeclHandler, and startNamespaceDeclHandler.

01331 {
01332   startNamespaceDeclHandler = start;
01333   endNamespaceDeclHandler = end;
01334 }

void XMLCALL XML_SetNotationDeclHandler ( XML_Parser  parser,
XML_NotationDeclHandler  handler 
)

Definition at line 1321 of file xmlparse.cc.

References notationDeclHandler.

01323 {
01324   notationDeclHandler = handler;
01325 }

void XMLCALL XML_SetNotStandaloneHandler ( XML_Parser  parser,
XML_NotStandaloneHandler  handler 
)

Definition at line 1349 of file xmlparse.cc.

References notStandaloneHandler.

01351 {
01352   notStandaloneHandler = handler;
01353 }

int XMLCALL XML_SetParamEntityParsing ( XML_Parser  parser,
enum XML_ParamEntityParsing  peParsing 
)

Definition at line 1415 of file xmlparse.cc.

References ps_parsing.

01417 {
01418   /* block after XML_Parse()/XML_ParseBuffer() has been called */
01419   if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
01420     return 0;
01421 #ifdef XML_DTD
01422   paramEntityParsing = peParsing;
01423   return 1;
01424 #else
01425   return peParsing == XML_PARAM_ENTITY_PARSING_NEVER;
01426 #endif
01427 }

void XMLCALL XML_SetProcessingInstructionHandler ( XML_Parser  parser,
XML_ProcessingInstructionHandler  handler 
)

Definition at line 1242 of file xmlparse.cc.

References processingInstructionHandler.

01244 {
01245   processingInstructionHandler = handler;
01246 }

void XMLCALL XML_SetReturnNSTriplet ( XML_Parser  parser,
int  do_nst 
)

Definition at line 1164 of file xmlparse.cc.

References ns_triplets, and ps_parsing.

01165 {
01166   /* block after XML_Parse()/XML_ParseBuffer() has been called */
01167   if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
01168     return;
01169   ns_triplets = do_nst ? XML_TRUE : XML_FALSE;
01170 }

void XMLCALL XML_SetSkippedEntityHandler ( XML_Parser  parser,
XML_SkippedEntityHandler  handler 
)

Definition at line 1372 of file xmlparse.cc.

References skippedEntityHandler.

01374 {
01375   skippedEntityHandler = handler;
01376 }

void XMLCALL XML_SetStartCdataSectionHandler ( XML_Parser  parser,
XML_StartCdataSectionHandler  start 
)

Definition at line 1265 of file xmlparse.cc.

References startCdataSectionHandler.

01266                                                                     {
01267   startCdataSectionHandler = start;
01268 }

void XMLCALL XML_SetStartDoctypeDeclHandler ( XML_Parser  parser,
XML_StartDoctypeDeclHandler  start 
)

Definition at line 1302 of file xmlparse.cc.

References startDoctypeDeclHandler.

01303                                                                   {
01304   startDoctypeDeclHandler = start;
01305 }

void XMLCALL XML_SetStartElementHandler ( XML_Parser  parser,
XML_StartElementHandler  start 
)

Definition at line 1223 of file xmlparse.cc.

References startElementHandler.

01224                                                           {
01225   startElementHandler = start;
01226 }

void XMLCALL XML_SetStartNamespaceDeclHandler ( XML_Parser  parser,
XML_StartNamespaceDeclHandler  start 
)

Definition at line 1337 of file xmlparse.cc.

References startNamespaceDeclHandler.

01338                                                                       {
01339   startNamespaceDeclHandler = start;
01340 }

void XMLCALL XML_SetUnknownEncodingHandler ( XML_Parser  parser,
XML_UnknownEncodingHandler  handler,
void *  data 
)

Definition at line 1379 of file xmlparse.cc.

References unknownEncodingHandler, and unknownEncodingHandlerData.

01382 {
01383   unknownEncodingHandler = handler;
01384   unknownEncodingHandlerData = data;
01385 }

void XMLCALL XML_SetUnparsedEntityDeclHandler ( XML_Parser  parser,
XML_UnparsedEntityDeclHandler  handler 
)

Definition at line 1314 of file xmlparse.cc.

References unparsedEntityDeclHandler.

01316 {
01317   unparsedEntityDeclHandler = handler;
01318 }

void XMLCALL XML_SetUserData ( XML_Parser  parser,
void *  p 
)

Definition at line 1173 of file xmlparse.cc.

References handlerArg, and userData.

Referenced by xData_parseInitialize().

01174 {
01175   if (handlerArg == userData)
01176     handlerArg = userData = p;
01177   else
01178     userData = p;
01179 }

void XMLCALL XML_SetXmlDeclHandler ( XML_Parser  parser,
XML_XmlDeclHandler  handler 
)

Definition at line 1409 of file xmlparse.cc.

References xmlDeclHandler.

01410                                                   {
01411   xmlDeclHandler = handler;
01412 }

enum XML_Status XMLCALL XML_StopParser ( XML_Parser  parser,
XML_Bool  resumable 
)

Definition at line 1680 of file xmlparse.cc.

References errorCode, and ps_parsing.

01681 {
01682   switch (ps_parsing) {
01683   case XML_SUSPENDED:
01684     if (resumable) {
01685       errorCode = XML_ERROR_SUSPENDED;
01686       return XML_STATUS_ERROR;
01687     }
01688     ps_parsing = XML_FINISHED;
01689     break;
01690   case XML_FINISHED:
01691     errorCode = XML_ERROR_FINISHED;
01692     return XML_STATUS_ERROR;
01693   default:
01694     if (resumable) {
01695 #ifdef XML_DTD
01696       if (isParamEntity) {
01697         errorCode = XML_ERROR_SUSPEND_PE;
01698         return XML_STATUS_ERROR;
01699       }
01700 #endif
01701       ps_parsing = XML_SUSPENDED;
01702     }
01703     else
01704       ps_parsing = XML_FINISHED;
01705   }
01706   return XML_STATUS_OK;
01707 }

enum XML_Error XMLCALL XML_UseForeignDTD ( XML_Parser  parser,
XML_Bool  useDTD 
)

Definition at line 1150 of file xmlparse.cc.

References ps_parsing.

01151 {
01152 #ifdef XML_DTD
01153   /* block after XML_Parse()/XML_ParseBuffer() has been called */
01154   if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
01155     return XML_ERROR_CANT_CHANGE_FEATURE_ONCE_PARSING;
01156   useForeignDTD = useDTD;
01157   return XML_ERROR_NONE;
01158 #else
01159   return XML_ERROR_FEATURE_REQUIRES_XML_DTD;
01160 #endif
01161 }

void XMLCALL XML_UseParserAsHandlerArg ( XML_Parser  parser  ) 

Definition at line 1144 of file xmlparse.cc.

References handlerArg.

01145 {
01146   handlerArg = parser;
01147 }


Generated on Mon May 27 17:51:18 2013 for Geant4 by  doxygen 1.4.7