2003-09-29 13:07:08 +04:00
/*
* legacy . c : set of deprecated routines , not to be used anymore but
* kept purely for ABI compatibility
*
* See Copyright for the status of this software .
*
* daniel @ veillard . com
*/
# define IN_LIBXML
# include "libxml.h"
2003-09-30 17:38:04 +04:00
# ifdef LIBXML_LEGACY_ENABLED
2023-12-18 23:32:49 +03:00
# include <stdio.h>
2003-09-30 17:38:04 +04:00
# include <string.h>
2003-09-29 13:07:08 +04:00
# include <libxml/tree.h>
# include <libxml/entities.h>
# include <libxml/SAX.h>
2024-06-16 20:16:47 +03:00
# include <libxml/SAX2.h>
2003-09-29 13:07:08 +04:00
# include <libxml/parserInternals.h>
2003-10-05 17:51:35 +04:00
# include <libxml/HTMLparser.h>
2003-09-29 13:07:08 +04:00
void xmlUpgradeOldNs ( xmlDocPtr doc ) ;
/************************************************************************
* *
* Deprecated functions kept for compatibility *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2004-09-17 12:45:25 +04:00
# ifdef LIBXML_HTML_ENABLED
2003-10-05 17:51:35 +04:00
xmlChar * htmlDecodeEntities ( htmlParserCtxtPtr ctxt , int len , xmlChar end ,
xmlChar end2 , xmlChar end3 ) ;
/**
* htmlDecodeEntities :
* @ ctxt : the parser context
* @ len : the len to decode ( in bytes ! ) , - 1 for no size limit
* @ end : an end marker xmlChar , 0 if none
* @ end2 : an end marker xmlChar , 0 if none
* @ end3 : an end marker xmlChar , 0 if none
*
* Substitute the HTML entities by their value
*
* DEPRECATED ! ! ! !
*
* Returns A newly allocated string with the substitution done . The caller
* must deallocate it !
*/
xmlChar *
htmlDecodeEntities ( htmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED ,
int len ATTRIBUTE_UNUSED , xmlChar end ATTRIBUTE_UNUSED ,
xmlChar end2 ATTRIBUTE_UNUSED ,
xmlChar end3 ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-10-05 17:51:35 +04:00
" htmlDecodeEntities() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
2004-09-17 12:45:25 +04:00
# endif
2003-10-05 17:51:35 +04:00
2003-09-30 17:38:04 +04:00
/**
* xmlInitializePredefinedEntities :
*
* Set up the predefined entities .
* Deprecated call
*/
2003-10-05 17:51:35 +04:00
void
xmlInitializePredefinedEntities ( void )
{
2003-09-30 17:38:04 +04:00
}
/**
* xmlCleanupPredefinedEntities :
*
* Cleanup up the predefined entities table .
* Deprecated call
*/
2003-10-05 17:51:35 +04:00
void
xmlCleanupPredefinedEntities ( void )
{
2003-09-30 17:38:04 +04:00
}
2016-05-21 01:21:43 +03:00
static const char * const xmlFeaturesList [ ] = {
2003-09-30 16:36:01 +04:00
" validate " ,
" load subset " ,
" keep blanks " ,
" disable SAX " ,
" fetch external entities " ,
" substitute entities " ,
" gather line info " ,
" user data " ,
" is html " ,
" is standalone " ,
" stop parser " ,
" document " ,
" is well formed " ,
" is valid " ,
" SAX block " ,
" SAX function internalSubset " ,
" SAX function isStandalone " ,
" SAX function hasInternalSubset " ,
" SAX function hasExternalSubset " ,
" SAX function resolveEntity " ,
" SAX function getEntity " ,
" SAX function entityDecl " ,
" SAX function notationDecl " ,
" SAX function attributeDecl " ,
" SAX function elementDecl " ,
" SAX function unparsedEntityDecl " ,
" SAX function setDocumentLocator " ,
" SAX function startDocument " ,
" SAX function endDocument " ,
" SAX function startElement " ,
" SAX function endElement " ,
" SAX function reference " ,
" SAX function characters " ,
" SAX function ignorableWhitespace " ,
" SAX function processingInstruction " ,
" SAX function comment " ,
" SAX function warning " ,
" SAX function error " ,
" SAX function fatalError " ,
" SAX function getParameterEntity " ,
" SAX function cdataBlock " ,
" SAX function externalSubset " ,
} ;
/**
* xmlGetFeaturesList :
* @ len : the length of the features name array ( input / output )
* @ result : an array of string to be filled with the features name .
*
* Copy at most * @ len feature names into the @ result array
*
* Returns - 1 in case or error , or the total number of features ,
* len is updated with the number of strings copied ,
* strings must not be deallocated
*/
int
2003-10-05 17:51:35 +04:00
xmlGetFeaturesList ( int * len , const char * * result )
{
2003-09-30 16:36:01 +04:00
int ret , i ;
2003-10-05 17:51:35 +04:00
ret = sizeof ( xmlFeaturesList ) / sizeof ( xmlFeaturesList [ 0 ] ) ;
2003-09-30 16:36:01 +04:00
if ( ( len = = NULL ) | | ( result = = NULL ) )
2003-10-05 17:51:35 +04:00
return ( ret ) ;
2003-09-30 16:36:01 +04:00
if ( ( * len < 0 ) | | ( * len > = 1000 ) )
2003-10-05 17:51:35 +04:00
return ( - 1 ) ;
2003-09-30 16:36:01 +04:00
if ( * len > ret )
2003-10-05 17:51:35 +04:00
* len = ret ;
for ( i = 0 ; i < * len ; i + + )
result [ i ] = xmlFeaturesList [ i ] ;
return ( ret ) ;
2003-09-30 16:36:01 +04:00
}
/**
* xmlGetFeature :
* @ ctxt : an XML / HTML parser context
* @ name : the feature name
* @ result : location to store the result
*
* Read the current value of one feature of this parser instance
*
* Returns - 1 in case or error , 0 otherwise
*/
int
2003-10-05 17:51:35 +04:00
xmlGetFeature ( xmlParserCtxtPtr ctxt , const char * name , void * result )
{
2003-09-30 16:36:01 +04:00
if ( ( ctxt = = NULL ) | | ( name = = NULL ) | | ( result = = NULL ) )
2003-10-05 17:51:35 +04:00
return ( - 1 ) ;
2003-09-30 16:36:01 +04:00
if ( ! strcmp ( name , " validate " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > validate ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " keep blanks " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > keepBlanks ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " disable SAX " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > disableSAX ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " fetch external entities " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > loadsubset ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " substitute entities " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > replaceEntities ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " gather line info " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > record_info ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " user data " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( void * * ) result ) = ctxt - > userData ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " is html " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > html ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " is standalone " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > standalone ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " document " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( xmlDocPtr * ) result ) = ctxt - > myDoc ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " is well formed " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > wellFormed ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " is valid " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( int * ) result ) = ctxt - > valid ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX block " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( xmlSAXHandlerPtr * ) result ) = ctxt - > sax ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function internalSubset " ) ) {
* ( ( internalSubsetSAXFunc * ) result ) = ctxt - > sax - > internalSubset ;
} else if ( ! strcmp ( name , " SAX function isStandalone " ) ) {
* ( ( isStandaloneSAXFunc * ) result ) = ctxt - > sax - > isStandalone ;
} else if ( ! strcmp ( name , " SAX function hasInternalSubset " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( hasInternalSubsetSAXFunc * ) result ) =
ctxt - > sax - > hasInternalSubset ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function hasExternalSubset " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( hasExternalSubsetSAXFunc * ) result ) =
ctxt - > sax - > hasExternalSubset ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function resolveEntity " ) ) {
* ( ( resolveEntitySAXFunc * ) result ) = ctxt - > sax - > resolveEntity ;
} else if ( ! strcmp ( name , " SAX function getEntity " ) ) {
* ( ( getEntitySAXFunc * ) result ) = ctxt - > sax - > getEntity ;
} else if ( ! strcmp ( name , " SAX function entityDecl " ) ) {
* ( ( entityDeclSAXFunc * ) result ) = ctxt - > sax - > entityDecl ;
} else if ( ! strcmp ( name , " SAX function notationDecl " ) ) {
* ( ( notationDeclSAXFunc * ) result ) = ctxt - > sax - > notationDecl ;
} else if ( ! strcmp ( name , " SAX function attributeDecl " ) ) {
* ( ( attributeDeclSAXFunc * ) result ) = ctxt - > sax - > attributeDecl ;
} else if ( ! strcmp ( name , " SAX function elementDecl " ) ) {
* ( ( elementDeclSAXFunc * ) result ) = ctxt - > sax - > elementDecl ;
} else if ( ! strcmp ( name , " SAX function unparsedEntityDecl " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( unparsedEntityDeclSAXFunc * ) result ) =
ctxt - > sax - > unparsedEntityDecl ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function setDocumentLocator " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( setDocumentLocatorSAXFunc * ) result ) =
ctxt - > sax - > setDocumentLocator ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function startDocument " ) ) {
* ( ( startDocumentSAXFunc * ) result ) = ctxt - > sax - > startDocument ;
} else if ( ! strcmp ( name , " SAX function endDocument " ) ) {
* ( ( endDocumentSAXFunc * ) result ) = ctxt - > sax - > endDocument ;
} else if ( ! strcmp ( name , " SAX function startElement " ) ) {
* ( ( startElementSAXFunc * ) result ) = ctxt - > sax - > startElement ;
} else if ( ! strcmp ( name , " SAX function endElement " ) ) {
* ( ( endElementSAXFunc * ) result ) = ctxt - > sax - > endElement ;
} else if ( ! strcmp ( name , " SAX function reference " ) ) {
* ( ( referenceSAXFunc * ) result ) = ctxt - > sax - > reference ;
} else if ( ! strcmp ( name , " SAX function characters " ) ) {
* ( ( charactersSAXFunc * ) result ) = ctxt - > sax - > characters ;
} else if ( ! strcmp ( name , " SAX function ignorableWhitespace " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( ignorableWhitespaceSAXFunc * ) result ) =
ctxt - > sax - > ignorableWhitespace ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function processingInstruction " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( processingInstructionSAXFunc * ) result ) =
ctxt - > sax - > processingInstruction ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function comment " ) ) {
* ( ( commentSAXFunc * ) result ) = ctxt - > sax - > comment ;
} else if ( ! strcmp ( name , " SAX function warning " ) ) {
* ( ( warningSAXFunc * ) result ) = ctxt - > sax - > warning ;
} else if ( ! strcmp ( name , " SAX function error " ) ) {
* ( ( errorSAXFunc * ) result ) = ctxt - > sax - > error ;
} else if ( ! strcmp ( name , " SAX function fatalError " ) ) {
* ( ( fatalErrorSAXFunc * ) result ) = ctxt - > sax - > fatalError ;
} else if ( ! strcmp ( name , " SAX function getParameterEntity " ) ) {
2003-10-05 17:51:35 +04:00
* ( ( getParameterEntitySAXFunc * ) result ) =
ctxt - > sax - > getParameterEntity ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function cdataBlock " ) ) {
* ( ( cdataBlockSAXFunc * ) result ) = ctxt - > sax - > cdataBlock ;
} else if ( ! strcmp ( name , " SAX function externalSubset " ) ) {
* ( ( externalSubsetSAXFunc * ) result ) = ctxt - > sax - > externalSubset ;
} else {
2003-10-05 17:51:35 +04:00
return ( - 1 ) ;
2003-09-30 16:36:01 +04:00
}
2003-10-05 17:51:35 +04:00
return ( 0 ) ;
2003-09-30 16:36:01 +04:00
}
/**
* xmlSetFeature :
* @ ctxt : an XML / HTML parser context
* @ name : the feature name
* @ value : pointer to the location of the new value
*
* Change the current value of one feature of this parser instance
*
* Returns - 1 in case or error , 0 otherwise
*/
2003-10-05 17:51:35 +04:00
int
xmlSetFeature ( xmlParserCtxtPtr ctxt , const char * name , void * value )
{
2003-09-30 16:36:01 +04:00
if ( ( ctxt = = NULL ) | | ( name = = NULL ) | | ( value = = NULL ) )
2003-10-05 17:51:35 +04:00
return ( - 1 ) ;
2003-09-30 16:36:01 +04:00
if ( ! strcmp ( name , " validate " ) ) {
2003-10-05 17:51:35 +04:00
int newvalidate = * ( ( int * ) value ) ;
if ( ( ! ctxt - > validate ) & & ( newvalidate ! = 0 ) ) {
if ( ctxt - > vctxt . warning = = NULL )
ctxt - > vctxt . warning = xmlParserValidityWarning ;
if ( ctxt - > vctxt . error = = NULL )
ctxt - > vctxt . error = xmlParserValidityError ;
ctxt - > vctxt . nodeMax = 0 ;
}
2003-09-30 16:36:01 +04:00
ctxt - > validate = newvalidate ;
} else if ( ! strcmp ( name , " keep blanks " ) ) {
ctxt - > keepBlanks = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " disable SAX " ) ) {
ctxt - > disableSAX = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " fetch external entities " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > loadsubset = * ( ( int * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " substitute entities " ) ) {
ctxt - > replaceEntities = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " gather line info " ) ) {
ctxt - > record_info = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " user data " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > userData = * ( ( void * * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " is html " ) ) {
ctxt - > html = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " is standalone " ) ) {
ctxt - > standalone = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " document " ) ) {
ctxt - > myDoc = * ( ( xmlDocPtr * ) value ) ;
} else if ( ! strcmp ( name , " is well formed " ) ) {
ctxt - > wellFormed = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " is valid " ) ) {
ctxt - > valid = * ( ( int * ) value ) ;
} else if ( ! strcmp ( name , " SAX block " ) ) {
ctxt - > sax = * ( ( xmlSAXHandlerPtr * ) value ) ;
} else if ( ! strcmp ( name , " SAX function internalSubset " ) ) {
ctxt - > sax - > internalSubset = * ( ( internalSubsetSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function isStandalone " ) ) {
ctxt - > sax - > isStandalone = * ( ( isStandaloneSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function hasInternalSubset " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > hasInternalSubset =
* ( ( hasInternalSubsetSAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function hasExternalSubset " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > hasExternalSubset =
* ( ( hasExternalSubsetSAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function resolveEntity " ) ) {
ctxt - > sax - > resolveEntity = * ( ( resolveEntitySAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function getEntity " ) ) {
ctxt - > sax - > getEntity = * ( ( getEntitySAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function entityDecl " ) ) {
ctxt - > sax - > entityDecl = * ( ( entityDeclSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function notationDecl " ) ) {
ctxt - > sax - > notationDecl = * ( ( notationDeclSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function attributeDecl " ) ) {
ctxt - > sax - > attributeDecl = * ( ( attributeDeclSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function elementDecl " ) ) {
ctxt - > sax - > elementDecl = * ( ( elementDeclSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function unparsedEntityDecl " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > unparsedEntityDecl =
* ( ( unparsedEntityDeclSAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function setDocumentLocator " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > setDocumentLocator =
* ( ( setDocumentLocatorSAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function startDocument " ) ) {
ctxt - > sax - > startDocument = * ( ( startDocumentSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function endDocument " ) ) {
ctxt - > sax - > endDocument = * ( ( endDocumentSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function startElement " ) ) {
ctxt - > sax - > startElement = * ( ( startElementSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function endElement " ) ) {
ctxt - > sax - > endElement = * ( ( endElementSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function reference " ) ) {
ctxt - > sax - > reference = * ( ( referenceSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function characters " ) ) {
ctxt - > sax - > characters = * ( ( charactersSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function ignorableWhitespace " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > ignorableWhitespace =
* ( ( ignorableWhitespaceSAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function processingInstruction " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > processingInstruction =
* ( ( processingInstructionSAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function comment " ) ) {
ctxt - > sax - > comment = * ( ( commentSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function warning " ) ) {
ctxt - > sax - > warning = * ( ( warningSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function error " ) ) {
ctxt - > sax - > error = * ( ( errorSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function fatalError " ) ) {
ctxt - > sax - > fatalError = * ( ( fatalErrorSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function getParameterEntity " ) ) {
2003-10-05 17:51:35 +04:00
ctxt - > sax - > getParameterEntity =
* ( ( getParameterEntitySAXFunc * ) value ) ;
2003-09-30 16:36:01 +04:00
} else if ( ! strcmp ( name , " SAX function cdataBlock " ) ) {
ctxt - > sax - > cdataBlock = * ( ( cdataBlockSAXFunc * ) value ) ;
} else if ( ! strcmp ( name , " SAX function externalSubset " ) ) {
ctxt - > sax - > externalSubset = * ( ( externalSubsetSAXFunc * ) value ) ;
} else {
2003-10-05 17:51:35 +04:00
return ( - 1 ) ;
2003-09-30 16:36:01 +04:00
}
2003-10-05 17:51:35 +04:00
return ( 0 ) ;
2003-09-30 16:36:01 +04:00
}
2003-09-29 13:07:08 +04:00
/**
* xmlDecodeEntities :
* @ ctxt : the parser context
* @ len : the len to decode ( in bytes ! ) , - 1 for no size limit
* @ what : combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF
* @ end : an end marker xmlChar , 0 if none
* @ end2 : an end marker xmlChar , 0 if none
* @ end3 : an end marker xmlChar , 0 if none
2012-09-11 09:26:36 +04:00
*
2003-09-29 13:07:08 +04:00
* This function is deprecated , we now always process entities content
* through xmlStringDecodeEntities
*
* TODO : remove it in next major release .
*
* [ 67 ] Reference : : = EntityRef | CharRef
*
* [ 69 ] PEReference : : = ' % ' Name ' ; '
*
* Returns A newly allocated string with the substitution done . The caller
* must deallocate it !
*/
xmlChar *
xmlDecodeEntities ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED ,
int len ATTRIBUTE_UNUSED , int what ATTRIBUTE_UNUSED ,
xmlChar end ATTRIBUTE_UNUSED ,
xmlChar end2 ATTRIBUTE_UNUSED ,
xmlChar end3 ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlDecodeEntities() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlNamespaceParseNCName :
* @ ctxt : an XML parser context
*
* parse an XML namespace name .
*
* TODO : this seems not in use anymore , the namespace handling is done on
* top of the SAX interfaces , i . e . not on raw input .
*
* [ NS 3 ] NCName : : = ( Letter | ' _ ' ) ( NCNameChar ) *
*
* [ NS 4 ] NCNameChar : : = Letter | Digit | ' . ' | ' - ' | ' _ ' |
* CombiningChar | Extender
*
* Returns the namespace name or NULL
*/
xmlChar *
xmlNamespaceParseNCName ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlNamespaceParseNCName() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlNamespaceParseQName :
* @ ctxt : an XML parser context
2012-09-11 09:26:36 +04:00
* @ prefix : a xmlChar * *
2003-09-29 13:07:08 +04:00
*
* TODO : this seems not in use anymore , the namespace handling is done on
* top of the SAX interfaces , i . e . not on raw input .
*
* parse an XML qualified name
*
* [ NS 5 ] QName : : = ( Prefix ' : ' ) ? LocalPart
*
* [ NS 6 ] Prefix : : = NCName
*
* [ NS 7 ] LocalPart : : = NCName
*
* Returns the local part , and prefix is updated
* to get the Prefix if any .
*/
xmlChar *
xmlNamespaceParseQName ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED ,
xmlChar * * prefix ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlNamespaceParseQName() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlNamespaceParseNSDef :
* @ ctxt : an XML parser context
*
* parse a namespace prefix declaration
*
* TODO : this seems not in use anymore , the namespace handling is done on
* top of the SAX interfaces , i . e . not on raw input .
*
* [ NS 1 ] NSDef : : = PrefixDef Eq SystemLiteral
*
* [ NS 2 ] PrefixDef : : = ' xmlns ' ( ' : ' NCName ) ?
*
* Returns the namespace name
*/
xmlChar *
xmlNamespaceParseNSDef ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlNamespaceParseNSDef() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlParseQuotedString :
* @ ctxt : an XML parser context
*
* Parse and return a string between quotes or doublequotes
*
* TODO : Deprecated , to be removed at next drop of binary compatibility
*
* Returns the string parser or NULL .
*/
xmlChar *
xmlParseQuotedString ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlParseQuotedString() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlParseNamespace :
* @ ctxt : an XML parser context
*
* xmlParseNamespace : parse specific PI ' < ? namespace . . . ' constructs .
*
* This is what the older xml - name Working Draft specified , a bunch of
* other stuff may still rely on it , so support is still here as
* if it was declared on the root of the Tree : - (
*
* TODO : remove from library
*
* To be removed at next drop of binary compatibility
*/
void
xmlParseNamespace ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlParseNamespace() deprecated function reached \n " ) ;
deprecated = 1 ;
}
}
/**
* xmlScanName :
* @ ctxt : an XML parser context
*
* Trickery : parse an XML name but without consuming the input flow
* Needed for rollback cases . Used only when parsing entities references .
*
* TODO : seems deprecated now , only used in the default part of
* xmlParserHandleReference
*
* [ 4 ] NameChar : : = Letter | Digit | ' . ' | ' - ' | ' _ ' | ' : ' |
* CombiningChar | Extender
*
* [ 5 ] Name : : = ( Letter | ' _ ' | ' : ' ) ( NameChar ) *
*
* [ 6 ] Names : : = Name ( S Name ) *
*
* Returns the Name parsed or NULL
*/
xmlChar *
xmlScanName ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlScanName() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlParserHandleReference :
* @ ctxt : the parser context
2012-09-11 09:26:36 +04:00
*
2003-09-29 13:07:08 +04:00
* TODO : Remove , now deprecated . . . the test is done directly in the
* content parsing
* routines .
*
* [ 67 ] Reference : : = EntityRef | CharRef
*
* [ 68 ] EntityRef : : = ' & ' Name ' ; '
*
* [ WFC : Entity Declared ]
* the Name given in the entity reference must match that in an entity
* declaration , except that well - formed documents need not declare any
2012-09-11 09:26:36 +04:00
* of the following entities : amp , lt , gt , apos , quot .
2003-09-29 13:07:08 +04:00
*
* [ WFC : Parsed Entity ]
* An entity reference must not contain the name of an unparsed entity
*
* [ 66 ] CharRef : : = ' & # ' [ 0 - 9 ] + ' ; ' |
* ' & # x ' [ 0 - 9 a - fA - F ] + ' ; '
*
* A PEReference may have been detected in the current input stream
2012-09-11 09:26:36 +04:00
* the handling is done accordingly to
2003-09-29 13:07:08 +04:00
* http : //www.w3.org/TR/REC-xml#entproc
*/
void
xmlParserHandleReference ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlParserHandleReference() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ;
}
/**
* xmlHandleEntity :
* @ ctxt : an XML parser context
* @ entity : an XML entity pointer .
*
* Default handling of defined entities , when should we define a new input
* stream ? When do we just handle that as a set of chars ?
*
* OBSOLETE : to be removed at some point .
*/
void
xmlHandleEntity ( xmlParserCtxtPtr ctxt ATTRIBUTE_UNUSED ,
xmlEntityPtr entity ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlHandleEntity() deprecated function reached \n " ) ;
deprecated = 1 ;
}
}
/**
* xmlNewGlobalNs :
* @ doc : the document carrying the namespace
* @ href : the URI associated
* @ prefix : the prefix for the namespace
*
* Creation of a Namespace , the old way using PI and without scoping
* DEPRECATED ! ! !
* Returns NULL this functionality had been removed
*/
xmlNsPtr
xmlNewGlobalNs ( xmlDocPtr doc ATTRIBUTE_UNUSED ,
const xmlChar * href ATTRIBUTE_UNUSED ,
const xmlChar * prefix ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlNewGlobalNs() deprecated function reached \n " ) ;
deprecated = 1 ;
}
return ( NULL ) ;
}
/**
* xmlUpgradeOldNs :
* @ doc : a document pointer
2012-09-11 09:26:36 +04:00
*
2003-09-29 13:07:08 +04:00
* Upgrade old style Namespaces ( PI ) and move them to the root of the document .
* DEPRECATED
*/
void
xmlUpgradeOldNs ( xmlDocPtr doc ATTRIBUTE_UNUSED )
{
static int deprecated = 0 ;
if ( ! deprecated ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-09-29 13:07:08 +04:00
" xmlUpgradeOldNs() deprecated function reached \n " ) ;
deprecated = 1 ;
}
}
/**
* xmlEncodeEntities :
* @ doc : the document containing the string
* @ input : A string to convert to XML .
*
* TODO : remove xmlEncodeEntities , once we are not afraid of breaking binary
* compatibility
*
* People must migrate their code to xmlEncodeEntitiesReentrant !
* This routine will issue a warning when encountered .
2012-09-11 09:26:36 +04:00
*
2003-09-29 13:07:08 +04:00
* Returns NULL
*/
const xmlChar *
xmlEncodeEntities ( xmlDocPtr doc ATTRIBUTE_UNUSED ,
2003-10-05 17:51:35 +04:00
const xmlChar * input ATTRIBUTE_UNUSED )
{
2003-09-29 13:07:08 +04:00
static int warning = 1 ;
if ( warning ) {
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-10-05 17:51:35 +04:00
" Deprecated API xmlEncodeEntities() used \n " ) ;
2023-12-18 23:32:49 +03:00
fprintf ( stderr ,
2003-10-05 17:51:35 +04:00
" change code to use xmlEncodeEntitiesReentrant() \n " ) ;
warning = 0 ;
2003-09-29 13:07:08 +04:00
}
2003-10-05 17:51:35 +04:00
return ( NULL ) ;
2003-09-29 13:07:08 +04:00
}
2023-12-27 05:03:26 +03:00
/**
* xmlSetEntityReferenceFunc :
* @ func : A valid function
*
* Set the function to call call back when a xml reference has been made
*/
void
xmlSetEntityReferenceFunc ( xmlEntityReferenceFunc func ATTRIBUTE_UNUSED )
{
}
2003-09-29 13:07:08 +04:00
/************************************************************************
* *
2012-09-11 09:26:36 +04:00
* Old set of SAXv1 functions *
2003-09-29 13:07:08 +04:00
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
static int deprecated_v1_msg = 0 ;
# define DEPRECATED(n) \
if ( deprecated_v1_msg = = 0 ) \
2023-12-18 23:32:49 +03:00
fprintf ( stderr , \
2003-09-29 13:07:08 +04:00
" Use of deprecated SAXv1 function %s \n " , n ) ; \
deprecated_v1_msg + + ;
/**
* getPublicId :
* @ ctx : the user data ( XML parser context )
*
* Provides the public ID e . g . " -//SGMLSOURCE//DTD DEMO//EN "
* DEPRECATED : use xmlSAX2GetPublicId ( )
*
* Returns a xmlChar *
*/
const xmlChar *
getPublicId ( void * ctx )
{
DEPRECATED ( " getPublicId " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2GetPublicId ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* getSystemId :
* @ ctx : the user data ( XML parser context )
*
* Provides the system ID , basically URL or filename e . g .
* http : //www.sgmlsource.com/dtds/memo.dtd
* DEPRECATED : use xmlSAX2GetSystemId ( )
*
* Returns a xmlChar *
*/
const xmlChar *
getSystemId ( void * ctx )
{
DEPRECATED ( " getSystemId " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2GetSystemId ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* getLineNumber :
* @ ctx : the user data ( XML parser context )
*
* Provide the line number of the current parsing point .
* DEPRECATED : use xmlSAX2GetLineNumber ( )
*
* Returns an int
*/
int
getLineNumber ( void * ctx )
{
DEPRECATED ( " getLineNumber " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2GetLineNumber ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* getColumnNumber :
* @ ctx : the user data ( XML parser context )
*
* Provide the column number of the current parsing point .
* DEPRECATED : use xmlSAX2GetColumnNumber ( )
*
* Returns an int
*/
int
getColumnNumber ( void * ctx )
{
DEPRECATED ( " getColumnNumber " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2GetColumnNumber ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* isStandalone :
* @ ctx : the user data ( XML parser context )
*
* Is this document tagged standalone ?
* DEPRECATED : use xmlSAX2IsStandalone ( )
*
* Returns 1 if true
*/
int
isStandalone ( void * ctx )
{
DEPRECATED ( " isStandalone " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2IsStandalone ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* hasInternalSubset :
* @ ctx : the user data ( XML parser context )
*
* Does this document has an internal subset
* DEPRECATED : use xmlSAX2HasInternalSubset ( )
*
* Returns 1 if true
*/
int
hasInternalSubset ( void * ctx )
{
DEPRECATED ( " hasInternalSubset " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2HasInternalSubset ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* hasExternalSubset :
* @ ctx : the user data ( XML parser context )
*
* Does this document has an external subset
* DEPRECATED : use xmlSAX2HasExternalSubset ( )
*
* Returns 1 if true
*/
int
hasExternalSubset ( void * ctx )
{
DEPRECATED ( " hasExternalSubset " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2HasExternalSubset ( ctx ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* internalSubset :
* @ ctx : the user data ( XML parser context )
* @ name : the root element name
* @ ExternalID : the external ID
* @ SystemID : the SYSTEM ID ( e . g . filename or URL )
*
* Callback on internal subset declaration .
* DEPRECATED : use xmlSAX2InternalSubset ( )
*/
void
2003-10-05 17:51:35 +04:00
internalSubset ( void * ctx , const xmlChar * name ,
const xmlChar * ExternalID , const xmlChar * SystemID )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " internalSubset " )
2003-10-05 17:51:35 +04:00
xmlSAX2InternalSubset ( ctx , name , ExternalID , SystemID ) ;
2003-09-29 13:07:08 +04:00
}
/**
* externalSubset :
* @ ctx : the user data ( XML parser context )
* @ name : the root element name
* @ ExternalID : the external ID
* @ SystemID : the SYSTEM ID ( e . g . filename or URL )
*
* Callback on external subset declaration .
* DEPRECATED : use xmlSAX2ExternalSubset ( )
*/
void
2003-10-05 17:51:35 +04:00
externalSubset ( void * ctx , const xmlChar * name ,
const xmlChar * ExternalID , const xmlChar * SystemID )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " externalSubset " )
2003-10-05 17:51:35 +04:00
xmlSAX2ExternalSubset ( ctx , name , ExternalID , SystemID ) ;
2003-09-29 13:07:08 +04:00
}
/**
* resolveEntity :
* @ ctx : the user data ( XML parser context )
* @ publicId : The public ID of the entity
* @ systemId : The system ID of the entity
*
* The entity loader , to control the loading of external entities ,
* the application can either :
* - override this resolveEntity ( ) callback in the SAX block
* - or better use the xmlSetExternalEntityLoader ( ) function to
* set up it ' s own entity resolution routine
* DEPRECATED : use xmlSAX2ResolveEntity ( )
*
* Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour .
*/
xmlParserInputPtr
2003-10-05 17:51:35 +04:00
resolveEntity ( void * ctx , const xmlChar * publicId ,
const xmlChar * systemId )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " resolveEntity " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2ResolveEntity ( ctx , publicId , systemId ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* getEntity :
* @ ctx : the user data ( XML parser context )
* @ name : The entity name
*
* Get an entity by name
* DEPRECATED : use xmlSAX2GetEntity ( )
*
* Returns the xmlEntityPtr if found .
*/
xmlEntityPtr
2003-10-05 17:51:35 +04:00
getEntity ( void * ctx , const xmlChar * name )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " getEntity " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2GetEntity ( ctx , name ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* getParameterEntity :
* @ ctx : the user data ( XML parser context )
* @ name : The entity name
*
* Get a parameter entity by name
* DEPRECATED : use xmlSAX2GetParameterEntity ( )
*
* Returns the xmlEntityPtr if found .
*/
xmlEntityPtr
2003-10-05 17:51:35 +04:00
getParameterEntity ( void * ctx , const xmlChar * name )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " getParameterEntity " )
2003-10-05 17:51:35 +04:00
return ( xmlSAX2GetParameterEntity ( ctx , name ) ) ;
2003-09-29 13:07:08 +04:00
}
/**
* entityDecl :
* @ ctx : the user data ( XML parser context )
2012-09-11 09:26:36 +04:00
* @ name : the entity name
* @ type : the entity type
2003-09-29 13:07:08 +04:00
* @ publicId : The public ID of the entity
* @ systemId : The system ID of the entity
* @ content : the entity value ( without processing ) .
*
* An entity definition has been parsed
* DEPRECATED : use xmlSAX2EntityDecl ( )
*/
void
2003-10-05 17:51:35 +04:00
entityDecl ( void * ctx , const xmlChar * name , int type ,
const xmlChar * publicId , const xmlChar * systemId ,
xmlChar * content )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " entityDecl " )
2003-10-05 17:51:35 +04:00
xmlSAX2EntityDecl ( ctx , name , type , publicId , systemId , content ) ;
2003-09-29 13:07:08 +04:00
}
/**
* attributeDecl :
* @ ctx : the user data ( XML parser context )
* @ elem : the name of the element
2012-09-11 09:26:36 +04:00
* @ fullname : the attribute name
* @ type : the attribute type
2003-09-29 13:07:08 +04:00
* @ def : the type of default value
* @ defaultValue : the attribute default value
* @ tree : the tree of enumerated value set
*
* An attribute definition has been parsed
* DEPRECATED : use xmlSAX2AttributeDecl ( )
*/
void
2003-10-05 17:51:35 +04:00
attributeDecl ( void * ctx , const xmlChar * elem , const xmlChar * fullname ,
int type , int def , const xmlChar * defaultValue ,
xmlEnumerationPtr tree )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " attributeDecl " )
2003-10-05 17:51:35 +04:00
xmlSAX2AttributeDecl ( ctx , elem , fullname , type , def , defaultValue ,
tree ) ;
2003-09-29 13:07:08 +04:00
}
/**
* elementDecl :
* @ ctx : the user data ( XML parser context )
2012-09-11 09:26:36 +04:00
* @ name : the element name
* @ type : the element type
2003-09-29 13:07:08 +04:00
* @ content : the element value tree
*
* An element definition has been parsed
* DEPRECATED : use xmlSAX2ElementDecl ( )
*/
void
elementDecl ( void * ctx , const xmlChar * name , int type ,
xmlElementContentPtr content )
{
DEPRECATED ( " elementDecl " )
2003-10-05 17:51:35 +04:00
xmlSAX2ElementDecl ( ctx , name , type , content ) ;
2003-09-29 13:07:08 +04:00
}
/**
* notationDecl :
* @ ctx : the user data ( XML parser context )
* @ name : The name of the notation
* @ publicId : The public ID of the entity
* @ systemId : The system ID of the entity
*
* What to do when a notation declaration has been parsed .
* DEPRECATED : use xmlSAX2NotationDecl ( )
*/
void
2003-10-05 17:51:35 +04:00
notationDecl ( void * ctx , const xmlChar * name ,
const xmlChar * publicId , const xmlChar * systemId )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " notationDecl " )
2003-10-05 17:51:35 +04:00
xmlSAX2NotationDecl ( ctx , name , publicId , systemId ) ;
2003-09-29 13:07:08 +04:00
}
/**
* unparsedEntityDecl :
* @ ctx : the user data ( XML parser context )
* @ name : The name of the entity
* @ publicId : The public ID of the entity
* @ systemId : The system ID of the entity
* @ notationName : the name of the notation
*
* What to do when an unparsed entity declaration is parsed
* DEPRECATED : use xmlSAX2UnparsedEntityDecl ( )
*/
void
2003-10-05 17:51:35 +04:00
unparsedEntityDecl ( void * ctx , const xmlChar * name ,
const xmlChar * publicId , const xmlChar * systemId ,
const xmlChar * notationName )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " unparsedEntityDecl " )
2003-10-05 17:51:35 +04:00
xmlSAX2UnparsedEntityDecl ( ctx , name , publicId , systemId ,
notationName ) ;
2003-09-29 13:07:08 +04:00
}
/**
* setDocumentLocator :
* @ ctx : the user data ( XML parser context )
* @ loc : A SAX Locator
*
* Receive the document locator at startup , actually xmlDefaultSAXLocator
* Everything is available on the context , so this is useless in our case .
* DEPRECATED
*/
void
2003-10-05 17:51:35 +04:00
setDocumentLocator ( void * ctx ATTRIBUTE_UNUSED ,
xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " setDocumentLocator " )
}
/**
* startDocument :
* @ ctx : the user data ( XML parser context )
*
* called when the document start being processed .
* DEPRECATED : use xmlSAX2StartDocument ( )
*/
void
startDocument ( void * ctx )
{
2003-10-17 16:43:59 +04:00
/* don't be too painful for glade users */
/* DEPRECATED("startDocument") */
2003-10-05 17:51:35 +04:00
xmlSAX2StartDocument ( ctx ) ;
2003-09-29 13:07:08 +04:00
}
/**
* endDocument :
* @ ctx : the user data ( XML parser context )
*
* called when the document end has been detected .
* DEPRECATED : use xmlSAX2EndDocument ( )
*/
void
endDocument ( void * ctx )
{
DEPRECATED ( " endDocument " )
2003-10-05 17:51:35 +04:00
xmlSAX2EndDocument ( ctx ) ;
2003-09-29 13:07:08 +04:00
}
/**
* attribute :
* @ ctx : the user data ( XML parser context )
* @ fullname : The attribute name , including namespace prefix
* @ value : The attribute value
*
* Handle an attribute that has been read by the parser .
* The default handling is to convert the attribute into an
* DOM subtree and past it in a new xmlAttr element added to
* the element .
* DEPRECATED : use xmlSAX2Attribute ( )
*/
void
2003-10-05 17:51:35 +04:00
attribute ( void * ctx ATTRIBUTE_UNUSED ,
const xmlChar * fullname ATTRIBUTE_UNUSED ,
const xmlChar * value ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " attribute " )
}
/**
* startElement :
* @ ctx : the user data ( XML parser context )
* @ fullname : The element name , including namespace prefix
* @ atts : An array of name / value attributes pairs , NULL terminated
*
* called when an opening tag has been processed .
* DEPRECATED : use xmlSAX2StartElement ( )
*/
void
2003-10-05 17:51:35 +04:00
startElement ( void * ctx , const xmlChar * fullname , const xmlChar * * atts )
2003-09-29 13:07:08 +04:00
{
2003-12-24 14:10:17 +03:00
xmlSAX2StartElement ( ctx , fullname , atts ) ;
2003-09-29 13:07:08 +04:00
}
/**
* endElement :
* @ ctx : the user data ( XML parser context )
* @ name : The element name
*
* called when the end of an element has been detected .
* DEPRECATED : use xmlSAX2EndElement ( )
*/
void
2003-10-05 17:51:35 +04:00
endElement ( void * ctx , const xmlChar * name ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " endElement " )
2014-02-10 06:32:45 +04:00
xmlSAX2EndElement ( ctx , name ) ;
2003-09-29 13:07:08 +04:00
}
/**
* reference :
* @ ctx : the user data ( XML parser context )
* @ name : The entity name
*
2012-09-11 09:26:36 +04:00
* called when an entity reference is detected .
2003-09-29 13:07:08 +04:00
* DEPRECATED : use xmlSAX2Reference ( )
*/
void
2003-10-05 17:51:35 +04:00
reference ( void * ctx , const xmlChar * name )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " reference " )
2003-10-05 17:51:35 +04:00
xmlSAX2Reference ( ctx , name ) ;
2003-09-29 13:07:08 +04:00
}
/**
* characters :
* @ ctx : the user data ( XML parser context )
* @ ch : a xmlChar string
* @ len : the number of xmlChar
*
* receiving some chars from the parser .
* DEPRECATED : use xmlSAX2Characters ( )
*/
void
2003-10-05 17:51:35 +04:00
characters ( void * ctx , const xmlChar * ch , int len )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " characters " )
2003-10-05 17:51:35 +04:00
xmlSAX2Characters ( ctx , ch , len ) ;
2003-09-29 13:07:08 +04:00
}
/**
* ignorableWhitespace :
* @ ctx : the user data ( XML parser context )
* @ ch : a xmlChar string
* @ len : the number of xmlChar
*
* receiving some ignorable whitespaces from the parser .
* UNUSED : by default the DOM building will use characters
* DEPRECATED : use xmlSAX2IgnorableWhitespace ( )
*/
void
2003-10-05 17:51:35 +04:00
ignorableWhitespace ( void * ctx ATTRIBUTE_UNUSED ,
const xmlChar * ch ATTRIBUTE_UNUSED ,
int len ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " ignorableWhitespace " )
}
/**
* processingInstruction :
* @ ctx : the user data ( XML parser context )
* @ target : the target name
* @ data : the PI data ' s
*
* A processing instruction has been parsed .
* DEPRECATED : use xmlSAX2ProcessingInstruction ( )
*/
void
2003-10-05 17:51:35 +04:00
processingInstruction ( void * ctx , const xmlChar * target ,
const xmlChar * data )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " processingInstruction " )
2003-10-05 17:51:35 +04:00
xmlSAX2ProcessingInstruction ( ctx , target , data ) ;
2003-09-29 13:07:08 +04:00
}
/**
* globalNamespace :
* @ ctx : the user data ( XML parser context )
* @ href : the namespace associated URN
* @ prefix : the namespace prefix
*
* An old global namespace has been parsed .
* DEPRECATED
*/
void
2003-10-05 17:51:35 +04:00
globalNamespace ( void * ctx ATTRIBUTE_UNUSED ,
const xmlChar * href ATTRIBUTE_UNUSED ,
const xmlChar * prefix ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " globalNamespace " )
}
/**
* setNamespace :
* @ ctx : the user data ( XML parser context )
* @ name : the namespace prefix
*
* Set the current element namespace .
* DEPRECATED
*/
void
2003-10-05 17:51:35 +04:00
setNamespace ( void * ctx ATTRIBUTE_UNUSED ,
const xmlChar * name ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " setNamespace " )
}
/**
* getNamespace :
* @ ctx : the user data ( XML parser context )
*
* Get the current element namespace .
* DEPRECATED
*
* Returns the xmlNsPtr or NULL if none
*/
xmlNsPtr
getNamespace ( void * ctx ATTRIBUTE_UNUSED )
{
DEPRECATED ( " getNamespace " )
2003-10-05 17:51:35 +04:00
return ( NULL ) ;
2003-09-29 13:07:08 +04:00
}
/**
* checkNamespace :
* @ ctx : the user data ( XML parser context )
* @ namespace : the namespace to check against
*
* Check that the current element namespace is the same as the
* one read upon parsing .
* DEPRECATED
*
* Returns 1 if true 0 otherwise
*/
int
2003-10-05 17:51:35 +04:00
checkNamespace ( void * ctx ATTRIBUTE_UNUSED ,
xmlChar * namespace ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " checkNamespace " )
2003-10-05 17:51:35 +04:00
return ( 0 ) ;
2003-09-29 13:07:08 +04:00
}
/**
* namespaceDecl :
* @ ctx : the user data ( XML parser context )
* @ href : the namespace associated URN
* @ prefix : the namespace prefix
*
* A namespace has been parsed .
* DEPRECATED
*/
void
2003-10-05 17:51:35 +04:00
namespaceDecl ( void * ctx ATTRIBUTE_UNUSED ,
const xmlChar * href ATTRIBUTE_UNUSED ,
const xmlChar * prefix ATTRIBUTE_UNUSED )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " namespaceDecl " )
}
/**
* comment :
* @ ctx : the user data ( XML parser context )
* @ value : the comment content
*
* A comment has been parsed .
* DEPRECATED : use xmlSAX2Comment ( )
*/
void
2003-10-05 17:51:35 +04:00
comment ( void * ctx , const xmlChar * value )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " comment " )
2003-10-05 17:51:35 +04:00
xmlSAX2Comment ( ctx , value ) ;
2003-09-29 13:07:08 +04:00
}
/**
* cdataBlock :
* @ ctx : the user data ( XML parser context )
* @ value : The pcdata content
* @ len : the block length
*
* called when a pcdata block has been parsed
* DEPRECATED : use xmlSAX2CDataBlock ( )
*/
void
2003-10-05 17:51:35 +04:00
cdataBlock ( void * ctx , const xmlChar * value , int len )
2003-09-29 13:07:08 +04:00
{
DEPRECATED ( " cdataBlock " )
2003-10-05 17:51:35 +04:00
xmlSAX2CDataBlock ( ctx , value , len ) ;
2003-09-29 13:07:08 +04:00
}
2022-02-20 20:46:42 +03:00
2024-06-16 20:16:47 +03:00
/**
* initxmlDefaultSAXHandler :
* @ hdlr : the SAX handler
* @ warning : flag if non - zero sets the handler warning procedure
*
* Initialize the default XML SAX version 1 handler
* DEPRECATED : use xmlSAX2InitDefaultSAXHandler ( ) for the new SAX2 blocks
*/
void
initxmlDefaultSAXHandler ( xmlSAXHandlerV1 * hdlr , int warning )
{
if ( hdlr - > initialized = = 1 )
return ;
hdlr - > internalSubset = xmlSAX2InternalSubset ;
hdlr - > externalSubset = xmlSAX2ExternalSubset ;
hdlr - > isStandalone = xmlSAX2IsStandalone ;
hdlr - > hasInternalSubset = xmlSAX2HasInternalSubset ;
hdlr - > hasExternalSubset = xmlSAX2HasExternalSubset ;
hdlr - > resolveEntity = xmlSAX2ResolveEntity ;
hdlr - > getEntity = xmlSAX2GetEntity ;
hdlr - > getParameterEntity = xmlSAX2GetParameterEntity ;
hdlr - > entityDecl = xmlSAX2EntityDecl ;
hdlr - > attributeDecl = xmlSAX2AttributeDecl ;
hdlr - > elementDecl = xmlSAX2ElementDecl ;
hdlr - > notationDecl = xmlSAX2NotationDecl ;
hdlr - > unparsedEntityDecl = xmlSAX2UnparsedEntityDecl ;
hdlr - > setDocumentLocator = xmlSAX2SetDocumentLocator ;
hdlr - > startDocument = xmlSAX2StartDocument ;
hdlr - > endDocument = xmlSAX2EndDocument ;
hdlr - > startElement = xmlSAX2StartElement ;
hdlr - > endElement = xmlSAX2EndElement ;
hdlr - > reference = xmlSAX2Reference ;
hdlr - > characters = xmlSAX2Characters ;
hdlr - > cdataBlock = xmlSAX2CDataBlock ;
hdlr - > ignorableWhitespace = xmlSAX2Characters ;
hdlr - > processingInstruction = xmlSAX2ProcessingInstruction ;
if ( warning = = 0 )
hdlr - > warning = NULL ;
else
hdlr - > warning = xmlParserWarning ;
hdlr - > error = xmlParserError ;
hdlr - > fatalError = xmlParserError ;
hdlr - > initialized = 1 ;
}
/**
* inithtmlDefaultSAXHandler :
* @ hdlr : the SAX handler
*
* Initialize the default HTML SAX version 1 handler
* DEPRECATED : use xmlSAX2InitHtmlDefaultSAXHandler ( ) for the new SAX2 blocks
*/
void
inithtmlDefaultSAXHandler ( xmlSAXHandlerV1 * hdlr )
{
if ( hdlr - > initialized = = 1 )
return ;
hdlr - > internalSubset = xmlSAX2InternalSubset ;
hdlr - > externalSubset = NULL ;
hdlr - > isStandalone = NULL ;
hdlr - > hasInternalSubset = NULL ;
hdlr - > hasExternalSubset = NULL ;
hdlr - > resolveEntity = NULL ;
hdlr - > getEntity = xmlSAX2GetEntity ;
hdlr - > getParameterEntity = NULL ;
hdlr - > entityDecl = NULL ;
hdlr - > attributeDecl = NULL ;
hdlr - > elementDecl = NULL ;
hdlr - > notationDecl = NULL ;
hdlr - > unparsedEntityDecl = NULL ;
hdlr - > setDocumentLocator = xmlSAX2SetDocumentLocator ;
hdlr - > startDocument = xmlSAX2StartDocument ;
hdlr - > endDocument = xmlSAX2EndDocument ;
hdlr - > startElement = xmlSAX2StartElement ;
hdlr - > endElement = xmlSAX2EndElement ;
hdlr - > reference = NULL ;
hdlr - > characters = xmlSAX2Characters ;
hdlr - > cdataBlock = xmlSAX2CDataBlock ;
hdlr - > ignorableWhitespace = xmlSAX2IgnorableWhitespace ;
hdlr - > processingInstruction = xmlSAX2ProcessingInstruction ;
hdlr - > comment = xmlSAX2Comment ;
hdlr - > warning = xmlParserWarning ;
hdlr - > error = xmlParserError ;
hdlr - > fatalError = xmlParserError ;
hdlr - > initialized = 1 ;
}
2023-08-20 23:50:57 +03:00
/*
* nanoftp . h
*/
2023-09-29 14:18:34 +03:00
# ifdef _WIN32
# include <winsock2.h>
# else
# define SOCKET int
# endif
typedef void
( * ftpListCallback ) ( void * userData , const char * filename , const char * attrib ,
const char * owner , const char * group , unsigned long size ,
int links , int year , const char * month , int day , int hour ,
int minute ) ;
typedef void
( * ftpDataCallback ) ( void * userData , const char * data , int len ) ;
XMLPUBFUN void
xmlNanoFTPInit ( void ) ;
2023-08-20 23:50:57 +03:00
void
xmlNanoFTPInit ( void ) {
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
xmlNanoFTPCleanup ( void ) ;
2023-08-20 23:50:57 +03:00
void
xmlNanoFTPCleanup ( void ) {
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
xmlNanoFTPProxy ( const char * host , int port , const char * user ,
const char * passwd , int type ) ;
2023-08-20 23:50:57 +03:00
void
xmlNanoFTPProxy ( const char * host ATTRIBUTE_UNUSED , int port ATTRIBUTE_UNUSED ,
const char * user ATTRIBUTE_UNUSED ,
const char * passwd ATTRIBUTE_UNUSED , int type ATTRIBUTE_UNUSED ) {
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPUpdateURL ( void * ctx , const char * URL ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPUpdateURL ( void * ctx ATTRIBUTE_UNUSED ,
const char * URL ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
xmlNanoFTPScanProxy ( const char * URL ) ;
2023-08-20 23:50:57 +03:00
void
xmlNanoFTPScanProxy ( const char * URL ATTRIBUTE_UNUSED ) {
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void *
xmlNanoFTPNewCtxt ( const char * URL ) ;
2023-08-20 23:50:57 +03:00
void *
xmlNanoFTPNewCtxt ( const char * URL ATTRIBUTE_UNUSED ) {
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
xmlNanoFTPFreeCtxt ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
void
xmlNanoFTPFreeCtxt ( void * ctx ATTRIBUTE_UNUSED ) {
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPGetResponse ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPGetResponse ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPCheckResponse ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPCheckResponse ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPQuit ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPQuit ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPConnect ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPConnect ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void *
xmlNanoFTPConnectTo ( const char * server , int port ) ;
2023-08-20 23:50:57 +03:00
void *
xmlNanoFTPConnectTo ( const char * server ATTRIBUTE_UNUSED ,
int port ATTRIBUTE_UNUSED ) {
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPCwd ( void * ctx , const char * directory ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPCwd ( void * ctx ATTRIBUTE_UNUSED ,
const char * directory ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPDele ( void * ctx , const char * file ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPDele ( void * ctx ATTRIBUTE_UNUSED , const char * file ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN SOCKET
xmlNanoFTPGetConnection ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
SOCKET
xmlNanoFTPGetConnection ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPCloseConnection ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPCloseConnection ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPList ( void * ctx , ftpListCallback callback , void * userData ,
const char * filename ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPList ( void * ctx ATTRIBUTE_UNUSED ,
ftpListCallback callback ATTRIBUTE_UNUSED ,
void * userData ATTRIBUTE_UNUSED ,
const char * filename ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN SOCKET
xmlNanoFTPGetSocket ( void * ctx , const char * filename ) ;
2023-08-20 23:50:57 +03:00
SOCKET
xmlNanoFTPGetSocket ( void * ctx ATTRIBUTE_UNUSED ,
const char * filename ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPGet ( void * ctx , ftpDataCallback callback , void * userData ,
const char * filename ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPGet ( void * ctx ATTRIBUTE_UNUSED ,
ftpDataCallback callback ATTRIBUTE_UNUSED ,
void * userData ATTRIBUTE_UNUSED ,
const char * filename ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPRead ( void * ctx , void * dest , int len ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPRead ( void * ctx ATTRIBUTE_UNUSED , void * dest ATTRIBUTE_UNUSED ,
int len ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void *
xmlNanoFTPOpen ( const char * URL ) ;
2023-08-20 23:50:57 +03:00
void *
xmlNanoFTPOpen ( const char * URL ATTRIBUTE_UNUSED ) {
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlNanoFTPClose ( void * ctx ) ;
2023-08-20 23:50:57 +03:00
int
xmlNanoFTPClose ( void * ctx ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlIOFTPMatch ( const char * filename ) ;
2023-08-20 23:50:57 +03:00
int
xmlIOFTPMatch ( const char * filename ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void *
xmlIOFTPOpen ( const char * filename ) ;
2023-08-20 23:50:57 +03:00
void *
xmlIOFTPOpen ( const char * filename ATTRIBUTE_UNUSED ) {
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlIOFTPRead ( void * context , char * buffer , int len ) ;
2023-08-20 23:50:57 +03:00
int
xmlIOFTPRead ( void * context ATTRIBUTE_UNUSED , char * buffer ATTRIBUTE_UNUSED ,
int len ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN int
xmlIOFTPClose ( void * context ) ;
2023-08-20 23:50:57 +03:00
int
xmlIOFTPClose ( void * context ATTRIBUTE_UNUSED ) {
return ( - 1 ) ;
}
/*
* xpointer . h
*/
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewRange ( void * start , int startindex ,
void * end , int endindex ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewRange ( void * start ATTRIBUTE_UNUSED ,
2023-08-20 23:50:57 +03:00
int startindex ATTRIBUTE_UNUSED ,
2024-06-12 19:20:01 +03:00
void * end ATTRIBUTE_UNUSED ,
2023-08-20 23:50:57 +03:00
int endindex ATTRIBUTE_UNUSED ) {
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewRangePoints ( void * start , void * end ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewRangePoints ( void * start ATTRIBUTE_UNUSED ,
void * end ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewRangePointNode ( void * start , void * end ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewRangePointNode ( void * start ATTRIBUTE_UNUSED ,
void * end ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewRangeNodePoint ( void * start , void * end ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewRangeNodePoint ( void * start ATTRIBUTE_UNUSED ,
void * end ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewRangeNodes ( void * start , void * end ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewRangeNodes ( void * start ATTRIBUTE_UNUSED ,
void * end ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewCollapsedRange ( void * start ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewCollapsedRange ( void * start ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewRangeNodeObject ( void * start , void * end ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewRangeNodeObject ( void * start ATTRIBUTE_UNUSED ,
void * end ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrLocationSetCreate ( void * val ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrLocationSetCreate ( void * val ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
2024-06-12 19:20:01 +03:00
xmlXPtrLocationSetAdd ( void * cur , void * val ) ;
2023-09-29 14:18:34 +03:00
2023-08-20 23:50:57 +03:00
void
2024-06-12 19:20:01 +03:00
xmlXPtrLocationSetAdd ( void * cur ATTRIBUTE_UNUSED ,
void * val ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrLocationSetMerge ( void * val1 , void * val2 ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrLocationSetMerge ( void * val1 ATTRIBUTE_UNUSED ,
void * val2 ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
2024-06-12 19:20:01 +03:00
xmlXPtrLocationSetDel ( void * cur , void * val ) ;
2023-09-29 14:18:34 +03:00
2023-08-20 23:50:57 +03:00
void
2024-06-12 19:20:01 +03:00
xmlXPtrLocationSetDel ( void * cur ATTRIBUTE_UNUSED ,
void * val ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
2024-06-12 19:20:01 +03:00
xmlXPtrLocationSetRemove ( void * cur , int val ) ;
2023-09-29 14:18:34 +03:00
2023-08-20 23:50:57 +03:00
void
2024-06-12 19:20:01 +03:00
xmlXPtrLocationSetRemove ( void * cur ATTRIBUTE_UNUSED ,
2023-08-20 23:50:57 +03:00
int val ATTRIBUTE_UNUSED ) {
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
2024-06-12 19:20:01 +03:00
xmlXPtrFreeLocationSet ( void * obj ) ;
2023-09-29 14:18:34 +03:00
2023-08-20 23:50:57 +03:00
void
2024-06-12 19:20:01 +03:00
xmlXPtrFreeLocationSet ( void * obj ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewLocationSetNodes ( void * start , void * end ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewLocationSetNodes ( void * start ATTRIBUTE_UNUSED ,
void * end ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrNewLocationSetNodeSet ( void * set ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrNewLocationSetNodeSet ( void * set ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrWrapLocationSet ( void * val ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrWrapLocationSet ( void * val ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2024-06-12 19:20:01 +03:00
XMLPUBFUN void *
xmlXPtrBuildNodeList ( void * obj ) ;
2023-09-29 14:18:34 +03:00
2024-06-12 19:20:01 +03:00
void *
xmlXPtrBuildNodeList ( void * obj ATTRIBUTE_UNUSED ) {
2023-08-20 23:50:57 +03:00
return ( NULL ) ;
}
2023-09-29 14:18:34 +03:00
XMLPUBFUN void
2024-06-12 19:20:01 +03:00
xmlXPtrRangeToFunction ( void * ctxt , int nargs ) ;
2023-09-29 14:18:34 +03:00
2023-08-20 23:50:57 +03:00
void
2024-06-12 19:20:01 +03:00
xmlXPtrRangeToFunction ( void * ctxt ATTRIBUTE_UNUSED ,
2023-08-20 23:50:57 +03:00
int nargs ATTRIBUTE_UNUSED ) {
}
2024-06-16 18:57:12 +03:00
/*
* xmllint shell functions formerly in debugXML . h
*/
XMLPUBFUN void
xmlLsOneNode ( FILE * output , xmlNodePtr node ) ;
void
xmlLsOneNode ( FILE * output ATTRIBUTE_UNUSED , xmlNodePtr node ATTRIBUTE_UNUSED ) {
}
XMLPUBFUN int
xmlLsCountNode ( xmlNodePtr node ) ;
int
xmlLsCountNode ( xmlNodePtr node ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN const char *
xmlBoolToText ( int boolval ) ;
const char *
xmlBoolToText ( int boolval ) {
if ( boolval )
return ( " True " ) ;
else
return ( " False " ) ;
}
# ifdef LIBXML_XPATH_ENABLED
XMLPUBFUN void
xmlShellPrintXPathError ( int errorType , const char * arg ) ;
void
xmlShellPrintXPathError ( int errorType ATTRIBUTE_UNUSED ,
const char * arg ATTRIBUTE_UNUSED ) {
}
XMLPUBFUN void
xmlShellPrintXPathResult ( void * list ) ;
void
xmlShellPrintXPathResult ( void * list ATTRIBUTE_UNUSED ) {
}
XMLPUBFUN int
xmlShellList ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellList ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN int
xmlShellBase ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellBase ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN int
xmlShellDir ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellDir ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN int
xmlShellLoad ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellLoad ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
# ifdef LIBXML_OUTPUT_ENABLED
XMLPUBFUN void
xmlShellPrintNode ( void * node ) ;
void
xmlShellPrintNode ( void * ctxt ATTRIBUTE_UNUSED ) {
}
XMLPUBFUN int
xmlShellCat ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellCat ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN int
xmlShellWrite ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellWrite ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN int
xmlShellSave ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellSave ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
# endif /* LIBXML_OUTPUT_ENABLED */
# ifdef LIBXML_VALID_ENABLED
XMLPUBFUN int
xmlShellValidate ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellValidate ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
# endif /* LIBXML_VALID_ENABLED */
XMLPUBFUN int
xmlShellDu ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellDu ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
XMLPUBFUN int
xmlShellPwd ( void * ctxt , char * arg , void * node , void * node2 ) ;
int
xmlShellPwd ( void * ctxt ATTRIBUTE_UNUSED , char * arg ATTRIBUTE_UNUSED ,
void * node ATTRIBUTE_UNUSED , void * node2 ATTRIBUTE_UNUSED ) {
return ( 0 ) ;
}
typedef char * ( * xmlShellReadlineFunc ) ( char * prompt ) ;
XMLPUBFUN void
xmlShell ( void * doc , char * filename , xmlShellReadlineFunc input , void * output ) ;
void
xmlShell ( void * doc ATTRIBUTE_UNUSED , char * filename ATTRIBUTE_UNUSED ,
xmlShellReadlineFunc input ATTRIBUTE_UNUSED ,
void * output ATTRIBUTE_UNUSED ) {
}
# endif /* LIBXML_XPATH_ENABLED */
2023-09-21 23:57:33 +03:00
2003-09-29 13:07:08 +04:00
# endif /* LIBXML_LEGACY_ENABLED */