Commit 4255d504 authored by Daniel Veillard's avatar Daniel Veillard

merged the current state of XML Schemas implementation, it is not

* Makefile.am TODO_SCHEMAS configure.in genUnicode.py testAutomata.c
 testRegexp.c testSchemas.c xmlregexp.c xmlschemas.c xmlschemastypes.c
 xmlunicode.c include/libxml/Makefile.am
 include/libxml/schemasInternals.h include/libxml/xmlautomata.h
 include/libxml/xmlregexp.h include/libxml/xmlschemas.h
 include/libxml/xmlschemastypes.h include/libxml/xmlunicode.h
 include/libxml/xmlversion.h.in : merged the current state of
 XML Schemas implementation, it is not configured in by default,
 a specific --schemas configure option has been added.
* test/automata test/regexp test/schemas Makefile.am
  result/automata result/regexp result/schemas:
  merged automata/regexp/schemas regression tests
Daniel
parent f7c730f0
Tue Apr 16 17:46:43 CEST 2002 Daniel Veillard <daniel@veillard.com>
* Makefile.am TODO_SCHEMAS configure.in genUnicode.py testAutomata.c
testRegexp.c testSchemas.c xmlregexp.c xmlschemas.c xmlschemastypes.c
xmlunicode.c include/libxml/Makefile.am
include/libxml/schemasInternals.h include/libxml/xmlautomata.h
include/libxml/xmlregexp.h include/libxml/xmlschemas.h
include/libxml/xmlschemastypes.h include/libxml/xmlunicode.h
include/libxml/xmlversion.h.in : merged the current state of
XML Schemas implementation, it is not configured in by default,
a specific --schemas configure option has been added.
* test/automata test/regexp test/schemas Makefile.am
result/automata result/regexp result/schemas:
merged automata/regexp/schemas regression tests
Tue Apr 16 09:48:44 CEST 2002 Daniel Veillard <daniel@veillard.com>
* xpath.c: Gary found a compile time problem, fixes #78823
......
## Process this file with automake to produce Makefile.in
#AUTOMAKE_ OPTIONS=no-dependencies
# AUTOMAKE_ OPTIONS=no-dependencies
SUBDIRS = include . doc example python
INCLUDES = -I@srcdir@/include -I$(top_builddir)/include @THREAD_CFLAGS@ @Z_CFLAGS@
noinst_PROGRAMS=testSAX testHTML testXPath testURI testDocbook testThreads \
testC14N
testC14N testAutomata testSchemas testRegexp
bin_PROGRAMS = xmllint xmlcatalog
......@@ -22,15 +22,16 @@ 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 DOCBparser.c \
catalog.c globals.c threads.c c14n.c triostr.c trio.c
catalog.c globals.c threads.c c14n.c \
xmlregexp.c xmlschemas.c schemastypes.c xmlunicode.c \
triostr.c trio.c
else
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 DOCBparser.c \
catalog.c globals.c threads.c c14n.c
catalog.c globals.c threads.c c14n.c \
xmlregexp.c xmlschemas.c xmlschemastypes.c xmlunicode.c
endif
DEPS = $(top_builddir)/libxml2.la
......@@ -86,11 +87,26 @@ testURI_LDFLAGS =
testURI_DEPENDENCIES = $(DEPS)
testURI_LDADD= $(LDADDS)
testRegexp_SOURCES=testRegexp.c
testRegexp_LDFLAGS =
testRegexp_DEPENDENCIES = $(DEPS)
testRegexp_LDADD= $(LDADDS)
testAutomata_SOURCES=testAutomata.c
testAutomata_LDFLAGS =
testAutomata_DEPENDENCIES = $(DEPS)
testAutomata_LDADD= $(LDADDS)
testSchemas_SOURCES=testSchemas.c
testSchemas_LDFLAGS =
testSchemas_DEPENDENCIES = $(DEPS)
testSchemas_LDADD= $(LDADDS)
check-local: tests
testall : tests SVGtests SAXtests
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests Catatests @TEST_THREADS@
tests: XMLtests XMLenttests HTMLtests Validtests URItests XPathtests XPtrtests XIncludetests Scripttests Catatests @TEST_SCHEMAS@ @TEST_THREADS@
@(cd python ; $(MAKE) tests)
valgrind:
......@@ -557,6 +573,67 @@ Validtests : xmllint$(EXEEXT)
rm result.$$name error.$$name ; \
fi ; fi ; done)
Regexptests: testRegexp$(EXEEXT)
@(echo > .memdump)
@echo "##"
@echo "## Regexp regression tests"
@echo "##"
-@(for i in $(srcdir)/test/regexp/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/regexp/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testRegexp -i $$i > $(srcdir)/result/regexp/$$name; \
else \
echo Testing $$name ; \
$(CHECKER) $(top_builddir)/testRegexp -i $$i > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/regexp/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
Automatatests: testAutomata$(EXEEXT)
@(echo > .memdump)
@echo "##"
@echo "## Automata regression tests"
@echo "##"
-@(for i in $(srcdir)/test/automata/* ; do \
name=`basename $$i`; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/automata/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testAutomata $$i > $(srcdir)/result/automata/$$name; \
else \
echo Testing $$name ; \
$(CHECKER) $(top_builddir)/testAutomata $$i > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/automata/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
Schemastests: testSchemas$(EXEEXT)
@(echo > .memdump)
@echo "##"
@echo "## Schemas regression tests"
@echo "##"
-@(for i in $(srcdir)/test/schemas/*.xml ; do \
name=`basename $$i .xml`; \
if [ ! -f $(srcdir)/test/schemas/$$name.xsd ] ; then continue ; fi ; \
schemas="$(srcdir)/test/schemas/$$name.xsd" ; \
if [ ! -d $$i ] ; then \
if [ ! -f $(srcdir)/result/schemas/$$name ] ; then \
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/testSchemas $$schemas $$i > $(srcdir)/result/schemas/$$name; \
else \
echo Testing $$name ; \
$(CHECKER) $(top_builddir)/testSchemas $$schemas $$i > result.$$name ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0";\
diff $(srcdir)/result/schemas/$$name result.$$name ; \
rm result.$$name ; \
fi ; fi ; done)
dist-hook: libxml.spec
-cp libxml.spec $(distdir)
(cd $(srcdir) ; tar -cf - --exclude CVS win32 macos vms test result SAXresult ) | (cd $(distdir); tar xf -)
......@@ -582,7 +659,7 @@ EXTRA_DIST = xml2-config.in xml2Conf.sh.in libxml.spec.in libxml.spec \
$(man_MANS) libxml-2.0.pc.in \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h \
testThreadsWin32.c
testThreadsWin32.c genUnicode.py
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libxml-2.0.pc
......
- implement counted transitions at the automata level
- Unicode:
+ upgrade to 3.2
+ improve the python script to generate better test
expressions to check the list of ranges.
- Implement the interface at the SAX level
- Implement the missing parts in the Structure part
+ all content model
+ enumerations
+ countless others c.f. the TODO scattered in the code
- Complete the Built-In datatype collections and Facets implementations
- Regression tests based on
+ the primer:
http://www.w3.org/TR/xmlschema-0/
+ the Schemas Test Collection:
http://www.w3.org/2001/05/xmlschema-test-collection/
+ archives of the schemas-dev list
- Integrity constraints:
+ what's that ? How need to read about it
- "formal" checking, i.e. go through the full Structure spec and
bind code and associated parts of the Schemas spec
- go though the erratas
http://www.w3.org/2001/05/xmlschema-errata
......@@ -274,6 +274,9 @@ if test "${LOGNAME}" = "veillard" -a "`pwd`" = "/u/veillard/XML" ; then
if test "${with_xptr}" = "" ; then
with_xptr="yes"
fi
if test "${with_schemas}" = "" ; then
with_schemas="yes"
fi
CFLAGS="-g -O -pedantic -W -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wredundant-decls "
dnl -Wcast-qual -ansi
fi
......@@ -513,6 +516,18 @@ M_LIBS="-lm"
XML_LIBS="-lxml2 $Z_LIBS $THREAD_LIBS $ICONV_LIBS $M_LIBS $LIBS"
AC_SUBST(WITH_ICONV)
AC_ARG_WITH(schemas, [ --with-schemas Add experimental Schemas support (off)])
if test "$with_schemas" = "yes" ; then
echo Enabling Schemas support
WITH_SCHEMAS=1
TEST_SCHEMAS="Regexptests Automatatests Schemastests"
else
WITH_SCHEMAS=0
TEST_SCHEMAS=
fi
AC_SUBST(WITH_SCHEMAS)
AC_SUBST(TEST_SCHEMAS)
AC_ARG_WITH(debug, [ --with-debug Add the debugging module (on)])
if test "$with_debug" = "no" ; then
echo Disabling DEBUG support
......
#!/usr/bin/python -u
import sys
import string
import time
sources = "Blocks-4.txt UnicodeData-3.1.0.txt"
try:
blocks = open("Blocks-4.txt", "r")
except:
print "Missing Blocks-4.txt, aborting ..."
sys.exit(1)
BlockNames = {}
for line in blocks.readlines():
if line[0] == '#':
continue
line = string.strip(line)
if line == '':
continue
try:
fields = string.split(line, ';')
range = string.strip(fields[0])
(start, end) = string.split(range, "..")
name = string.strip(fields[1])
name = string.replace(name, ' ', '')
except:
print "Failed to process line: %s" % (line)
continue
BlockNames[name] = ("0x"+start, "0x"+end)
blocks.close()
print "Parsed %d blocks descriptions" % (len(BlockNames.keys()))
try:
data = open("UnicodeData-3.1.0.txt", "r")
except:
print "Missing UnicodeData-3.1.0.txt, aborting ..."
sys.exit(1)
nbchar = 0;
Categories = {}
for line in data.readlines():
if line[0] == '#':
continue
line = string.strip(line)
if line == '':
continue
try:
fields = string.split(line, ';')
point = string.strip(fields[0])
value = 0
while point != '':
value = value * 16
if point[0] >= '0' and point[0] <= '9':
value = value + ord(point[0]) - ord('0')
elif point[0] >= 'A' and point[0] <= 'F':
value = value + 10 + ord(point[0]) - ord('A')
elif point[0] >= 'a' and point[0] <= 'f':
value = value + 10 + ord(point[0]) - ord('a')
point = point[1:]
name = fields[2]
except:
print "Failed to process line: %s" % (line)
continue
nbchar = nbchar + 1
try:
Categories[name].append(value)
except:
try:
Categories[name] = [value]
except:
print "Failed to process line: %s" % (line)
try:
Categories[name[0]].append(value)
except:
try:
Categories[name[0]] = [value]
except:
print "Failed to process line: %s" % (line)
blocks.close()
print "Parsed %d char generating %d categories" % (nbchar, len(Categories.keys()))
#reduce the number list into ranges
for cat in Categories.keys():
list = Categories[cat]
start = -1
prev = -1
end = -1
ranges = []
for val in list:
if start == -1:
start = val
prev = val
continue
elif val == prev + 1:
prev = val
continue
elif prev == start:
ranges.append((prev, prev))
start = val
prev = val
continue
else:
ranges.append((start, prev))
start = val
prev = val
continue
if prev == start:
ranges.append((prev, prev))
else:
ranges.append((start, prev))
Categories[cat] = ranges
#
# Generate the resulting files
#
try:
header = open("xmlunicode.h", "w")
except:
print "Failed to open xmlunicode.h"
sys.exit(1)
try:
output = open("xmlunicode.c", "w")
except:
print "Failed to open xmlunicode.c"
sys.exit(1)
date = time.asctime(time.localtime(time.time()))
header.write(
"""/*
* xmlunicode.h: this header exports interfaces for the Unicode character APIs
*
* This file is automatically generated from the
* UCS description files of the Unicode Character Database
* http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html
* using the genUnicode.py Python script.
*
* Generation date: %s
* Sources: %s
* Daniel Veillard <veillard@redhat.com>
*/
#ifndef __XML_UNICODE_H__
#define __XML_UNICODE_H__
#ifdef __cplusplus
extern "C" {
#endif
""" % (date, sources));
output.write(
"""/*
* xmlunicode.c: this module implements the Unicode character APIs
*
* This file is automatically generated from the
* UCS description files of the Unicode Character Database
* http://www.unicode.org/Public/3.1-Update/UnicodeCharacterDatabase-3.1.0.html
* using the genUnicode.py Python script.
*
* Generation date: %s
* Sources: %s
* Daniel Veillard <veillard@redhat.com>
*/
#define IN_LIBXML
#include "libxml.h"
#ifdef LIBXML_UNICODE_ENABLED
#include <string.h>
#include <libxml/xmlversion.h>
#include <libxml/xmlunicode.h>
""" % (date, sources));
keys = BlockNames.keys()
keys.sort()
for block in keys:
(start, end) = BlockNames[block]
name = string.replace(block, '-', '')
header.write("int\txmlUCSIs%s\t(int code);\n" % name)
output.write("/**\n * xmlUCSIs%s:\n * @code: UCS code point\n" % (name))
output.write(" *\n * Check whether the character is part of %s UCS Block\n"%
(block))
output.write(" *\n * Returns 1 if true 0 otherwise\n */\n");
output.write("int\nxmlUCSIs%s(int code) {\n" % name)
output.write(" return((code >= %s) && (code <= %s));\n" % (start, end))
output.write("}\n\n")
header.write("\nint\txmlUCSIsBlock\t(int code,\n\t\t\t const char *block);\n\n")
output.write("/**\n * xmlUCSIsBlock:\n * @code: UCS code point\n")
output.write(" * @block: UCS block name\n")
output.write(" *\n * Check whether the caracter is part of the UCS Block\n")
output.write(" *\n * Returns 1 if true, 0 if false and -1 on unknown block\n */\n");
output.write("int\nxmlUCSIsBlock(int code, const char *block) {\n")
keys = BlockNames.keys()
keys.sort()
for block in keys:
name = string.replace(block, '-', '')
output.write(" if (!strcmp(block, \"%s\"))\n return(xmlUCSIs%s(code));\n" %
(block, name));
output.write(" return(-1);\n}\n\n")
keys = Categories.keys()
keys.sort()
for name in keys:
ranges = Categories[name]
header.write("int\txmlUCSIsCat%s\t(int code);\n" % name)
output.write("/**\n * xmlUCSIsCat%s:\n * @code: UCS code point\n" % (name))
output.write(" *\n * Check whether the character is part of %s UCS Category\n"%
(name))
output.write(" *\n * Returns 1 if true 0 otherwise\n */\n");
output.write("int\nxmlUCSIsCat%s(int code) {\n" % name)
start = 1
for range in ranges:
(begin, end) = range;
if start:
output.write(" return(");
start = 0
else:
output.write(" ||\n ");
if (begin == end):
output.write("(code == %s)" % (hex(begin)))
else:
output.write("((code >= %s) && (code <= %s))" % (
hex(begin), hex(end)))
output.write(");\n}\n\n")
header.write("\nint\txmlUCSIsCat\t(int code,\n\t\t\t const char *cat);\n")
output.write("/**\n * xmlUCSIsCat:\n * @code: UCS code point\n")
output.write(" * @cat: UCS Category name\n")
output.write(" *\n * Check whether the caracter is part of the UCS Category\n")
output.write(" *\n * Returns 1 if true, 0 if false and -1 on unknown category\n */\n");
output.write("int\nxmlUCSIsCat(int code, const char *cat) {\n")
keys = Categories.keys()
keys.sort()
for name in keys:
output.write(" if (!strcmp(cat, \"%s\"))\n return(xmlUCSIsCat%s(code));\n" %
(name, name));
output.write(" return(-1);\n}\n\n")
header.write("""
#ifdef __cplusplus
}
#endif
#endif /* __XML_UNICODE_H__ */
""");
output.write("""
#endif /* LIBXML_UNICODE_ENABLED */
""");
header.close()
output.close()
......@@ -32,7 +32,13 @@ xmlinc_HEADERS = \
catalog.h \
threads.h \
globals.h \
c14n.h
c14n.h \
xmlautomata.h \
xmlregexp.h \
xmlschemas.h \
schemasInternals.h \
xmlschemastypes.h \
xmlunicode.h
install-exec-hook:
$(mkinstalldirs) $(DESTDIR)$(xmlincdir)
......
/*
* schemasInternals.h : internal interfaces for the XML Schemas handling
* and schema validity checking
*
* See Copyright for the status of this software.
*
* Daniel.Veillard@w3.org
*/
#ifndef __XML_SCHEMA_INTERNALS_H__
#define __XML_SCHEMA_INTERNALS_H__
#if defined(WIN32) && defined(_MSC_VER)
#include <libxml/xmlwin32version.h>
#else
#include <libxml/xmlversion.h>
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/xmlregexp.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* XML Schemas defines multiple type of types.
*/
typedef enum {
XML_SCHEMA_TYPE_BASIC = 1,
XML_SCHEMA_TYPE_ANY,
XML_SCHEMA_TYPE_FACET,
XML_SCHEMA_TYPE_SIMPLE,
XML_SCHEMA_TYPE_COMPLEX,
XML_SCHEMA_TYPE_SEQUENCE,
XML_SCHEMA_TYPE_CHOICE,
XML_SCHEMA_TYPE_ALL,
XML_SCHEMA_TYPE_SIMPLE_CONTENT,
XML_SCHEMA_TYPE_COMPLEX_CONTENT,
XML_SCHEMA_TYPE_UR,
XML_SCHEMA_TYPE_RESTRICTION,
XML_SCHEMA_TYPE_EXTENSION,
XML_SCHEMA_TYPE_ELEMENT,
XML_SCHEMA_TYPE_ATTRIBUTE,
XML_SCHEMA_TYPE_GROUP,
XML_SCHEMA_TYPE_NOTATION,
XML_SCHEMA_TYPE_LIST,
XML_SCHEMA_TYPE_UNION,
XML_SCHEMA_FACET_MININCLUSIVE = 1000,
XML_SCHEMA_FACET_MINEXCLUSIVE,
XML_SCHEMA_FACET_MAXINCLUSIVE,
XML_SCHEMA_FACET_MAXEXCLUSIVE,
XML_SCHEMA_FACET_TOTALDIGITS,
XML_SCHEMA_FACET_FRACTIONDIGITS,
XML_SCHEMA_FACET_PATTERN,
XML_SCHEMA_FACET_ENUMERATION,
XML_SCHEMA_FACET_WHITESPACE,
XML_SCHEMA_FACET_LENGTH,
XML_SCHEMA_FACET_MAXLENGTH,
XML_SCHEMA_FACET_MINLENGTH
} xmlSchemaTypeType;
typedef enum {
XML_SCHEMA_CONTENT_UNKNOWN = 0,
XML_SCHEMA_CONTENT_EMPTY = 1,
XML_SCHEMA_CONTENT_ELEMENTS,
XML_SCHEMA_CONTENT_MIXED,
XML_SCHEMA_CONTENT_SIMPLE,
XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS,
XML_SCHEMA_CONTENT_BASIC
} xmlSchemaContentType;
typedef struct _xmlSchemaVal xmlSchemaVal;
typedef xmlSchemaVal *xmlSchemaValPtr;
typedef struct _xmlSchemaType xmlSchemaType;
typedef xmlSchemaType *xmlSchemaTypePtr;
typedef struct _xmlSchemaFacet xmlSchemaFacet;
typedef xmlSchemaFacet *xmlSchemaFacetPtr;
/**
* Annotation
*/
typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
struct _xmlSchemaAnnot {
struct _xmlSchemaAnnot *next;
xmlNodePtr content; /* the annotation */
};
/**
* An attribute definition.
*/
#define XML_SCHEMAS_ANYATTR_SKIP 1
#define XML_SCHEMAS_ANYATTR_LAX 2
#define XML_SCHEMAS_ANYATTR_STRICT 3
typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
struct _xmlSchemaAttribute {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
xmlChar *name;
xmlChar *id;
xmlChar *ref;
xmlChar *refNs;
xmlChar *typeName;
xmlChar *typeNs;
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr base;
int occurs;
xmlChar *defValue;
xmlSchemaTypePtr subtypes;
};
/**
* An attribute group definition.
*
* xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
* must be kept similar
*/
typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
struct _xmlSchemaAttributeGroup {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
xmlChar *name;
xmlChar *id;
xmlChar *ref;
xmlChar *refNs;
xmlSchemaAnnotPtr annot;
xmlSchemaAttributePtr attributes;
};
/**
* Schemas type definition.
*/
#define XML_SCHEMAS_TYPE_MIXED 1 << 0
struct _xmlSchemaType {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next;/* the next type if in a sequence ... */
xmlChar *name;
xmlChar *id;
xmlChar *ref;
xmlChar *refNs;
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes;
xmlSchemaAttributePtr attributes;
xmlNodePtr node;
int minOccurs;
int maxOccurs;
int flags;
xmlSchemaContentType contentType;
xmlChar *base;
xmlChar *baseNs;
xmlSchemaTypePtr baseType;
xmlSchemaFacetPtr facets;
};
/**
* An element definition.
*
* xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
* structures must be kept similar
*/
#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
#define XML_SCHEMAS_ELEM_FIXED 1 << 3
#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
#define XML_SCHEMAS_ELEM_REF 1 << 6
typedef struct _xmlSchemaElement xmlSchemaElement;
typedef xmlSchemaElement *xmlSchemaElementPtr;
struct _xmlSchemaElement {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaType *next;/* the next type if in a sequence ... */
xmlChar *name;
xmlChar *id;
xmlChar *ref;
xmlChar *refNs;
xmlSchemaAnnotPtr annot;
xmlSchemaTypePtr subtypes;
xmlSchemaAttributePtr attributes;
xmlNodePtr node;
int minOccurs;
int maxOccurs;
int flags;
xmlChar *targetNamespace;
xmlChar *namedType;
xmlChar *namedTypeNs;
xmlChar *substGroup;
xmlChar *substGroupNs;
xmlChar *scope;
xmlChar *value;
struct _xmlSchemaElement *refDecl;
xmlRegexpPtr contModel;
};
/**
* An facet definition.
*
*/
#define XML_SCHEMAS_FACET_UNKNOWN 0
#define XML_SCHEMAS_FACET_PRESERVE 1
#define XML_SCHEMAS_FACET_REPLACE 2
#define XML_SCHEMAS_FACET_COLLAPSE 3
struct _xmlSchemaFacet {
xmlSchemaTypeType type; /* The kind of type */
struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
xmlChar *value;
xmlChar *id;
xmlSchemaAnnotPtr annot;
xmlNodePtr node;
int fixed;
int whitespace;
xmlSchemaValPtr val;
xmlRegexpPtr regexp;
};
/**
* A notation definition.
*/
typedef struct _xmlSchemaNotation xmlSchemaNotation;
typedef xmlSchemaNotation *xmlSchemaNotationPtr;
struct _xmlSchemaNotation {
xmlSchemaTypeType type; /* The kind of type */
xmlChar *name;
xmlSchemaAnnotPtr annot;
xmlChar *identifier;