Commit 3473f88a authored by Owen Taylor's avatar Owen Taylor

Revert directory structure changes

parent 64636e7f
Thu Feb 23 02:03:56 CET 2001 Tomasz Koczko <kloczek@pld.org.pl>
* *.c *.h libxml files: moved to libxml directory - this allow
simplify automake/autoconf. Now isn't neccessary hack on
am/ac level for make and remove libxml symlink (modified for this
also configure.in and main Makefile.am). Now automake abilities
are used in best way (like in many other projects with libraries).
* include/win32config.h: moved to libxml directory (now include
directory isn't neccessary).
* Makefile.am, examples/Makefile.am, libxml/Makefile.am:
added empty DEFS and in INCLUDES rest only -I$(top_builddir) -
this allow minimize parameters count passed to libtool script
(now compilation is also slyghtly more quiet).
* configure.in: simplifies libzdetestion - prepare separated
variables for keep libz name and path to libz header files isn't
realy neccessary (if someone have libz installed in non standard
prefix path to header files ald library can be passed as:
$ CFALGS="-I</libz.h/path>" LDFLAGS="-L</libz/path>" ./configure
* autogen.sh: check now for libxml/entities.h.
After above building libxml pass correctly and also pass
"make install DESTDIR=</install/prefix>" from tar ball generated by
"make dist". Seems ac/am reorganization is finished. This changes
not touches any other things on *.{c,h} files level.
Thu Feb 22 07:52:27 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* xpath.c: finally implemented xmlXPathCompareNodeSets
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*
* HTMLparser.h : inf=terface for an HTML 4.0 non-verifying parser
*
* See Copyright for the status of this software.
*
* Daniel.Veillard@w3.org
*/
#ifndef __HTML_PARSER_H__
#define __HTML_PARSER_H__
#include <libxml/parser.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Most of the back-end structures from XML and HTML are shared
*/
typedef xmlParserCtxt htmlParserCtxt;
typedef xmlParserCtxtPtr htmlParserCtxtPtr;
typedef xmlParserNodeInfo htmlParserNodeInfo;
typedef xmlSAXHandler htmlSAXHandler;
typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
typedef xmlParserInput htmlParserInput;
typedef xmlParserInputPtr htmlParserInputPtr;
typedef xmlDocPtr htmlDocPtr;
typedef xmlNodePtr htmlNodePtr;
/*
* Internal description of an HTML element
*/
typedef struct _htmlElemDesc htmlElemDesc;
typedef htmlElemDesc *htmlElemDescPtr;
struct _htmlElemDesc {
const char *name; /* The tag name */
char startTag; /* Whether the start tag can be implied */
char endTag; /* Whether the end tag can be implied */
char saveEndTag; /* Whether the end tag should be saved */
char empty; /* Is this an empty element ? */
char depr; /* Is this a deprecated element ? */
char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
const char *desc; /* the description */
};
/*
* Internal description of an HTML entity
*/
typedef struct _htmlEntityDesc htmlEntityDesc;
typedef htmlEntityDesc *htmlEntityDescPtr;
struct _htmlEntityDesc {
int value; /* the UNICODE value for the character */
const char *name; /* The entity name */
const char *desc; /* the description */
};
/*
* There is only few public functions.
*/
htmlElemDescPtr htmlTagLookup (const xmlChar *tag);
htmlEntityDescPtr htmlEntityLookup(const xmlChar *name);
htmlEntityDescPtr htmlEntityValueLookup(int value);
int htmlIsAutoClosed(htmlDocPtr doc,
htmlNodePtr elem);
int htmlAutoCloseTag(htmlDocPtr doc,
const xmlChar *name,
htmlNodePtr elem);
htmlEntityDescPtr htmlParseEntityRef(htmlParserCtxtPtr ctxt,
xmlChar **str);
int htmlParseCharRef(htmlParserCtxtPtr ctxt);
void htmlParseElement(htmlParserCtxtPtr ctxt);
htmlDocPtr htmlSAXParseDoc (xmlChar *cur,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
htmlDocPtr htmlParseDoc (xmlChar *cur,
const char *encoding);
htmlDocPtr htmlSAXParseFile(const char *filename,
const char *encoding,
htmlSAXHandlerPtr sax,
void *userData);
htmlDocPtr htmlParseFile (const char *filename,
const char *encoding);
int UTF8ToHtml (unsigned char* out,
int *outlen,
const unsigned char* in,
int *inlen);
int htmlEncodeEntities(unsigned char* out,
int *outlen,
const unsigned char* in,
int *inlen, int quoteChar);
int htmlIsScriptAttribute(const xmlChar *name);
int htmlHandleOmittedElem(int val);
/**
* Interfaces for the Push mode
*/
void htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
htmlParserCtxtPtr htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
void *user_data,
const char *chunk,
int size,
const char *filename,
xmlCharEncoding enc);
int htmlParseChunk (htmlParserCtxtPtr ctxt,
const char *chunk,
int size,
int terminate);
#ifdef __cplusplus
}
#endif
#endif /* __HTML_PARSER_H__ */
This diff is collapsed.
/*
* tree.h : describes the structures found in an tree resulting
* from an XML parsing.
*
* See Copyright for the status of this software.
*
* Daniel.Veillard@w3.org
*/
#ifndef __HTML_TREE_H__
#define __HTML_TREE_H__
#include <stdio.h>
#include <libxml/tree.h>
#include <libxml/HTMLparser.h>
#ifdef __cplusplus
extern "C" {
#endif
#define HTML_TEXT_NODE XML_TEXT_NODE
#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
#define HTML_COMMENT_NODE XML_COMMENT_NODE
#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
htmlDocPtr htmlNewDoc (const xmlChar *URI,
const xmlChar *ExternalID);
htmlDocPtr htmlNewDocNoDtD (const xmlChar *URI,
const xmlChar *ExternalID);
const xmlChar * htmlGetMetaEncoding (htmlDocPtr doc);
int htmlSetMetaEncoding (htmlDocPtr doc,
const xmlChar *encoding);
void htmlDocDumpMemory (xmlDocPtr cur,
xmlChar**mem,
int *size);
int htmlDocDump (FILE *f,
xmlDocPtr cur);
int htmlSaveFile (const char *filename,
xmlDocPtr cur);
void htmlNodeDump (xmlBufferPtr buf,
xmlDocPtr doc,
xmlNodePtr cur);
void htmlNodeDumpFile (FILE *out,
xmlDocPtr doc,
xmlNodePtr cur);
int htmlSaveFileEnc (const char *filename,
xmlDocPtr cur,
const char *encoding);
/* This one is imported from xmlIO.h
void htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
xmlDocPtr cur,
const char *encoding);
*/
#ifdef __cplusplus
}
#endif
#endif /* __HTML_TREE_H__ */
## Process this file with automake to produce Makefile.in
SUBDIRS = libxml doc example
SUBDIRS = . include doc example
INCLUDES = $(CORBA_CFLAGS)
INCLUDES = -I@srcdir@/include -I./include @Z_CFLAGS@ @CORBA_CFLAGS@
noinst_PROGRAMS=testSAX testHTML testXPath testURI
DEPS = $(top_builddir)/libxml/libxml2.la
LDADDS = $(top_builddir)/libxml/libxml2.la
bin_PROGRAMS = xmllint
xmllint_SOURCES = xmllint.c
bin_SCRIPTS=xml2-config
lib_LTLIBRARIES = libxml2.la
libxml2_la_LIBADD = @Z_LIBS@
libxml2_la_LDFLAGS = -version-info @LIBXML_VERSION_INFO@
libxml2_la_SOURCES = \
SAX.c \
entities.c \
encoding.c \
error.c \
parserInternals.c \
parser.c \
tree.c \
hash.c \
list.c \
xmlIO.c \
xmlmemory.c \
uri.c \
valid.c \
xlink.c \
HTMLparser.c \
HTMLtree.c \
debugXML.c \
xpath.c \
xpointer.c \
xinclude.c \
nanohttp.c \
nanoftp.c
DEPS = $(top_builddir)/libxml2.la
LDADDS = $(top_builddir)/libxml2.la @Z_LIBS@ @M_LIBS@
man_MANS = xmllint.1 xml2-config.1 libxml.4
m4datadir = $(datadir)/aclocal
m4data_DATA = libxml.m4
xmllint_SOURCES=xmllint.c
xmllint_LDFLAGS =
xmllint_DEPENDENCIES = $(DEPS)
xmllint_LDADD = $(RDL_LIBS) $(LDADDS)
xmllint_LDADD= @RDL_LIBS@ $(LDADDS)
testSAX_SOURCES = testSAX.c
testSAX_SOURCES=testSAX.c
testSAX_LDFLAGS =
testSAX_DEPENDENCIES = $(DEPS)
testSAX_LDADD = $(LDADDS)
testSAX_LDADD= $(LDADDS)
testHTML_SOURCES = testHTML.c
testHTML_SOURCES=testHTML.c
testHTML_LDFLAGS =
testHTML_DEPENDENCIES = $(DEPS)
testHTML_LDADD = $(LDADDS)
testHTML_LDADD= $(LDADDS)
testXPath_SOURCES = testXPath.c
testXPath_SOURCES=testXPath.c
testXPath_LDFLAGS =
testXPath_DEPENDENCIES = $(DEPS)
testXPath_LDADD = $(LDADDS)
testXPath_LDADD= $(LDADDS)
testURI_SOURCES = testURI.c
testURI_SOURCES=testURI.c
testURI_LDFLAGS =
testURI_DEPENDENCIES = $(DEPS)
testURI_LDADD = $(LDADDS)
testURI_LDADD= $(LDADDS)
check-local: tests
$(srcdir)/libxml:
-$(RM) $(srcdir)/libxml
ln -s $(srcdir)/. $(srcdir)/libxml
install-data: $(srcdir)/libxml
$(libxml2_la_SOURCES): $(srcdir)/libxml
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests
......@@ -363,3 +405,34 @@ cleantar:
rpm: cleantar distcheck
rpm -ta $(distdir).tar.gz
## We create xml2Conf.sh here and not from configure because we want
## to get the paths expanded correctly. Macros like srcdir are given
## the value NONE in configure if the user doesn't specify them (this
## is an autoconf feature, not a bug).
confexecdir=$(libdir)
confexec_DATA = xml2Conf.sh
CLEANFILES=xml2Conf.sh
confexecdir=$(libdir)
confexec_DATA = xml2Conf.sh
EXTRA_DIST = xml2Conf.sh.in libxml.spec.in libxml.spec libxml.m4 \
example/Makefile.am example/gjobread.c example/gjobs.xml \
$(man_MANS) libxml-2.0.pc.in xmlversion.h.in \
win32/README.MSDev win32/Makefile.mingw \
win32/libxml2/libxml2.dsp win32/libxml2/libxml2_so.dsp \
win32/libxml2/libxml2_a.dsp vms/build_libxml.com vms/config.vms
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxml-2.0.pc
#xml2Conf.sh: xml2Conf.sh.in Makefile
### Use sed and then mv to avoid problems if the user interrupts.
# sed -e 's?\@XML_LIBDIR\@?$(XML_LIBDIR)?g' \
# -e 's?\@XML_INCLUDEDIR\@?$(XML_INCLUDEDIR)?g' \
# -e 's?\@XML_LIBS\@?$(XML_LIBS)?g' \
# -e 's?\@VERSION\@?$(VERSION)?g' \
# < $(srcdir)/xml2Conf.sh.in > xml2Conf.tmp \
# && mv xml2Conf.tmp xml2Conf.sh
This diff is collapsed.
/*
* SAX.h : Default SAX handler interfaces.
*
* See Copyright for the status of this software.
*
* Daniel Veillard <Daniel.Veillard@w3.org>
*/
#ifndef __XML_SAX_H__
#define __XML_SAX_H__
#include <stdio.h>
#include <stdlib.h>
#include <libxml/parser.h>
#include <libxml/xlink.h>
#ifdef __cplusplus
extern "C" {
#endif
const xmlChar * getPublicId (void *ctx);
const xmlChar * getSystemId (void *ctx);
void setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc);
int getLineNumber (void *ctx);
int getColumnNumber (void *ctx);
int isStandalone (void *ctx);
int hasInternalSubset (void *ctx);
int hasExternalSubset (void *ctx);
void internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
void externalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID);
xmlEntityPtr getEntity (void *ctx,
const xmlChar *name);
xmlEntityPtr getParameterEntity (void *ctx,
const xmlChar *name);
xmlParserInputPtr resolveEntity (void *ctx,
const xmlChar *publicId,
const xmlChar *systemId);
void entityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content);
void attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *name,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree);
void elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content);
void notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId);
void unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName);
void startDocument (void *ctx);
void endDocument (void *ctx);
void attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value);
void startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts);
void endElement (void *ctx,
const xmlChar *name);
void reference (void *ctx,
const xmlChar *name);
void characters (void *ctx,
const xmlChar *ch,
int len);
void ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len);
void processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data);
void globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
void setNamespace (void *ctx,
const xmlChar *name);
xmlNsPtr getNamespace (void *ctx);
int checkNamespace (void *ctx,
xmlChar *nameSpace);
void namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix);
void comment (void *ctx,
const xmlChar *value);
void cdataBlock (void *ctx,
const xmlChar *value,
int len);
void xmlDefaultSAXHandlerInit (void);
void htmlDefaultSAXHandlerInit (void);
void sgmlDefaultSAXHandlerInit (void);
#ifdef __cplusplus
}
#endif
#endif /* __XML_SAX_H__ */
......@@ -36,7 +36,7 @@ if test "$DIE" -eq 1; then
exit 1
fi
test -f libxml/entities.h || {
test -f entities.h || {
echo "You must run this script in the top-level libxml directory"
exit 1
}
......
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.2)
AC_INIT(libxml/entities.c)
AC_INIT(entities.c)
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
......@@ -42,10 +42,32 @@ AM_PROG_LIBTOOL
AM_MAINTAINER_MODE
dnl Checks for zlib library.
AC_CHECK_HEADERS(zlib.h,
AC_CHECK_LIB(z, gzread, [AC_DEFINE(HAVE_LIBZ) LIBS="$LIBS -lz"])
)
_cppflags="${CPPFLAGS}"
_ldflags="${LDFLAGS}"
AC_ARG_WITH(zlib,
[ --with-zlib[=DIR] use libz in DIR],[
if test "$withval" != "no" -a "$withval" != "yes"; then
Z_DIR=$withval
CPPFLAGS="${CPPFLAGS} -I$withval/include"
LDFLAGS="${LDFLAGS} -L$withval/lib"
fi
])
AC_CHECK_HEADERS(zlib.h,
AC_CHECK_LIB(z, gzread,[
AC_DEFINE(HAVE_LIBZ)
if test "x${Z_DIR}" != "x"; then
Z_CFLAGS="-I${Z_DIR}/include"
Z_LIBS="-L${Z_DIR}/lib -lz"
else
Z_LIBS="-lz"
fi]))
AC_SUBST(Z_CFLAGS)
AC_SUBST(Z_LIBS)
CPPFLAGS=${_cppflags}
LDFLAGS=${_ldflags}
dnl Checks for header files.
AC_HEADER_DIRENT
......@@ -343,15 +365,37 @@ AC_SUBST(HAVE_ISINF)
AC_SUBST(M_LIBS)
AC_SUBST(RDL_LIBS)
AC_OUTPUT([
Makefile
libxml/Makefile
libxml/xmlversion.h
libxml/xml2-config
libxml/libxml-2.0.pc
libxml/xml2Conf.sh
doc/Makefile
example/Makefile
libxml.spec
])
dnl
dnl create the libxml and include links needed to get dependencies right
dnl
if test ! -d $srcdir/include/libxml
then
if test ! -d $srcdir/include
then
rm -f $srcdir/include
mkdir $srcdir/include
fi
rm -f $srcdir/libxml
(cd $srcdir/include ; ln -s .. libxml)
fi
if test ! -r $srcdir/libxml
then
(cd $srcdir ; ln -s include/libxml libxml)
fi
if test ! -r include/libxml
then
if test ! -d include
then
rm -f include
mkdir include
fi
(cd include ; ln -s ../libxml libxml)
fi
if test ! -r libxml
then
rm -rf libxml
ln -s $srcdir/include/libxml libxml
fi
AC_OUTPUT(libxml.spec Makefile include/Makefile doc/Makefile example/Makefile libxml/xmlversion.h xml2-config libxml-2.0.pc xml2Conf.sh)
This diff is collapsed.
/*
* debugXML.h : Interfaces to a set of routines used for debugging the tree
* produced by the XML parser.
*
* Daniel Veillard <Daniel.Veillard@w3.org>
*/
#ifndef __DEBUG_XML__
#define __DEBUG_XML__
#include <stdio.h>
#include <libxml/tree.h>
#ifdef LIBXML_DEBUG_ENABLED
#include <libxml/xpath.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* The standard Dump routines
*/
void xmlDebugDumpString (FILE *output,
const xmlChar *str);
void xmlDebugDumpAttr (FILE *output,
xmlAttrPtr attr,
int depth);
void xmlDebugDumpAttrList (FILE *output,
xmlAttrPtr attr,
int depth);
void xmlDebugDumpOneNode (FILE *output,
xmlNodePtr node,
int depth);
void xmlDebugDumpNode (FILE *output,
xmlNodePtr node,
int depth);
void xmlDebugDumpNodeList (FILE *output,
xmlNodePtr node,
int depth);
void xmlDebugDumpDocumentHead(FILE *output,
xmlDocPtr doc);
void xmlDebugDumpDocument (FILE *output,
xmlDocPtr doc);
void xmlDebugDumpDTD (FILE *output,
xmlDtdPtr doc);
void xmlDebugDumpEntities (FILE *output,
xmlDocPtr doc);
void xmlLsOneNode (FILE *output,
xmlNodePtr node);
/****************************************************************
* *
* The XML shell related structures and functions *
* *
****************************************************************/
/**
* xmlShellReadlineFunc:
* @prompt: a string prompt
*
* This is a generic signature for the XML shell input function
*
* Returns a string which will be freed by the Shell
*/
typedef char * (* xmlShellReadlineFunc)(char *prompt);
/*
* The shell context itself
* TODO: add the defined function tables.
*/
typedef struct _xmlShellCtxt xmlShellCtxt;
typedef xmlShellCtxt *xmlShellCtxtPtr;
struct _xmlShellCtxt {
char *filename;
xmlDocPtr doc;
xmlNodePtr node;
xmlXPathContextPtr pctxt;
int loaded;
FILE *output;
xmlShellReadlineFunc input;
};
/**
* xmlShellCmd:
* @ctxt: a shell context
* @arg: a string argument
* @node: a first node
* @node2: a second node
*
* This is a generic signature for the XML shell functions
*
* Returns an int, negative returns indicating errors
*/
typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
char *arg,
xmlNodePtr node,
xmlNodePtr node2);
/*
* The Shell interface.
*/
void xmlShell (xmlDocPtr doc,
char *filename,
xmlShellReadlineFunc input,
FILE *output);
#ifdef __cplusplus
}
#endif
#endif /* LIBXML_DEBUG_ENABLED */
#endif /* __DEBUG_XML__ */
This diff is collapsed.
/*
* encoding.h : interface for the encoding conversion functions needed for
* XML
*
* Related specs:
* rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
* [ISO-10646] UTF-8 and UTF-16 in Annexes
* [ISO-8859-1] ISO Latin-1 characters codes.
* [UNICODE] The Unicode Consortium, "The Unicode Standard --
* Worldwide Character Encoding -- Version 1.0", Addison-
* Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
* described in Unicode Technical Report #4.
* [US-ASCII] Coded Character Set--7-bit American Standard Code for
* Information Interchange, ANSI X3.4-1986.
*
* See Copyright for the status of this software.
*
* Daniel.Veillard@w3.org
*/
#ifndef __XML_CHAR_ENCODING_H__
#define __XML_CHAR_ENCODING_H__
#include <libxml/xmlversion.h>
#ifdef LIBXML_ICONV_ENABLED
#include <iconv.h>
#endif
#include <libxml/tree.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Predefined values for some standard encodings
* Libxml don't do beforehand translation on UTF8, ISOLatinX
* It also support UTF16 (LE and BE) by default.
*
* Anything else would have to be translated to UTF8 before being
* given to the parser itself. The BOM for UTF16 and the encoding
* declaration are looked at and a converter is looked for at that
* point. If not found the parser stops here as asked by the XML REC
* Converter can be registered by the user using xmlRegisterCharEncodingHandler
* but the currentl form doesn't allow stateful transcoding (a serious
* problem agreed !). If iconv has been found it will be used
* automatically and allow stateful transcoding, the simplest is then
* to be sure to enable icon and to provide iconv libs for the encoding
* support needed.
*/
typedef enum {
XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */