Commit 34099b40 authored by Daniel Veillard's avatar Daniel Veillard

changing the way the .c is generated, extending the tests coverage fixing

* gentest.py testapi.c: changing the way the .c is generated,
  extending the tests coverage
* include/libxml/nanoftp.h nanoftp.c elfgcchack.h doc/*: fixing some
  function signatures, regenerating stuff
* SAX2.c parser.c xmlIO.c: another set of bug fixes and API hardening
Daniel
parent 1ba06bb7
Thu Nov 4 18:32:22 CET 2004 Daniel Veillard <daniel@veillard.com>
* gentest.py testapi.c: changing the way the .c is generated,
extending the tests coverage
* include/libxml/nanoftp.h nanoftp.c elfgcchack.h doc/*: fixing some
function signatures, regenerating stuff
* SAX2.c parser.c xmlIO.c: another set of bug fixes and API hardening
Thu Nov 4 13:32:19 CET 2004 Daniel Veillard <daniel@veillard.com>
* gentest.py testapi.c: extending the tests coverage
......
......@@ -51,11 +51,13 @@
*/
static void
xmlSAX2ErrMemory(xmlParserCtxtPtr ctxt, const char *msg) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "%s: out of memory\n", msg);
ctxt->errNo = XML_ERR_NO_MEMORY;
ctxt->instate = XML_PARSER_EOF;
ctxt->disableSAX = 1;
if (ctxt != NULL) {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "%s: out of memory\n", msg);
ctxt->errNo = XML_ERR_NO_MEMORY;
ctxt->instate = XML_PARSER_EOF;
ctxt->disableSAX = 1;
}
}
/**
......@@ -77,16 +79,19 @@ xmlErrValid(xmlParserCtxtPtr ctxt, xmlParserErrors error,
if ((ctxt != NULL) && (ctxt->disableSAX != 0) &&
(ctxt->instate == XML_PARSER_EOF))
return;
ctxt->errNo = error;
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
schannel = ctxt->sax->serror;
if (ctxt != NULL) {
ctxt->errNo = error;
if ((ctxt->sax != NULL) && (ctxt->sax->initialized == XML_SAX2_MAGIC))
schannel = ctxt->sax->serror;
}
__xmlRaiseError(schannel,
ctxt->vctxt.error, ctxt->vctxt.userData,
ctxt, NULL, XML_FROM_DTD, error,
XML_ERR_ERROR, NULL, 0, (const char *) str1,
(const char *) str2, NULL, 0, 0,
msg, (const char *) str1, (const char *) str2);
ctxt->valid = 0;
if (ctxt != NULL)
ctxt->valid = 0;
}
/**
......@@ -117,6 +122,7 @@ const xmlChar *
xmlSAX2GetSystemId(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
return((const xmlChar *) ctxt->input->filename);
}
......@@ -132,6 +138,7 @@ int
xmlSAX2GetLineNumber(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
return(ctxt->input->line);
}
......@@ -147,6 +154,7 @@ int
xmlSAX2GetColumnNumber(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if ((ctx == NULL) || (ctxt->input == NULL)) return(0);
return(ctxt->input->col);
}
......@@ -162,6 +170,7 @@ int
xmlSAX2IsStandalone(void *ctx)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if ((ctx == NULL) || (ctxt->myDoc == NULL)) return(0);
return(ctxt->myDoc->standalone == 1);
}
......@@ -210,6 +219,7 @@ xmlSAX2InternalSubset(void *ctx, const xmlChar *name,
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlDtdPtr dtd;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2InternalSubset(%s, %s, %s)\n",
......@@ -246,6 +256,7 @@ xmlSAX2ExternalSubset(void *ctx, const xmlChar *name,
const xmlChar *ExternalID, const xmlChar *SystemID)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2ExternalSubset(%s, %s, %s)\n",
......@@ -366,6 +377,7 @@ xmlSAX2ResolveEntity(void *ctx, const xmlChar *publicId, const xmlChar *systemId
xmlChar *URI;
const char *base = NULL;
if (ctx == NULL) return(NULL);
if (ctxt->input != NULL)
base = ctxt->input->filename;
if (base == NULL)
......@@ -400,6 +412,7 @@ xmlSAX2GetEntity(void *ctx, const xmlChar *name)
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlEntityPtr ret = NULL;
if (ctx == NULL) return(NULL);
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2GetEntity(%s)\n", name);
......@@ -479,6 +492,7 @@ xmlSAX2GetParameterEntity(void *ctx, const xmlChar *name)
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlEntityPtr ret;
if (ctx == NULL) return(NULL);
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2GetParameterEntity(%s)\n", name);
......@@ -507,6 +521,7 @@ xmlSAX2EntityDecl(void *ctx, const xmlChar *name, int type,
xmlEntityPtr ent;
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2EntityDecl(%s, %d, %s, %s, %s)\n",
......@@ -578,6 +593,7 @@ xmlSAX2AttributeDecl(void *ctx, const xmlChar *elem, const xmlChar *fullname,
xmlAttributePtr attr;
xmlChar *name = NULL, *prefix = NULL;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2AttributeDecl(%s, %s, %d, %d, %s, ...)\n",
......@@ -641,6 +657,7 @@ xmlSAX2ElementDecl(void *ctx, const xmlChar * name, int type,
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlElementPtr elem = NULL;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2ElementDecl(%s, %d, ...)\n", name, type);
......@@ -685,6 +702,7 @@ xmlSAX2NotationDecl(void *ctx, const xmlChar *name,
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNotationPtr nota = NULL;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2NotationDecl(%s, %s, %s)\n", name, publicId, systemId);
......@@ -735,6 +753,7 @@ xmlSAX2UnparsedEntityDecl(void *ctx, const xmlChar *name,
{
xmlEntityPtr ent;
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2UnparsedEntityDecl(%s, %s, %s, %s)\n",
......@@ -817,6 +836,8 @@ xmlSAX2StartDocument(void *ctx)
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlDocPtr doc;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2StartDocument()\n");
......@@ -876,6 +897,7 @@ xmlSAX2EndDocument(void *ctx)
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2EndDocument()\n");
#endif
if (ctx == NULL) return;
#ifdef LIBXML_VALID_ENABLED
if (ctxt->validate && ctxt->wellFormed &&
ctxt->myDoc && ctxt->myDoc->intSubset)
......@@ -1401,6 +1423,7 @@ xmlSAX2StartElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2StartElement(%s)\n", fullname);
#endif
if (ctx == NULL) return;
/*
* First check on validity:
......@@ -1596,6 +1619,7 @@ xmlSAX2EndElement(void *ctx, const xmlChar *name ATTRIBUTE_UNUSED)
xmlParserNodeInfo node_info;
xmlNodePtr cur = ctxt->node;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
if (name == NULL)
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2EndElement(NULL)\n");
......@@ -1990,6 +2014,7 @@ xmlSAX2StartElementNs(void *ctx,
const xmlChar *uri, *pref;
int i, j;
if (ctx == NULL) return;
/*
* First check on validity:
*/
......@@ -2168,6 +2193,7 @@ xmlSAX2EndElementNs(void *ctx,
xmlParserNodeInfo node_info;
xmlNodePtr cur = ctxt->node;
if (ctx == NULL) return;
/* Capture end position and add node */
if ((ctxt->record_info) && (cur != NULL)) {
node_info.end_pos = ctxt->input->cur - ctxt->input->base;
......@@ -2202,6 +2228,7 @@ xmlSAX2Reference(void *ctx, const xmlChar *name)
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2Reference(%s)\n", name);
......@@ -2231,6 +2258,7 @@ xmlSAX2Characters(void *ctx, const xmlChar *ch, int len)
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr lastChild;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2Characters(%.30s, %d)\n", ch, len);
......@@ -2361,6 +2389,7 @@ xmlSAX2ProcessingInstruction(void *ctx, const xmlChar *target,
xmlNodePtr ret;
xmlNodePtr parent = ctxt->node;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.xmlSAX2ProcessingInstruction(%s, %s)\n", target, data);
......@@ -2413,8 +2442,10 @@ xmlSAX2Comment(void *ctx, const xmlChar *value)
{
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret;
xmlNodePtr parent = ctxt->node;
xmlNodePtr parent;
if (ctx == NULL) return;
parent = ctxt->node;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext, "SAX.xmlSAX2Comment(%s)\n", value);
#endif
......@@ -2466,6 +2497,7 @@ xmlSAX2CDataBlock(void *ctx, const xmlChar *value, int len)
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
xmlNodePtr ret, lastChild;
if (ctx == NULL) return;
#ifdef DEBUG_SAX
xmlGenericError(xmlGenericErrorContext,
"SAX.pcdata(%.10s, %d)\n", value, len);
......
......@@ -48,6 +48,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParseReference">xmlParseReference</a><br />
<a href="html/libxml-parser.html#xmlSAXUserParseFile">xmlSAXUserParseFile</a><br />
<a href="html/libxml-parser.html#xmlSAXUserParseMemory">xmlSAXUserParseMemory</a><br />
<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
<a href="html/libxml-parserInternals.html#xmlSetEntityReferenceFunc">xmlSetEntityReferenceFunc</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
......@@ -293,7 +294,6 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parser.html#xmlReadFd">xmlReadFd</a><br />
<a href="html/libxml-xmlreader.html#xmlReaderForFd">xmlReaderForFd</a><br />
<a href="html/libxml-xmlreader.html#xmlReaderNewFd">xmlReaderNewFd</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
<a href="html/libxml-xmlwriter.html#xmlTextWriterEndDocument">xmlTextWriterEndDocument</a><br />
</dd><dt>closes</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPClose">xmlNanoHTTPClose</a><br />
<a href="html/libxml-nanohttp.html#xmlNanoHTTPSave">xmlNanoHTTPSave</a><br />
......
......@@ -188,6 +188,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-tree.html#xmlValidateQName">xmlValidateQName</a><br />
</dd><dt>lib</dt><dd><a href="html/libxml-xmlversion.html#xmlCheckVersion">xmlCheckVersion</a><br />
</dd><dt>libc</dt><dd><a href="html/libxml-xmlmemory.html#DEBUG_MEMORY">DEBUG_MEMORY</a><br />
</dd><dt>libraries</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
</dd><dt>library</dt><dd><a href="html/libxml-xmlerror.html#_xmlError">_xmlError</a><br />
<a href="html/libxml-schemasInternals.html#_xmlSchema">_xmlSchema</a><br />
<a href="html/libxml-parser.html#xmlCleanupParser">xmlCleanupParser</a><br />
......
......@@ -278,6 +278,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-tree.html#xmlCopyNamespace">xmlCopyNamespace</a><br />
<a href="html/libxml-tree.html#xmlCopyNamespaceList">xmlCopyNamespaceList</a><br />
<a href="html/libxml-tree.html#xmlGetNsList">xmlGetNsList</a><br />
</dd><dt>xmlOutputBufferClose</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
</dd><dt>xmlOutputBufferPtr</dt><dd><a href="html/libxml-xmlwriter.html#xmlNewTextWriter">xmlNewTextWriter</a><br />
</dd><dt>xmlOutputCloseCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
</dd><dt>xmlOutputMatchCallback</dt><dd><a href="html/libxml-xmlIO.html#xmlRegisterOutputCallbacks">xmlRegisterOutputCallbacks</a><br />
......
......@@ -308,6 +308,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xpathInternals.html#xmlXPathRoot">xmlXPathRoot</a><br />
</dd><dt>Initially</dt><dd><a href="html/libxml-parser.html#xmlSubstituteEntitiesDefault">xmlSubstituteEntitiesDefault</a><br />
</dd><dt>Initiate</dt><dd><a href="html/libxml-nanoftp.html#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a><br />
</dd><dt>Initilize</dt><dd><a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
</dd><dt>Input</dt><dd><a href="html/libxml-parser.html#_xmlParserCtxt">_xmlParserCtxt</a><br />
<a href="html/libxml-parser.html#xmlIOParseDTD">xmlIOParseDTD</a><br />
<a href="html/libxml-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a><br />
......
......@@ -200,7 +200,6 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-parserInternals.html#xmlParseExternalID">xmlParseExternalID</a><br />
<a href="html/libxml-parserInternals.html#xmlParsePEReference">xmlParsePEReference</a><br />
<a href="html/libxml-parserInternals.html#xmlParserHandlePEReference">xmlParserHandlePEReference</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderCurrentDoc">xmlTextReaderCurrentDoc</a><br />
</dd><dt>NRK</dt><dd><a href="html/libxml-HTMLparser.html#_htmlElemDesc">_htmlElemDesc</a><br />
</dd><dt>NSDef</dt><dd><a href="html/libxml-parserInternals.html#xmlNamespaceParseNSDef">xmlNamespaceParseNSDef</a><br />
......
......@@ -85,6 +85,8 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>WWW-Authenticate</dt><dd><a href="html/libxml-nanohttp.html#xmlNanoHTTPAuthHeader">xmlNanoHTTPAuthHeader</a><br />
</dd><dt>Walk</dt><dd><a href="html/libxml-list.html#xmlListReverseWalk">xmlListReverseWalk</a><br />
<a href="html/libxml-list.html#xmlListWalk">xmlListWalk</a><br />
</dd><dt>Warning</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
</dd><dt>Was</dt><dd><a href="html/libxml-parser.html#_xmlParserInput">_xmlParserInput</a><br />
</dd><dt>Well</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemory">xmlParseBalancedChunkMemory</a><br />
<a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
......@@ -397,6 +399,8 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-nanoftp.html#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a><br />
<a href="html/libxml-nanoftp.html#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a><br />
<a href="html/libxml-tree.html#xmlReconciliateNs">xmlReconciliateNs</a><br />
<a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
<a href="html/libxml-valid.html#xmlValidGetValidElements">xmlValidGetValidElements</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathNextFollowing">xmlXPathNextFollowing</a><br />
<a href="html/libxml-xpathInternals.html#xmlXPathStringFunction">xmlXPathStringFunction</a><br />
......
......@@ -187,6 +187,8 @@ A:link, A:visited, A:active { text-decoration: underline }
</dd><dt>breaks</dt><dd><a href="html/libxml-parserInternals.html#xmlCurrentChar">xmlCurrentChar</a><br />
</dd><dt>broken</dt><dd><a href="html/libxml-parser.html#xmlParseBalancedChunkMemoryRecover">xmlParseBalancedChunkMemoryRecover</a><br />
<a href="html/libxml-xmlreader.html#xmlTextReaderNormalization">xmlTextReaderNormalization</a><br />
</dd><dt>buf</dt><dd><a href="html/libxml-tree.html#xmlSaveFileTo">xmlSaveFileTo</a><br />
<a href="html/libxml-tree.html#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a><br />
</dd><dt>buffered</dt><dd><a href="html/libxml-xmlIO.html#xmlAllocOutputBuffer">xmlAllocOutputBuffer</a><br />
<a href="html/libxml-xmlIO.html#xmlAllocParserInputBuffer">xmlAllocParserInputBuffer</a><br />
<a href="html/libxml-xmlIO.html#xmlFreeParserInputBuffer">xmlFreeParserInputBuffer</a><br />
......
......@@ -910,6 +910,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
......@@ -1858,6 +1859,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMASV">XML_FROM_SCHEMASV</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_TREE">XML_FROM_TREE</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_VALID">XML_FROM_VALID</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_WRITER">XML_FROM_WRITER</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_XPATH">XML_FROM_XPATH</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_XPOINTER">XML_FROM_XPOINTER</a><br />
......
......@@ -415,6 +415,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-xmlerror.html#XML_FROM_SCHEMASV">XML_FROM_SCHEMASV</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_TREE">XML_FROM_TREE</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_VALID">XML_FROM_VALID</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_WRITER">XML_FROM_WRITER</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_XINCLUDE">XML_FROM_XINCLUDE</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_XPATH">XML_FROM_XPATH</a><br />
<a href="html/libxml-xmlerror.html#XML_FROM_XPOINTER">XML_FROM_XPOINTER</a><br />
......@@ -2367,6 +2368,7 @@ A:link, A:visited, A:active { text-decoration: underline }
<a href="html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a><br />
<a href="html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a><br />
......
......@@ -78,7 +78,7 @@ void xmlListDeallocator (<a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> l
</pre><p>Duplicate the list</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>old</tt></i>:</span></td><td>the list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>a new copy of the list or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlListEmpty" id="xmlListEmpty"></a>Function: xmlListEmpty</h3><pre class="programlisting">int xmlListEmpty (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
</pre><p>Is the list empty ?</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the list is empty, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlListEnd" id="xmlListEnd"></a>Function: xmlListEnd</h3><pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListEnd (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>1 if the list is empty, 0 if not empty and -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlListEnd" id="xmlListEnd"></a>Function: xmlListEnd</h3><pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListEnd (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
</pre><p>Get the last element in the list</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the last element in the list, or NULL</td></tr></tbody></table></div><h3><a name="xmlListFront" id="xmlListFront"></a>Function: xmlListFront</h3><pre class="programlisting"><a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> xmlListFront (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
</pre><p>Get the first element in the list</p>
......@@ -110,7 +110,7 @@ void xmlListDeallocator (<a href="libxml-list.html#xmlLinkPtr">xmlLinkPtr</a> l
</pre><p>Search the list for an existing value of @data</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>data</tt></i>:</span></td><td>a search value</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the value associated to @data or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlListSize" id="xmlListSize"></a>Function: xmlListSize</h3><pre class="programlisting">int xmlListSize (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
</pre><p>Get the number of elements in the list</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the list</td></tr></tbody></table></div><h3><a name="xmlListSort" id="xmlListSort"></a>Function: xmlListSort</h3><pre class="programlisting">void xmlListSort (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of elements in the list or -1 in case of error</td></tr></tbody></table></div><h3><a name="xmlListSort" id="xmlListSort"></a>Function: xmlListSort</h3><pre class="programlisting">void xmlListSort (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l)<br />
</pre><p>Sort all the elements in the list</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>l</tt></i>:</span></td><td>a list</td></tr></tbody></table></div><h3><a name="xmlListWalk" id="xmlListWalk"></a>Function: xmlListWalk</h3><pre class="programlisting">void xmlListWalk (<a href="libxml-list.html#xmlListPtr">xmlListPtr</a> l, <br /> <a href="libxml-list.html#xmlListWalker">xmlListWalker</a> walker, <br /> const void * user)<br />
</pre><p>Walk all the element of the first from first to last and apply the walker function to it</p>
......
......@@ -22,15 +22,15 @@ void <a href="#ftpListCallback">ftpListCallback</a> (void * userData, <br />
<pre class="programlisting">int <a href="#xmlNanoFTPCloseConnection">xmlNanoFTPCloseConnection</a> (void * ctx)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPConnect">xmlNanoFTPConnect</a> (void * ctx)</pre>
<pre class="programlisting">void * <a href="#xmlNanoFTPConnectTo">xmlNanoFTPConnectTo</a> (const char * server, <br /> int port)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPCwd">xmlNanoFTPCwd</a> (void * ctx, <br /> char * directory)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPDele">xmlNanoFTPDele</a> (void * ctx, <br /> char * file)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPCwd">xmlNanoFTPCwd</a> (void * ctx, <br /> const char * directory)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPDele">xmlNanoFTPDele</a> (void * ctx, <br /> const char * file)</pre>
<pre class="programlisting">void <a href="#xmlNanoFTPFreeCtxt">xmlNanoFTPFreeCtxt</a> (void * ctx)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPGet">xmlNanoFTPGet</a> (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpDataCallback">ftpDataCallback</a> callback, <br /> void * userData, <br /> const char * filename)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPGetConnection">xmlNanoFTPGetConnection</a> (void * ctx)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPGetResponse">xmlNanoFTPGetResponse</a> (void * ctx)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPGetSocket">xmlNanoFTPGetSocket</a> (void * ctx, <br /> const char * filename)</pre>
<pre class="programlisting">void <a href="#xmlNanoFTPInit">xmlNanoFTPInit</a> (void)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPList">xmlNanoFTPList</a> (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br /> void * userData, <br /> char * filename)</pre>
<pre class="programlisting">int <a href="#xmlNanoFTPList">xmlNanoFTPList</a> (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br /> void * userData, <br /> const char * filename)</pre>
<pre class="programlisting">void * <a href="#xmlNanoFTPNewCtxt">xmlNanoFTPNewCtxt</a> (const char * URL)</pre>
<pre class="programlisting">void * <a href="#xmlNanoFTPOpen">xmlNanoFTPOpen</a> (const char * URL)</pre>
<pre class="programlisting">void <a href="#xmlNanoFTPProxy">xmlNanoFTPProxy</a> (const char * host, <br /> int port, <br /> const char * user, <br /> const char * passwd, <br /> int type)</pre>
......@@ -57,9 +57,9 @@ void ftpListCallback (void * userData, <br /> const char * filename, <br
</pre><p>Tries to open a control connection</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPConnectTo" id="xmlNanoFTPConnectTo"></a>Function: xmlNanoFTPConnectTo</h3><pre class="programlisting">void * xmlNanoFTPConnectTo (const char * server, <br /> int port)<br />
</pre><p>Tries to open a control connection to the given server/port</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>server</tt></i>:</span></td><td>an FTP server name</td></tr><tr><td><span class="term"><i><tt>port</tt></i>:</span></td><td>the port (use 21 if 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an fTP context or NULL if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPCwd" id="xmlNanoFTPCwd"></a>Function: xmlNanoFTPCwd</h3><pre class="programlisting">int xmlNanoFTPCwd (void * ctx, <br /> char * directory)<br />
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>server</tt></i>:</span></td><td>an FTP server name</td></tr><tr><td><span class="term"><i><tt>port</tt></i>:</span></td><td>the port (use 21 if 0)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>an fTP context or NULL if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPCwd" id="xmlNanoFTPCwd"></a>Function: xmlNanoFTPCwd</h3><pre class="programlisting">int xmlNanoFTPCwd (void * ctx, <br /> const char * directory)<br />
</pre><p>Tries to change the remote directory</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>directory</tt></i>:</span></td><td>a directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if CWD worked, 0 if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPDele" id="xmlNanoFTPDele"></a>Function: xmlNanoFTPDele</h3><pre class="programlisting">int xmlNanoFTPDele (void * ctx, <br /> char * file)<br />
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>directory</tt></i>:</span></td><td>a directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if CWD worked, 0 if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPDele" id="xmlNanoFTPDele"></a>Function: xmlNanoFTPDele</h3><pre class="programlisting">int xmlNanoFTPDele (void * ctx, <br /> const char * file)<br />
</pre><p>Tries to delete an item (file or directory) from server</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>file</tt></i>:</span></td><td>a file or directory on the server</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 1 if DELE worked, 0 if it failed</td></tr></tbody></table></div><h3><a name="xmlNanoFTPFreeCtxt" id="xmlNanoFTPFreeCtxt"></a>Function: xmlNanoFTPFreeCtxt</h3><pre class="programlisting">void xmlNanoFTPFreeCtxt (void * ctx)<br />
</pre><p>Frees the context after closing the connection.</p>
......@@ -73,7 +73,7 @@ void ftpListCallback (void * userData, <br /> const char * filename, <br
</pre><p>Initiate fetch of the given file from the server.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the file to retrieve (or NULL if path is in context).</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the socket for the data connection, or &lt;0 in case of error</td></tr></tbody></table></div><h3><a name="xmlNanoFTPInit" id="xmlNanoFTPInit"></a>Function: xmlNanoFTPInit</h3><pre class="programlisting">void xmlNanoFTPInit (void)<br />
</pre><p>Initialize the FTP protocol layer. Currently it just checks for proxy informations, and get the hostname</p>
<h3><a name="xmlNanoFTPList" id="xmlNanoFTPList"></a>Function: xmlNanoFTPList</h3><pre class="programlisting">int xmlNanoFTPList (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br /> void * userData, <br /> char * filename)<br />
<h3><a name="xmlNanoFTPList" id="xmlNanoFTPList"></a>Function: xmlNanoFTPList</h3><pre class="programlisting">int xmlNanoFTPList (void * ctx, <br /> <a href="libxml-nanoftp.html#ftpListCallback">ftpListCallback</a> callback, <br /> void * userData, <br /> const char * filename)<br />
</pre><p>Do a listing on the server. All files info are passed back in the callbacks.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>an FTP context</td></tr><tr><td><span class="term"><i><tt>callback</tt></i>:</span></td><td>the user callback</td></tr><tr><td><span class="term"><i><tt>userData</tt></i>:</span></td><td>the user callback data</td></tr><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>optional files to list</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 incase of error, 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlNanoFTPNewCtxt" id="xmlNanoFTPNewCtxt"></a>Function: xmlNanoFTPNewCtxt</h3><pre class="programlisting">void * xmlNanoFTPNewCtxt (const char * URL)<br />
</pre><p>Allocate and initialize a new FTP context.</p>
......
......@@ -29,6 +29,7 @@ The content of this structure is not made public by the API.
<pre class="programlisting">void <a href="#xmlRelaxNGFreeValidCtxt">xmlRelaxNGFreeValidCtxt</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt)</pre>
<pre class="programlisting">int <a href="#xmlRelaxNGGetParserErrors">xmlRelaxNGGetParserErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)</pre>
<pre class="programlisting">int <a href="#xmlRelaxNGGetValidErrors">xmlRelaxNGGetValidErrors</a> (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)</pre>
<pre class="programlisting">int <a href="#xmlRelaxNGInitTypes">xmlRelaxNGInitTypes</a> (void)</pre>
<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewDocParserCtxt">xmlRelaxNGNewDocParserCtxt</a> (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)</pre>
<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewMemParserCtxt">xmlRelaxNGNewMemParserCtxt</a> (const char * buffer, <br /> int size)</pre>
<pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> <a href="#xmlRelaxNGNewParserCtxt">xmlRelaxNGNewParserCtxt</a> (const char * URL)</pre>
......@@ -118,7 +119,9 @@ The content of this structure is not made public by the API.
</pre><p>Get the callback information used to handle errors for a validation context</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error callback result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning callback result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>contextual data for the callbacks result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of failure, 0 otherwise.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGGetValidErrors" id="xmlRelaxNGGetValidErrors"></a>Function: xmlRelaxNGGetValidErrors</h3><pre class="programlisting">int xmlRelaxNGGetValidErrors (<a href="libxml-relaxng.html#xmlRelaxNGValidCtxtPtr">xmlRelaxNGValidCtxtPtr</a> ctxt, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityErrorFunc">xmlRelaxNGValidityErrorFunc</a> * err, <br /> <a href="libxml-relaxng.html#xmlRelaxNGValidityWarningFunc">xmlRelaxNGValidityWarningFunc</a> * warn, <br /> void ** ctx)<br />
</pre><p>Get the error and warning callback informations</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewDocParserCtxt" id="xmlRelaxNGNewDocParserCtxt"></a>Function: xmlRelaxNGNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>ctxt</tt></i>:</span></td><td>a Relax-NG validation context</td></tr><tr><td><span class="term"><i><tt>err</tt></i>:</span></td><td>the error function result</td></tr><tr><td><span class="term"><i><tt>warn</tt></i>:</span></td><td>the warning function result</td></tr><tr><td><span class="term"><i><tt>ctx</tt></i>:</span></td><td>the functions context result</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>-1 in case of error and 0 otherwise</td></tr></tbody></table></div><h3><a name="xmlRelaxNGInitTypes" id="xmlRelaxNGInitTypes"></a>Function: xmlRelaxNGInitTypes</h3><pre class="programlisting">int xmlRelaxNGInitTypes (void)<br />
</pre><p>Initilize the default type libraries.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>0 in case of success and -1 in case of error.</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewDocParserCtxt" id="xmlRelaxNGNewDocParserCtxt"></a>Function: xmlRelaxNGNewDocParserCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewDocParserCtxt (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br />
</pre><p>Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>a preparsed document tree</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the parser context or NULL in case of error</td></tr></tbody></table></div><h3><a name="xmlRelaxNGNewMemParserCtxt" id="xmlRelaxNGNewMemParserCtxt"></a>Function: xmlRelaxNGNewMemParserCtxt</h3><pre class="programlisting"><a href="libxml-relaxng.html#xmlRelaxNGParserCtxtPtr">xmlRelaxNGParserCtxtPtr</a> xmlRelaxNGNewMemParserCtxt (const char * buffer, <br /> int size)<br />
</pre><p>Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.</p>
......
......@@ -833,13 +833,13 @@ A:link, A:visited, A:active { text-decoration: underline }
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFileEnc" id="xmlSaveFileEnc"></a>Function: xmlSaveFileEnc</h3><pre class="programlisting">int xmlSaveFileEnc (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)<br />
</pre><p>Dump an XML document, converting it to the given encoding</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of an encoding (or NULL)</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFileTo" id="xmlSaveFileTo"></a>Function: xmlSaveFileTo</h3><pre class="programlisting">int xmlSaveFileTo (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding)<br />
</pre><p>Dump an XML document to an I/O buffer.</p>
</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFormatFile" id="xmlSaveFormatFile"></a>Function: xmlSaveFormatFile</h3><pre class="programlisting">int xmlSaveFormatFile (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> int format)<br />
</pre><p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename (or URL)</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSaveFormatFileEnc" id="xmlSaveFormatFileEnc"></a>Function: xmlSaveFormatFileEnc</h3><pre class="programlisting">int xmlSaveFormatFileEnc (const char * filename, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
</pre><p>Dump an XML document to a file or an URL.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>filename</tt></i>:</span></td><td>the filename or URL to output</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document being saved</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the name of the encoding to use or NULL.</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces be added.</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if <a href="libxml-globals.html#xmlIndentTreeOutput">xmlIndentTreeOutput</a> = 1 or xmlKeepBlanksDefault(0) was called</td></tr></tbody></table></div><h3><a name="xmlSaveFormatFileTo" id="xmlSaveFormatFileTo"></a>Function: xmlSaveFormatFileTo</h3><pre class="programlisting">int xmlSaveFormatFileTo (<a href="libxml-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br /> <a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br /> const char * encoding, <br /> int format)<br />
</pre><p>Dump an XML document to an I/O buffer. NOTE: the I/O buffer is closed as part of the call.</p>
</pre><p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>buf</tt></i>:</span></td><td>an output I/O buffer</td></tr><tr><td><span class="term"><i><tt>cur</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>encoding</tt></i>:</span></td><td>the encoding if any assuming the I/O layer handles the trancoding</td></tr><tr><td><span class="term"><i><tt>format</tt></i>:</span></td><td>should formatting spaces been added</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the number of bytes written or -1 in case of failure.</td></tr></tbody></table></div><h3><a name="xmlSearchNs" id="xmlSearchNs"></a>Function: xmlSearchNs</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNs (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br />
</pre><p>Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.</p>
<div class="variablelist"><table border="0"><col align="left" /><tbody><tr><td><span class="term"><i><tt>doc</tt></i>:</span></td><td>the document</td></tr><tr><td><span class="term"><i><tt>node</tt></i>:</span></td><td>the current node</td></tr><tr><td><span class="term"><i><tt>nameSpace</tt></i>:</span></td><td>the namespace prefix</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>the namespace pointer or NULL.</td></tr></tbody></table></div><h3><a name="xmlSearchNsByHref" id="xmlSearchNsByHref"></a>Function: xmlSearchNsByHref</h3><pre class="programlisting"><a href="libxml-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNsByHref (<a href="libxml-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br /> <a href="libxml-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br /> const <a href="libxml-xmlstring.html#xmlChar">xmlChar</a> * href)<br />
......
......@@ -77,6 +77,7 @@ void <a href="#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> (void * userD
<a name="XML_FROM_XSLT" id="XML_FROM_XSLT">XML_FROM_XSLT</a> = 22 : The XSLT engine from libxslt
<a name="XML_FROM_VALID" id="XML_FROM_VALID">XML_FROM_VALID</a> = 23 : The XML DTD validation with valid context
<a name="XML_FROM_CHECK" id="XML_FROM_CHECK">XML_FROM_CHECK</a> = 24 : The error checking module
<a name="XML_FROM_WRITER" id="XML_FROM_WRITER">XML_FROM_WRITER</a> = 25 : The xmlwriter module
}
</pre><h3>Enum <a name="xmlErrorLevel" id="xmlErrorLevel">xmlErrorLevel</a></h3><pre class="programlisting">Enum xmlErrorLevel {
<a name="XML_ERR_NONE" id="XML_ERR_NONE">XML_ERR_NONE</a> = 0
......
......@@ -1023,6 +1023,7 @@
<exports symbol='xmlRelaxNGGetValidErrors' type='function'/>
<exports symbol='xmlRelaxNGNewMemParserCtxt' type='function'/>
<exports symbol='xmlRelaxNGDump' type='function'/>
<exports symbol='xmlRelaxNGInitTypes' type='function'/>
<exports symbol='xmlRelaxNGValidityErrorFunc' type='function'/>
<exports symbol='xmlRelaxNGParse' type='function'/>
<exports symbol='xmlRelaxNGDumpTree' type='function'/>
......@@ -1994,6 +1995,7 @@
<exports symbol='XML_SCHEMAP_INVALID_ATTR_COMBINATION' type='enum'/>
<exports symbol='XML_RNGP_PARAM_FORBIDDEN' type='enum'/>
<exports symbol='XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD' type='enum'/>
<exports symbol='XML_FROM_WRITER' type='enum'/>
<exports symbol='XML_ERR_UNSUPPORTED_ENCODING' type='enum'/>
<exports symbol='XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME' type='enum'/>
<exports symbol='XML_ERR_ENTITYREF_IN_PROLOG' type='enum'/>
......@@ -4474,7 +4476,7 @@
<enum name='XML_EXTERNAL_PARAMETER_ENTITY' file='entities' value='5' type='xmlEntityType'/>
<enum name='XML_FROM_C14N' file='xmlerror' value='21' type='xmlErrorDomain' info='The Canonicalization module'/>
<enum name='XML_FROM_CATALOG' file='xmlerror' value='20' type='xmlErrorDomain' info='The Catalog module'/>
<enum name='XML_FROM_CHECK' file='xmlerror' value='24' type='xmlErrorDomain' info=' The error checking module'/>
<enum name='XML_FROM_CHECK' file='xmlerror' value='24' type='xmlErrorDomain' info='The error checking module'/>
<enum name='XML_FROM_DATATYPE' file='xmlerror' value='15' type='xmlErrorDomain' info='The W3C XML Schemas Datatype module'/>
<enum name='XML_FROM_DTD' file='xmlerror' value='4' type='xmlErrorDomain' info='The XML DTD validation with parser contex'/>
<enum name='XML_FROM_FTP' file='xmlerror' value='9' type='xmlErrorDomain' info='The FTP module'/>
......@@ -4493,6 +4495,7 @@
<enum name='XML_FROM_SCHEMASV' file='xmlerror' value='17' type='xmlErrorDomain' info='The W3C XML Schemas validation module'/>
<enum name='XML_FROM_TREE' file='xmlerror' value='2' type='xmlErrorDomain' info='The tree module'/>
<enum name='XML_FROM_VALID' file='xmlerror' value='23' type='xmlErrorDomain' info='The XML DTD validation with valid context'/>
<enum name='XML_FROM_WRITER' file='xmlerror' value='25' type='xmlErrorDomain' info=' The xmlwriter module'/>
<enum name='XML_FROM_XINCLUDE' file='xmlerror' value='11' type='xmlErrorDomain' info='The XInclude processing'/>
<enum name='XML_FROM_XPATH' file='xmlerror' value='12' type='xmlErrorDomain' info='The XPath module'/>
<enum name='XML_FROM_XPOINTER' file='xmlerror' value='13' type='xmlErrorDomain' info='The XPointer module'/>
......@@ -9744,7 +9747,7 @@ actually an xmlCharEncoding'/>
</function>
<function name='xmlListEmpty' file='list'>
<info>Is the list empty ?</info>
<return type='int' info='1 if the list is empty, 0 otherwise'/>
<return type='int' info='1 if the list is empty, 0 if not empty and -1 in case of error'/>
<arg name='l' type='xmlListPtr' info='a list'/>
</function>
<function name='xmlListEnd' file='list'>
......@@ -9835,7 +9838,7 @@ actually an xmlCharEncoding'/>
</function>
<function name='xmlListSize' file='list'>
<info>Get the number of elements in the list</info>
<return type='int' info='the number of elements in the list'/>
<return type='int' info='the number of elements in the list or -1 in case of error'/>
<arg name='l' type='xmlListPtr' info='a list'/>
</function>
<function name='xmlListSort' file='list'>
......@@ -10057,14 +10060,14 @@ actually an xmlCharEncoding'/>
<info>Tries to change the remote directory</info>
<return type='int' info='-1 incase of error, 1 if CWD worked, 0 if it failed'/>
<arg name='ctx' type='void *' info='an FTP context'/>
<arg name='directory' type='char *' info='a directory on the server'/>
<arg name='directory' type='const char *' info='a directory on the server'/>
</function>
<function name='xmlNanoFTPDele' file='nanoftp'>
<cond>LIBXML_FTP_ENABLED</cond>
<info>Tries to delete an item (file or directory) from server</info>
<return type='int' info='-1 incase of error, 1 if DELE worked, 0 if it failed'/>
<arg name='ctx' type='void *' info='an FTP context'/>
<arg name='file' type='char *' info='a file or directory on the server'/>
<arg name='file' type='const char *' info='a file or directory on the server'/>
</function>
<function name='xmlNanoFTPFreeCtxt' file='nanoftp'>
<cond>LIBXML_FTP_ENABLED</cond>
......@@ -10112,7 +10115,7 @@ actually an xmlCharEncoding'/>
<arg name='ctx' type='void *' info='an FTP context'/>
<arg name='callback' type='ftpListCallback' info='the user callback'/>
<arg name='userData' type='void *' info='the user callback data'/>
<arg name='filename' type='char *' info='optional files to list'/>
<arg name='filename' type='const char *' info='optional files to list'/>
</function>
<function name='xmlNanoFTPNewCtxt' file='nanoftp'>
<cond>LIBXML_FTP_ENABLED</cond>
......@@ -11780,6 +11783,11 @@ actually an xmlCharEncoding'/>
<arg name='warn' type='xmlRelaxNGValidityWarningFunc *' info='the warning function result'/>
<arg name='ctx' type='void **' info='the functions context result'/>
</function>
<function name='xmlRelaxNGInitTypes' file='relaxng'>
<cond>LIBXML_SCHEMAS_ENABLED</cond>
<info>Initilize the default type libraries.</info>
<return type='int' info='0 in case of success and -1 in case of error.'/>
</function>
<function name='xmlRelaxNGNewDocParserCtxt' file='relaxng'>
<cond>LIBXML_SCHEMAS_ENABLED</cond>
<info>Create an XML RelaxNGs parser context for that document. Note: since the process of compiling a RelaxNG schemas modifies the document, the @doc parameter is duplicated internally.</info>
......@@ -12257,7 +12265,7 @@ actually an xmlCharEncoding'/>
</function>
<function name='xmlSaveFileTo' file='tree'>
<cond>LIBXML_OUTPUT_ENABLED</cond>
<info>Dump an XML document to an I/O buffer.</info>
<info>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</info>
<return type='int' info='the number of bytes written or -1 in case of failure.'/>
<arg name='buf' type='xmlOutputBufferPtr' info='an output I/O buffer'/>
<arg name='cur' type='xmlDocPtr' info='the document'/>
......@@ -12288,7 +12296,7 @@ actually an xmlCharEncoding'/>
</function>
<function name='xmlSaveFormatFileTo' file='tree'>
<cond>LIBXML_OUTPUT_ENABLED</cond>
<info>Dump an XML document to an I/O buffer. NOTE: the I/O buffer is closed as part of the call.</info>
<info>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</info>
<return type='int' info='the number of bytes written or -1 in case of failure.'/>
<arg name='buf' type='xmlOutputBufferPtr' info='an output I/O buffer'/>
<arg name='cur' type='xmlDocPtr' info='the document'/>
......@@ -409,6 +409,7 @@
<reference name='XML_FROM_SCHEMASV' href='html/libxml-xmlerror.html#XML_FROM_SCHEMASV'/>
<reference name='XML_FROM_TREE' href='html/libxml-xmlerror.html#XML_FROM_TREE'/>
<reference name='XML_FROM_VALID' href='html/libxml-xmlerror.html#XML_FROM_VALID'/>
<reference name='XML_FROM_WRITER' href='html/libxml-xmlerror.html#XML_FROM_WRITER'/>
<reference name='XML_FROM_XINCLUDE' href='html/libxml-xmlerror.html#XML_FROM_XINCLUDE'/>
<reference name='XML_FROM_XPATH' href='html/libxml-xmlerror.html#XML_FROM_XPATH'/>
<reference name='XML_FROM_XPOINTER' href='html/libxml-xmlerror.html#XML_FROM_XPOINTER'/>
......@@ -2361,6 +2362,7 @@
<reference name='xmlRelaxNGFreeValidCtxt' href='html/libxml-relaxng.html#xmlRelaxNGFreeValidCtxt'/>
<reference name='xmlRelaxNGGetParserErrors' href='html/libxml-relaxng.html#xmlRelaxNGGetParserErrors'/>
<reference name='xmlRelaxNGGetValidErrors' href='html/libxml-relaxng.html#xmlRelaxNGGetValidErrors'/>
<reference name='xmlRelaxNGInitTypes' href='html/libxml-relaxng.html#xmlRelaxNGInitTypes'/>
<reference name='xmlRelaxNGNewDocParserCtxt' href='html/libxml-relaxng.html#xmlRelaxNGNewDocParserCtxt'/>
<reference name='xmlRelaxNGNewMemParserCtxt' href='html/libxml-relaxng.html#xmlRelaxNGNewMemParserCtxt'/>
<reference name='xmlRelaxNGNewParserCtxt' href='html/libxml-relaxng.html#xmlRelaxNGNewParserCtxt'/>
......@@ -3662,6 +3664,7 @@
<ref name='XML_FROM_SCHEMASV'/>
<ref name='XML_FROM_TREE'/>
<ref name='XML_FROM_VALID'/>
<ref name='XML_FROM_WRITER'/>
<ref name='XML_FROM_XINCLUDE'/>
<ref name='XML_FROM_XPATH'/>
<ref name='XML_FROM_XPOINTER'/>
......@@ -5650,6 +5653,7 @@
<ref name='xmlRelaxNGFreeValidCtxt'/>
<ref name='xmlRelaxNGGetParserErrors'/>
<ref name='xmlRelaxNGGetValidErrors'/>
<ref name='xmlRelaxNGInitTypes'/>
<ref name='xmlRelaxNGNewDocParserCtxt'/>
<ref name='xmlRelaxNGNewMemParserCtxt'/>
<ref name='xmlRelaxNGNewParserCtxt'/>
......@@ -10658,6 +10662,7 @@
<ref name='xmlRelaxNGFreeValidCtxt'/>
<ref name='xmlRelaxNGGetParserErrors'/>
<ref name='xmlRelaxNGGetValidErrors'/>
<ref name='xmlRelaxNGInitTypes'/>
<ref name='xmlRelaxNGNewDocParserCtxt'/>
<ref name='xmlRelaxNGNewMemParserCtxt'/>
<ref name='xmlRelaxNGNewParserCtxt'/>
......@@ -11626,6 +11631,7 @@
<ref name='XML_FROM_SCHEMASV'/>
<ref name='XML_FROM_TREE'/>
<ref name='XML_FROM_VALID'/>