Commit c575b997 authored by Daniel Veillard's avatar Daniel Veillard
Browse files

Changed to the MIT Licence updated the doc accordingly preparing 2.4.14

* Copyright Makefile.am README configure.in libxml.spec.in:
  Changed to the MIT Licence
* doc/FAQ.html doc/catalog.html doc/intro.html doc/xml.html
  doc/xmlio.html: updated the doc accordingly
* include/libxml/xmlwin32version.h configure.in: preparing
  2.4.14 release
* python/generator.py python/libxml.c python/libxml2-python-api.xml
  python/libxml2class.txt python/libxml_wrap.h python/types.c:
  fixed the const xmlChar * wrapper and generator, XPath extension
  functions now use the context as first argument
* python/tests/tstxpath.py python/tests/xpath.py
  python/tests/xpathext.py: Updated the tests accordingly
* tree.c: fixed bug #70067
Daniel
parent 2a0cf740
This diff is collapsed.
Fri Feb 8 14:24:02 CET 2002 Daniel Veillard <daniel@veillard.com>
* Copyright Makefile.am README configure.in libxml.spec.in:
Changed to the MIT Licence
* doc/FAQ.html doc/catalog.html doc/intro.html doc/xml.html
doc/xmlio.html: updated the doc accordingly
* include/libxml/xmlwin32version.h configure.in: preparing
2.4.14 release
* python/generator.py python/libxml.c python/libxml2-python-api.xml
python/libxml2class.txt python/libxml_wrap.h python/types.c:
fixed the const xmlChar * wrapper and generator, XPath extension
functions now use the context as first argument
* python/tests/tstxpath.py python/tests/xpath.py
python/tests/xpathext.py: Updated the tests accordingly
* tree.c: fixed bug #70067
Thu Feb 7 17:33:58 CET 2002 Daniel Veillard <daniel@veillard.com>
* Makefile.am: cleanup
......
Copyright © 1998 World Wide Web Consortium, (Massachusetts Institute of
Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
Except where otherwise noted in the source code (trio files, hash.c and list.c)
covered by a similar licence but with different Copyright notices:
This software is available under the GNU Library Public License as described
in the COPYING.LIB file.
Copyright (C) 1998-2002 Daniel Veillard. All Rights Reserved.
Note that the original distribution from W3C is also available under the
W3C IPR SOFTWARE NOTICE, described at http://www.w3.org/COPYRIGHT.html
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is fur-
nished to do so, subject to the following conditions:
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or any later version.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT-
NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON-
NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Daniel Veillard <daniel@veillard.com>
Fri Jul 24 1998
Except as contained in this notice, the name of Daniel Veillard shall not
be used in advertising or otherwise to promote the sale, use or other deal-
ings in this Software without prior written authorization from him.
......@@ -550,7 +550,7 @@ dist-hook: libxml.spec
(cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -)
cleantar:
@(rm -f libxslt*.tar.gz)
@(rm -f libxslt*.tar.gz COPYING.LIB)
rpm: cleantar
@(unset CDPATH ; $(MAKE) dist && rpm -ta $(distdir).tar.gz)
......@@ -565,7 +565,7 @@ CLEANFILES=xml2Conf.sh
confexecdir=$(libdir)
confexec_DATA = xml2Conf.sh
EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml.spec \
libxml.m4 \
libxml.m4 Copyright \
example/Makefile.am example/gjobread.c example/gjobs.xml \
$(man_MANS) libxml-2.0.pc.in \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
......@@ -583,6 +583,8 @@ DOC_MODULE=libxml2-$(VERSION)
EXAMPLES_DIR=$(BASE_DIR)/$(DOC_MODULE)/examples
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
-@INSTALL@ -m 0644 $(srcdir)/Copyright $(DESTDIR)$(BASE_DIR)/$(DOC_MODULE)
$(mkinstalldirs) $(DESTDIR)$(EXAMPLES_DIR)
-@INSTALL@ -m 0644 $(srcdir)/xmllint.c $(DESTDIR)$(EXAMPLES_DIR)
-@INSTALL@ -m 0644 $(srcdir)/testSAX.c $(DESTDIR)$(EXAMPLES_DIR)
......
......@@ -4,8 +4,7 @@
Full documentation is available on-line at
http://xmlsoft.org/
This code is released under the LGPL or the W3C IPR, pick the one
you prefer.
This code is released under the MIT Licence see the Copyright file.
A mailing-list xml@gnome.org is available, to subscribe:
http://mail.gnome.org/mailman/listinfo/xml
......
......@@ -6,7 +6,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=4
LIBXML_MICRO_VERSION=13
LIBXML_MICRO_VERSION=14
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION
......@@ -538,5 +538,8 @@ AC_SUBST(PYTHON_SITE_PACKAGES)
AC_SUBST(M_LIBS)
AC_SUBST(RDL_LIBS)
rm -f rm COPYING.LIB COPYING
ln -s Copyright COPYING
AC_OUTPUT(libxml.spec Makefile include/Makefile include/libxml/Makefile doc/Makefile example/Makefile python/Makefile python/tests/Makefile include/libxml/xmlversion.h include/libxml/xmlwin32version.h xml2-config libxml-2.0.pc xml2Conf.sh)
......@@ -94,18 +94,14 @@ A:link, A:visited, A:active { text-decoration: underline }
<ol>
<li>
<em>Licensing Terms for libxml</em>
<p>libxml is released under 2 (compatible) licences:</p>
<ul>
<li>the <a href="http://www.gnu.org/copyleft/lgpl.html">LGPL</a>: GNU
Library General Public License</li>
<li>the <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720.html">W3C
IPR</a>: very similar to the XWindow licence</li>
</ul>
<p>libxml is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
Licence</a>, see the file Copyright in the distribution for the precise
wording</p>
</li>
<li>
<em>Can I embed libxml in a proprietary application ?</em>
<p>Yes. The W3C IPR allows you to also keep proprietary the changes you
made to libxml, but it would be graceful to provide back bugfixes and
<p>Yes. The MIT Licence allows you to also keep proprietary the changes
you made to libxml, but it would be graceful to provide back bugfixes and
improvements as patches for possible incorporation in the main
development tree</p>
</li>
......
......@@ -398,7 +398,7 @@ literature to point at:</p>
directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
the resources found on the system. Otherwise it will just create
~/xmlcatalog and ~/dbkxmlcatalog and doing:
<p><code> export XMLCATALOG=$HOME/xmlcatalog</code></p>
<p><code>export XMLCATALOG=$HOME/xmlcatalog</code></p>
<p>should allow to process DocBook documentations without requiring
network accesses for the DTd or stylesheets</p>
</li>
......
......@@ -100,10 +100,9 @@ structured documents/data.</p>
<li>The internal document repesentation is as close as possible to the <a href="http://www.w3.org/DOM/">DOM</a> interfaces.</li>
<li>Libxml also has a <a href="http://www.megginson.com/SAX/index.html">SAX
like interface</a>; the interface is designed to be compatible with <a href="http://www.jclark.com/xml/expat.html">Expat</a>.</li>
<li>This library is released both under the <a href="http://www.w3.org/Consortium/Legal/copyright-software-19980720.html">W3C
IPR</a> and the <a href="http://www.gnu.org/copyleft/lesser.html">GNU
LGPL</a>. Use either at your convenience, basically this should make
everybody happy, if not, drop me a mail.</li>
<li>This library is released under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT
Licence</a> see the Copyright file in the distribution for the precise
wording.</li>
</ul>
<p>Warning: unless you are forced to because your application links with a
Gnome library requiring it, <strong><span style="background-color: #FF0000">Do Not Use libxml1</span></strong>, use
......
......@@ -112,11 +112,10 @@ structured documents/data.</p>
<li>Libxml also has a <a href="http://www.megginson.com/SAX/index.html">SAX
like interface</a>; the interface is designed to be compatible with <a
href="http://www.jclark.com/xml/expat.html">Expat</a>.</li>
<li>This library is released both under the <a
href="http://www.w3.org/Consortium/Legal/copyright-software-19980720.html">W3C
IPR</a> and the <a href="http://www.gnu.org/copyleft/lesser.html">GNU
LGPL</a>. Use either at your convenience, basically this should make
everybody happy, if not, drop me a mail.</li>
<li>This library is released under the <a
href="http://www.opensource.org/licenses/mit-license.html">MIT
Licence</a> see the Copyright file in the distribution for the precise
wording.</li>
</ul>
<p>Warning: unless you are forced to because your application links with a
......@@ -137,18 +136,14 @@ libxml2</p>
<h3><a name="Licence">Licence</a>(s)</h3>
<ol>
<li><em>Licensing Terms for libxml</em>
<p>libxml is released under 2 (compatible) licences:</p>
<ul>
<li>the <a href="http://www.gnu.org/copyleft/lgpl.html">LGPL</a>: GNU
Library General Public License</li>
<li>the <a
href="http://www.w3.org/Consortium/Legal/copyright-software-19980720.html">W3C
IPR</a>: very similar to the XWindow licence</li>
</ul>
<p>libxml is released under the <a
href="http://www.opensource.org/licenses/mit-license.html">MIT
Licence</a>, see the file Copyright in the distribution for the precise
wording</p>
</li>
<li><em>Can I embed libxml in a proprietary application ?</em>
<p>Yes. The W3C IPR allows you to also keep proprietary the changes you
made to libxml, but it would be graceful to provide back bugfixes and
<p>Yes. The MIT Licence allows you to also keep proprietary the changes
you made to libxml, but it would be graceful to provide back bugfixes and
improvements as patches for possible incorporation in the main
development tree</p>
</li>
......@@ -2196,6 +2191,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre>
</li>
<li>And then use it to save the document:
......@@ -2587,7 +2583,7 @@ literature to point at:</p>
directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on
the resources found on the system. Otherwise it will just create
~/xmlcatalog and ~/dbkxmlcatalog and doing:
<p><code> export XMLCATALOG=$HOME/xmlcatalog</code></p>
<p><code>export XMLCATALOG=$HOME/xmlcatalog</code></p>
<p>should allow to process DocBook documentations without requiring
network accesses for the DTd or stylesheets</p>
</li>
......
......@@ -235,6 +235,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre>
</li>
<li>And then use it to save the document:
......
......@@ -27,21 +27,21 @@ extern void xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.4.13"
#define LIBXML_DOTTED_VERSION "2.4.14"
/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 1002003
*/
#define LIBXML_VERSION 20413
#define LIBXML_VERSION 20414
/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "1002003"
*/
#define LIBXML_VERSION_STRING "20413"
#define LIBXML_VERSION_STRING "20414"
/**
* LIBXML_TEST_VERSION:
......@@ -49,7 +49,7 @@ extern void xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(20413);
#define LIBXML_TEST_VERSION xmlCheckVersion(20414);
#if 0
/**
......
......@@ -2,7 +2,7 @@ Summary: Library providing XML and HTML support
Name: libxml2
Version: @VERSION@
Release: 1
License: LGPL
License: MIT
Group: Development/Libraries
Source: ftp://xmlsoft.org/libxml2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
......@@ -115,7 +115,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README COPYING COPYING.LIB TODO
%doc AUTHORS ChangeLog NEWS README Copyright TODO
%doc %{_mandir}/man1/xmllint.1*
%doc %{_mandir}/man1/xmlcatalog.1*
%doc %{_mandir}/man4/libxml.4*
......@@ -128,6 +128,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-, root, root)
%doc %{_mandir}/man1/xml2-config.1*
%doc AUTHORS ChangeLog NEWS README Copyright TODO
%doc doc/*.html doc/html
%{prefix}/lib/lib*.so
......@@ -140,6 +141,7 @@ rm -rf $RPM_BUILD_ROOT
%files python
%defattr(-, root, root)
%doc AUTHORS ChangeLog NEWS README Copyright
%{prefix}/lib/python*/site-packages/libxml2.py
%{prefix}/lib/python*/site-packages/_libxml.so
%doc python/TODO
......
......@@ -214,9 +214,9 @@ py_types = {
'xmlChar': ('c', None, "int", "int"),
'unsigned char *': ('z', None, "charPtr", "char *"),
'char *': ('z', None, "charPtr", "char *"),
'const char *': ('z', None, "charPtr", "char *"),
'const char *': ('z', None, "charPtrConst", "const char *"),
'xmlChar *': ('z', None, "xmlCharPtr", "xmlChar *"),
'const xmlChar *': ('z', None, "xmlCharPtr", "xmlChar *"),
'const xmlChar *': ('z', None, "xmlCharPtrConst", "const xmlChar *"),
'xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
'const xmlNodePtr': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
'xmlNode *': ('O', "xmlNode", "xmlNodePtr", "xmlNodePtr"),
......@@ -523,7 +523,6 @@ classes_ancestor = {
"xmlAttribute" : "xmlNode",
}
classes_destructors = {
"xpathContext": "xmlXPathFreeContext",
"parserCtxt": "xmlFreeParserCtxt",
"catalog": "xmlFreeCatalog",
}
......@@ -576,6 +575,12 @@ def nameFixup(function, classe, type, file):
elif name[0:10] == "xmlNodeGet" and file == "python_accessor":
func = name[10:]
func = string.lower(func[0:1]) + func[1:]
elif name[0:17] == "xmlXPathParserGet" and file == "python_accessor":
func = name[17:]
func = string.lower(func[0:1]) + func[1:]
elif name[0:11] == "xmlXPathGet" and file == "python_accessor":
func = name[11:]
func = string.lower(func[0:1]) + func[1:]
elif name[0:11] == "xmlACatalog":
func = name[11:]
func = string.lower(func[0:1]) + func[1:]
......
......@@ -806,11 +806,12 @@ libxml_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs) {
return;
}
list = PyTuple_New(nargs);
list = PyTuple_New(nargs + 1);
PyTuple_SetItem(list, 0, libxml_xmlXPathParserContextPtrWrap(ctxt));
for (i = 0;i < nargs;i++) {
obj = valuePop(ctxt);
cur = libxml_xmlXPathObjectPtrWrap(obj);
PyTuple_SetItem(list, i, cur);
PyTuple_SetItem(list, i + 1, cur);
}
result = PyEval_CallObject(current_function, list);
Py_DECREF(list);
......
......@@ -36,6 +36,7 @@
<arg name='size' type='int' info='the size of the initial data'/>
<arg name='URI' type='xmlChar *' info='The URI used for base computations'/>
</function>
<!-- xmlParserCtxtPtr accessors -->
<function name='xmlParserGetDoc' file='python_accessor'>
<info>Get the document tree from a parser context.</info>
<return type='xmlDocPtr' info="the document tree" field="myDoc"/>
......@@ -90,6 +91,7 @@
<info>dump the memory allocated in the file .memdump</info>
<return type='void'/>
</function>
<!-- xmlNsPtr accessors -->
<function name='xmlNodeGetNs' file='python_accessor'>
<info>Get the namespace of a node</info>
<return type='xmlNsPtr' info="The namespace or None"/>
......@@ -100,5 +102,41 @@
<return type='xmlNsPtr' info="The namespace or None"/>
<arg name='node' type='xmlNodePtr' info='the node'/>
</function>
<!-- xmlXPathParserContextPtr accessors -->
<function name='xmlXPathParserGetContext' file='python_accessor'>
<info>Get the xpathContext from an xpathParserContext</info>
<return type='xmlXPathContextPtr' info="The XPath context" field="context"/>
<arg name='ctxt' type='xmlXPathParserContextPtr' info='the XPath parser context'/>
</function>
<function name='xmlXPathGetContextDoc' file='python_accessor'>
<info>Get the doc from an xpathContext</info>
<return type='xmlDocPtr' info="The doc context" field="doc"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetContextNode' file='python_accessor'>
<info>Get the current node from an xpathContext</info>
<return type='xmlNodePtr' info="The node context" field="node"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetContextPosition' file='python_accessor'>
<info>Get the current node from an xpathContext</info>
<return type='int' info="The node context" field="proximityPosition"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetContextSize' file='python_accessor'>
<info>Get the current node from an xpathContext</info>
<return type='int' info="The node context" field="contextSize"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetFunction' file='python_accessor'>
<info>Get the current function name xpathContext</info>
<return type='const xmlChar *' info="The function name" field="function"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
<function name='xmlXPathGetFunctionURI' file='python_accessor'>
<info>Get the current function name URI xpathContext</info>
<return type='const xmlChar *' info="The function name URI" field="functionURI"/>
<arg name='ctxt' type='xmlXPathContextPtr' info='the XPath context'/>
</function>
</symbols>
</api>
......@@ -374,6 +374,8 @@ Class catalog()
resolveSystem()
resolveURI()
Class xpathParserContext()
# accessors
context()
# functions from module xpathInternals
xpathAddValues()
......@@ -507,6 +509,13 @@ Class xmlAttr(xmlNode)
freePropList()
removeProp()
Class xpathContext()
# accessors
contextDoc()
contextNode()
contextPosition()
contextSize()
function()
functionURI()
# functions from module python
registerXPathFunction()
......
......@@ -64,6 +64,8 @@ PyObject * libxml_xmlCharPtrWrap(xmlChar *str);
PyObject * libxml_constxmlCharPtrWrap(const xmlChar *str);
PyObject * libxml_charPtrWrap(char *str);
PyObject * libxml_constcharPtrWrap(const char *str);
PyObject * libxml_charPtrConstWrap(const char *str);
PyObject * libxml_xmlCharPtrConstWrap(const xmlChar *str);
PyObject * libxml_xmlDocPtrWrap(xmlDocPtr doc);
PyObject * libxml_xmlNodePtrWrap(xmlNodePtr node);
PyObject * libxml_xmlAttrPtrWrap(xmlAttrPtr attr);
......
......@@ -5,11 +5,20 @@ import libxml2
#memory debug specific
libxml2.debugMemory(1)
called = ""
def foo(x):
def foo(ctx, x):
global called
#
# test that access to the XPath evaluation contexts
#
pctxt = libxml2.xpathParserContext(_obj=ctx)
ctxt = pctxt.context()
called = ctxt.function()
return x + 1
def bar(x):
def bar(ctxt, x):
return "%d" % (x + 2)
doc = libxml2.parseFile("tst.xml")
......@@ -21,7 +30,6 @@ if len(res) != 2:
if res[0].name != "doc" or res[1].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
libxml2.registerXPathFunction(ctxt._o, "foo", None, foo)
libxml2.registerXPathFunction(ctxt._o, "bar", None, bar)
i = 10000
......@@ -39,7 +47,12 @@ while i > 0:
sys.exit(1)
i = i - 1
doc.freeDoc()
del ctxt
ctxt.xpathFreeContext()
if called != "foo":
print "xpath function: failed to access the context"
print "xpath function: %s" % (called)
sys.exit(1)
#memory debug specific
libxml2.cleanupParser()
......
......@@ -23,12 +23,14 @@ if res[0].name != "doc" or res[1].name != "foo":
print "xpath query: wrong node set value"
sys.exit(1)
doc.freeDoc()
ctxt.xpathFreeContext()
i = 1000
while i > 0:
doc = libxml2.parseFile("tst.xml")
ctxt = doc.xpathNewContext()
res = ctxt.xpathEval("//*")
doc.freeDoc()
ctxt.xpathFreeContext()
i = i -1
del ctxt
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment