Eneboo - Documentación para desarrolladores
'defines' | Funciones
Referencia del Archivo src/libdigidoc/libxml2/SAX2.c
#include "libxml.h"
#include <stdlib.h>
#include <string.h>
#include <limits.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/HTMLtree.h>
#include <libxml/globals.h>
#include "elfgcchack.h"

'defines'

#define IN_LIBXML
#define SIZE_T_MAX   ((size_t)-1)
#define TODO

Funciones

const xmlCharxmlSAX2GetPublicId (void *ctx ATTRIBUTE_UNUSED)
const xmlCharxmlSAX2GetSystemId (void *ctx)
int xmlSAX2GetLineNumber (void *ctx)
int xmlSAX2GetColumnNumber (void *ctx)
int xmlSAX2IsStandalone (void *ctx)
int xmlSAX2HasInternalSubset (void *ctx)
int xmlSAX2HasExternalSubset (void *ctx)
: the root element name

xmlSAX2ExternalSubset: : the user data (XML parser context)

: the external ID : the SYSTEM ID (e.g. filename or URL)

Callback on external subset declaration.

void xmlSAX2InternalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
void xmlSAX2ExternalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID)
xmlParserInputPtr xmlSAX2ResolveEntity (void *ctx, const xmlChar *publicId, const xmlChar *systemId)
: The entity name

xmlSAX2GetParameterEntity: : the user data (XML parser context)

Get a parameter entity by name

Returns the xmlEntityPtr if found.

xmlEntityPtr xmlSAX2GetEntity (void *ctx, const xmlChar *name)
xmlEntityPtr xmlSAX2GetParameterEntity (void *ctx, const xmlChar *name)
: the element name

xmlSAX2ElementDecl: : the user data (XML parser context)

: the element type : the element value tree

An element definition has been parsed

void xmlSAX2ElementDecl (void *ctx, const xmlChar *name, int type, xmlElementContentPtr content)
: The name of the notation

xmlSAX2NotationDecl: : the user data (XML parser context)

: The public ID of the entity : The system ID of the entity

What to do when a notation declaration has been parsed.

void xmlSAX2NotationDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId)
: The name of the entity

xmlSAX2UnparsedEntityDecl: : the user data (XML parser context)

: The public ID of the entity : The system ID of the entity : the name of the notation

What to do when an unparsed entity declaration is parsed

void xmlSAX2UnparsedEntityDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName)
void xmlSAX2SetDocumentLocator (void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)
void xmlSAX2StartDocument (void *ctx)
void xmlSAX2EndDocument (void *ctx)
void xmlSAX2StartElementNs (void *ctx, const xmlChar *localname, const xmlChar *prefix, const xmlChar *URI, int nb_namespaces, const xmlChar **namespaces, int nb_attributes, int nb_defaulted, const xmlChar **attributes)
void xmlSAX2EndElementNs (void *ctx, const xmlChar *localname ATTRIBUTE_UNUSED, const xmlChar *prefix ATTRIBUTE_UNUSED, const xmlChar *URI ATTRIBUTE_UNUSED)

: The entity name

xmlSAX2Reference: : the user data (XML parser context)

called when an entity xmlSAX2Reference is detected.

#define bottom_SAX2
void xmlSAX2EntityDecl (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)
void xmlSAX2AttributeDecl (void *ctx, const xmlChar *elem, const xmlChar *fullname, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree)
void xmlSAX2Reference (void *ctx, const xmlChar *name)
void xmlSAX2Characters (void *ctx, const xmlChar *ch, int len)
void xmlSAX2IgnorableWhitespace (void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch ATTRIBUTE_UNUSED, int len ATTRIBUTE_UNUSED)
void xmlSAX2ProcessingInstruction (void *ctx, const xmlChar *target, const xmlChar *data)
void xmlSAX2Comment (void *ctx, const xmlChar *value)
void xmlSAX2CDataBlock (void *ctx, const xmlChar *value, int len)
int xmlSAXVersion (xmlSAXHandler *hdlr, int version)
void xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr, int warning)
void xmlDefaultSAXHandlerInit (void)

Documentación de los 'defines'

#define bottom_SAX2
#define IN_LIBXML
#define SIZE_T_MAX   ((size_t)-1)
#define TODO
Valor:
xmlGenericError(xmlGenericErrorContext,                         \
            "Unimplemented block at %s:%d\n",                           \
            __FILE__, __LINE__);

TODO:

macro to flag unimplemented blocks XML_CATALOG_PREFER user env to select between system/public prefered option. C.f. Richard Tobin <richard@cogsci.ed.ac.uk> > Just FYI, I am using an environment variable XML_CATALOG_PREFER with > values "system" and "public". I have made the default be "system" to > match yours.


Documentación de las funciones

void xmlDefaultSAXHandlerInit ( void  )

xmlDefaultSAXHandlerInit:

Initialize the default SAX2 handler

void xmlSAX2AttributeDecl ( void *  ctx,
const xmlChar elem,
const xmlChar fullname,
int  type,
int  def,
const xmlChar defaultValue,
xmlEnumerationPtr  tree 
)
void xmlSAX2CDataBlock ( void *  ctx,
const xmlChar value,
int  len 
)

xmlSAX2CDataBlock: : the user data (XML parser context) : The pcdata content : the block length

called when a pcdata block has been parsed

void xmlSAX2Characters ( void *  ctx,
const xmlChar ch,
int  len 
)

xmlSAX2Characters: : the user data (XML parser context) : a xmlChar string : the number of xmlChar

receiving some chars from the parser.

void xmlSAX2Comment ( void *  ctx,
const xmlChar value 
)

xmlSAX2Comment: : the user data (XML parser context) : the xmlSAX2Comment content

A xmlSAX2Comment has been parsed.

void xmlSAX2ElementDecl ( void *  ctx,
const xmlChar name,
int  type,
xmlElementContentPtr  content 
)
void xmlSAX2EndDocument ( void *  ctx)

xmlSAX2EndDocument: : the user data (XML parser context)

called when the document end has been detected.

void xmlSAX2EndElementNs ( void *  ctx,
const xmlChar *localname  ATTRIBUTE_UNUSED,
const xmlChar *prefix  ATTRIBUTE_UNUSED,
const xmlChar *URI  ATTRIBUTE_UNUSED 
)

xmlSAX2EndElementNs: : the user data (XML parser context) : the local name of the element : the element namespace prefix if available : the element namespace name if available

SAX2 callback when an element end has been detected by the parser. It provides the namespace informations for the element.

void xmlSAX2EntityDecl ( void *  ctx,
const xmlChar name,
int  type,
const xmlChar publicId,
const xmlChar systemId,
xmlChar content 
)
void xmlSAX2ExternalSubset ( void *  ctx,
const xmlChar name,
const xmlChar ExternalID,
const xmlChar SystemID 
)
int xmlSAX2GetColumnNumber ( void *  ctx)

xmlSAX2GetColumnNumber: : the user data (XML parser context)

Provide the column number of the current parsing point.

Returns an int

xmlEntityPtr xmlSAX2GetEntity ( void *  ctx,
const xmlChar name 
)
int xmlSAX2GetLineNumber ( void *  ctx)

xmlSAX2GetLineNumber: : the user data (XML parser context)

Provide the line number of the current parsing point.

Returns an int

xmlEntityPtr xmlSAX2GetParameterEntity ( void *  ctx,
const xmlChar name 
)
const xmlChar* xmlSAX2GetPublicId ( void *ctx  ATTRIBUTE_UNUSED)

xmlSAX2GetPublicId: : the user data (XML parser context)

Provides the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"

Returns a xmlChar *

const xmlChar* xmlSAX2GetSystemId ( void *  ctx)

xmlSAX2GetSystemId: : the user data (XML parser context)

Provides the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd

Returns a xmlChar *

int xmlSAX2HasExternalSubset ( void *  ctx)

xmlSAX2HasExternalSubset: : the user data (XML parser context)

Does this document has an external subset

Returns 1 if true

int xmlSAX2HasInternalSubset ( void *  ctx)

xmlSAX2HasInternalSubset: : the user data (XML parser context)

Does this document has an internal subset

Returns 1 if true

void xmlSAX2IgnorableWhitespace ( void *ctx  ATTRIBUTE_UNUSED,
const xmlChar *ch  ATTRIBUTE_UNUSED,
int len  ATTRIBUTE_UNUSED 
)

xmlSAX2IgnorableWhitespace: : the user data (XML parser context) : a xmlChar string : the number of xmlChar

receiving some ignorable whitespaces from the parser. UNUSED: by default the DOM building will use xmlSAX2Characters

void xmlSAX2InitDefaultSAXHandler ( xmlSAXHandler hdlr,
int  warning 
)

xmlSAX2InitDefaultSAXHandler: : the SAX handler

Atención:
: flag if non-zero sets the handler warning procedure

Initialize the default XML SAX2 handler

void xmlSAX2InternalSubset ( void *  ctx,
const xmlChar name,
const xmlChar ExternalID,
const xmlChar SystemID 
)
int xmlSAX2IsStandalone ( void *  ctx)

xmlSAX2IsStandalone: : the user data (XML parser context)

Is this document tagged standalone ?

Returns 1 if true

void xmlSAX2NotationDecl ( void *  ctx,
const xmlChar name,
const xmlChar publicId,
const xmlChar systemId 
)
void xmlSAX2ProcessingInstruction ( void *  ctx,
const xmlChar target,
const xmlChar data 
)

xmlSAX2ProcessingInstruction: : the user data (XML parser context) : the target name : the PI data's

A processing instruction has been parsed.

void xmlSAX2Reference ( void *  ctx,
const xmlChar name 
)
xmlParserInputPtr xmlSAX2ResolveEntity ( void *  ctx,
const xmlChar publicId,
const xmlChar systemId 
)

xmlSAX2ResolveEntity: : the user data (XML parser context) : The public ID of the entity : The system ID of the entity

The entity loader, to control the loading of external entities, the application can either:

Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.

void xmlSAX2SetDocumentLocator ( void *ctx  ATTRIBUTE_UNUSED,
xmlSAXLocatorPtr loc  ATTRIBUTE_UNUSED 
)

xmlSAX2SetDocumentLocator: : the user data (XML parser context) : A SAX Locator

Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case.

void xmlSAX2StartDocument ( void *  ctx)

xmlSAX2StartDocument: : the user data (XML parser context)

called when the document start being processed.

void xmlSAX2StartElementNs ( void *  ctx,
const xmlChar localname,
const xmlChar prefix,
const xmlChar URI,
int  nb_namespaces,
const xmlChar **  namespaces,
int  nb_attributes,
int  nb_defaulted,
const xmlChar **  attributes 
)

xmlSAX2StartElementNs: : the user data (XML parser context) : the local name of the element : the element namespace prefix if available : the element namespace name if available : number of namespace definitions on that node : pointer to the array of prefix/URI pairs namespace definitions : the number of attributes on that node : the number of defaulted attributes. : pointer to the array of (localname/prefix/URI/value/end) attribute values.

SAX2 callback when an element start has been detected by the parser. It provides the namespace informations for the element, as well as the new namespace declarations on the element.

void xmlSAX2UnparsedEntityDecl ( void *  ctx,
const xmlChar name,
const xmlChar publicId,
const xmlChar systemId,
const xmlChar notationName 
)
int xmlSAXVersion ( xmlSAXHandler hdlr,
int  version 
)

xmlSAXVersion: : the SAX handler

Versión:
: the version, 1 or 2

Initialize the default XML SAX handler according to the version

Returns 0 in case of success and -1 in case of error.

 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'