diff options
Diffstat (limited to 'modules/xml/includes')
-rwxr-xr-x | modules/xml/includes/dynlib_xml_scilab.h | 28 | ||||
-rwxr-xr-x | modules/xml/includes/gw_xml.h | 84 | ||||
-rwxr-xr-x | modules/xml/includes/xml.h | 23 | ||||
-rwxr-xr-x | modules/xml/includes/xmlObjects.h | 24 | ||||
-rwxr-xr-x | modules/xml/includes/xml_constants.h | 39 | ||||
-rwxr-xr-x | modules/xml/includes/xml_mlist.h | 124 |
6 files changed, 322 insertions, 0 deletions
diff --git a/modules/xml/includes/dynlib_xml_scilab.h b/modules/xml/includes/dynlib_xml_scilab.h new file mode 100755 index 000000000..1d311fd04 --- /dev/null +++ b/modules/xml/includes/dynlib_xml_scilab.h @@ -0,0 +1,28 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) DIGITEO - 2011 - Calixte DENIZET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +/*--------------------------------------------------------------------------*/ +#ifndef __DYNLIB_XML_SCILAB_H__ +#define __DYNLIB_XML_SCILAB_H__ + +#ifdef _MSC_VER + #ifdef XML_SCILAB_EXPORTS + #define XML_SCILAB_IMPEXP __declspec(dllexport) + #else + #define XML_SCILAB_IMPEXP __declspec(dllimport) + #endif +#else + #define XML_SCILAB_IMPEXP +#endif + +#endif /* __DYNLIB_XML_SCILAB_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/xml/includes/gw_xml.h b/modules/xml/includes/gw_xml.h new file mode 100755 index 000000000..46892dba3 --- /dev/null +++ b/modules/xml/includes/gw_xml.h @@ -0,0 +1,84 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __GW_XML_H__ +#define __GW_XML_H__ +/*--------------------------------------------------------------------------*/ +#include "dynlib_xml_scilab.h" +/*--------------------------------------------------------------------------*/ +XML_SCILAB_IMPEXP int gw_xml(void); + +/*--------------------------------------------------------------------------*/ +int sci_xmlRead(char *fname, unsigned long fname_len); +int sci_xmlDelete(char *fname, unsigned long fname_len); +int sci_xmlDump(char *fname, unsigned long fname_len); +int sci_xmlGetOpenDocs(char *fname, unsigned long fname_len); +int sci_xmlXPath(char *fname, unsigned long fname_len); +int sci_percent_XMLDoc_e(char *fname, unsigned long fname_len); +int sci_percent_XMLElem_e(char *fname, unsigned long fname_len); +int sci_percent_XMLNs_e(char *fname, unsigned long fname_len); +int sci_percent_XMLAttr_e(char *fname, unsigned long fname_len); +int sci_percent_XMLList_e(char *fname, unsigned long fname_len); +int sci_percent_XMLDoc_p(char *fname, unsigned long fname_len); +int sci_percent_XMLElem_p(char *fname, unsigned long fname_len); +int sci_percent_XMLNs_p(char *fname, unsigned long fname_len); +int sci_percent_XMLList_p(char *fname, unsigned long fname_len); +int sci_percent_XMLAttr_p(char *fname, unsigned long fname_len); +int sci_percent_XMLSet_p(char *fname, unsigned long fname_len); +int sci_percent_XMLList_size(char *fname, unsigned long fname_len); +int sci_percent_XMLSet_size(char *fname, unsigned long fname_len); +int sci_percent_XMLAttr_size(char *fname, unsigned long fname_len); +int sci_percent_c_i_XMLDoc(char *fname, unsigned long fname_len); +int sci_percent_XMLElem_i_XMLDoc(char *fname, unsigned long fname_len); +int sci_percent_c_i_XMLElem(char *fname, unsigned long fname_len); +int sci_percent_XMLElem_i_XMLElem(char *fname, unsigned long fname_len); +int sci_percent_XMLAttr_i_XMLElem(char *fname, unsigned long fname_len); +int sci_percent_XMLList_i_XMLElem(char *fname, unsigned long fname_len); +int sci_percent_XMLNs_i_XMLElem(char *fname, unsigned long fname_len); +int sci_percent_c_i_XMLAttr(char *fname, unsigned long fname_len); +int sci_percent_XMLElem_i_XMLList(char *fname, unsigned long fname_len); +int sci_percent_XMLDoc_i_XMLList(char *fname, unsigned long fname_len); +int sci_percent_c_i_XMLList(char *fname, unsigned long fname_len); +int sci_percent_s_i_XMLList(char *fname, unsigned long fname_len); +int sci_percent_foo_i_XMLList(char *fname, unsigned long fname_len); +int sci_percent_XMLList_i_XMLList(char *fname, unsigned long fname_len); +int sci_xmlReadStr(char *fname, unsigned long fname_len); +int sci_xmlFormat(char *fname, unsigned long fname_len); +int sci_xmlElement(char *fname, unsigned long fname_len); +int sci_xmlDocument(char *fname, unsigned long fname_len); +int sci_xmlNs(char *fname, unsigned long fname_len); +int sci_xmlAddNs(char *fname, unsigned long fname_len); +int sci_xmlGetNsByHref(char *fname, unsigned long fname_len); +int sci_xmlGetNsByPrefix(char *fname, unsigned long fname_len); +int sci_xmlWrite(char *fname, unsigned long fname_len); +int sci_percent_XMLList_length(char *fname, unsigned long fname_len); +int sci_percent_XMLAttr_length(char *fname, unsigned long fname_len); +int sci_xmlDTD(char *fname, unsigned long fname_len); +int sci_xmlSchema(char *fname, unsigned long fname_len); +int sci_xmlRelaxNG(char *fname, unsigned long fname_len); +int sci_xmlValidate(char *fname, unsigned long fname_len); +int sci_percent_XMLValid_p(char *fname, unsigned long fname_len); +int sci_xmlIsValidObject(char *fname, unsigned long fname_len); +int sci_xmlAsNumber(char *fname, unsigned long fname_len); +int sci_xmlAsText(char *fname, unsigned long fname_len); +int sci_xmlRemove(char *fname, unsigned long fname_len); +int sci_xmlSetAttributes(char *fname, unsigned long fname_len); +int sci_xmlName(char *fname, unsigned long fname_len); +int sci_xmlAppend(char *fname, unsigned long fname_len); +int sci_htmlRead(char *fname, unsigned long fname_len); +int sci_htmlReadStr(char *fname, unsigned long fname_len); +int sci_htmlWrite(char *fname, unsigned long fname_len); +int sci_htmlDump(char *fname, unsigned long fname_len); + +/*--------------------------------------------------------------------------*/ +#endif /* __GW_XML_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/xml/includes/xml.h b/modules/xml/includes/xml.h new file mode 100755 index 000000000..c3e684dc6 --- /dev/null +++ b/modules/xml/includes/xml.h @@ -0,0 +1,23 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#include <libxml/tree.h> +#include <libxml/parser.h> +#include <libxml/xpath.h> +#include <libxml/xpathInternals.h> +#include <libxml/valid.h> +#include <libxml/schemasInternals.h> +#include <libxml/xmlschemas.h> +#include <libxml/relaxng.h> +#include <libxml/xmlreader.h> +#include <libxml/HTMLparser.h> +#include <libxml/xmlsave.h> diff --git a/modules/xml/includes/xmlObjects.h b/modules/xml/includes/xmlObjects.h new file mode 100755 index 000000000..d18f0970b --- /dev/null +++ b/modules/xml/includes/xmlObjects.h @@ -0,0 +1,24 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __XML_OBJECTS__ +#define __XML_OBJECTS__ +#include "XMLObject.hxx" +#include "XMLNodeList.hxx" +#include "XMLNodeSet.hxx" +#include "XMLAttr.hxx" +#include "XMLNs.hxx" +#include "XMLDocument.hxx" +#include "XMLElement.hxx" +#include "XMLNotHandledElement.hxx" +#include "XMLXPath.hxx" +#endif diff --git a/modules/xml/includes/xml_constants.h b/modules/xml/includes/xml_constants.h new file mode 100755 index 000000000..7e40fd2e0 --- /dev/null +++ b/modules/xml/includes/xml_constants.h @@ -0,0 +1,39 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __XML_CONSTANTS_H__ +#define __XML_CONSTANTS_H__ + +const char *nodes_type[] = { "XML_ELEMENT_NODE", + "XML_ATTRIBUTE_NODE", + "XML_TEXT_NODE", + "XML_CDATA_SECTION_NODE", + "XML_ENTITY_REF_NODE", + "XML_ENTITY_NODE", + "XML_PI_NODE", + "XML_COMMENT_NODE", + "XML_DOCUMENT_NODE", + "XML_DOCUMENT_TYPE_NODE", + "XML_DOCUMENT_FRAG_NODE", + "XML_NOTATION_NODE", + "XML_HTML_DOCUMENT_NODE", + "XML_DTD_NODE", + "XML_ELEMENT_DECL", + "XML_ATTRIBUTE_DECL", + "XML_ENTITY_DECL", + "XML_NAMESPACE_DECL", + "XML_XINCLUDE_START", + "XML_XINCLUDE_END", + "XML_DOCB_DOCUMENT_NODE" +}; + +#endif /* __XML_CONSTANTS_H__ */ diff --git a/modules/xml/includes/xml_mlist.h b/modules/xml/includes/xml_mlist.h new file mode 100755 index 000000000..b4f520e13 --- /dev/null +++ b/modules/xml/includes/xml_mlist.h @@ -0,0 +1,124 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2012 - Scilab Enterprises - Calixte DENIZET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ + +#ifndef __XML_MLIST_H__ +#define __XML_MLIST_H__ + +#define XMLDOCUMENT 1 +#define XMLELEMENT 2 +#define XMLATTRIBUTE 3 +#define XMLNAMESPACE 4 +#define XMLLIST 5 +#define XMLNOTHANDLED 6 +#define XMLSET 7 +#define XMLVALID 8 + +#include "dynlib_xml_scilab.h" + +/** + * Creates an XML object at a given position in the stack + * @param type the object type + * @param pos the position in the stack + * @param id the object id + * @return 1 if all is ok else 0 + */ +XML_SCILAB_IMPEXP int createXMLObjectAtPos(int type, int pos, int id, void *pvApiCtx); + +/** + * Creates an XML object at a given position in a list + * @param list the list addr + * @param stackpos the position of the list in the stack + * @param type the object type + * @param pos the position in the list + * @param id the object id + * @return 1 if all is ok else 0 + */ +XML_SCILAB_IMPEXP int createXMLObjectAtPosInList(int *list, int stackPos, int type, int pos, int id, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLDoc(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLElem(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLAttr(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLNs(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLList(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLObject(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLObjects(const int * types, int nb, int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLNotHandled(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLSet(int *mlist, void *pvApiCtx); + +/** + * Checks if a mlist has the good type + * @param mlist the mlist address + * @return 1 if the mlist has the good type, else 0. + */ +XML_SCILAB_IMPEXP int isXMLValid(int *mlist, void *pvApiCtx); + +/** + * Get the XMLObject field _id + * @param mlist the mlist address + * @return the object id. + */ +XML_SCILAB_IMPEXP int getXMLObjectId(int *mlist, void *pvApiCtx); + +#endif /* __XML_MLIST_H__ */ |