1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-10 10:41:05 +03:00

added a streaming pattern detector for a subset of XPath, should help

* pattern.c include/libxml/pattern.h xmllint.c: added a
  streaming pattern detector for a subset of XPath, should
  help Kasimier for identity constraints
* python/generator.py: applied Stephane Bidoul patch to find
  paths without breaking.
Daniel
This commit is contained in:
Daniel Veillard
2005-01-30 18:42:55 +00:00
parent d3210bc8a3
commit 2fc6df95cc
5 changed files with 652 additions and 30 deletions

View File

@ -6,13 +6,16 @@
functions = {}
enums = {} # { enumType: { enumConstant: enumValue } }
import os
import sys
import string
if len(sys.argv) > 1:
srcPref = sys.argv[1] + '/'
if __name__ == "__main__":
# launched as a script
srcPref = os.path.dirname(sys.argv[0])
else:
srcPref = ''
# imported
srcPref = os.path.dirname(__file__)
#######################################################################
#
@ -596,14 +599,14 @@ def buildStubs():
global unknown_types
try:
f = open(srcPref + "libxml2-api.xml")
f = open(os.path.join(srcPref,"libxml2-api.xml"))
data = f.read()
(parser, target) = getparser()
parser.feed(data)
parser.close()
except IOError, msg:
try:
f = open(srcPref + "../doc/libxml2-api.xml")
f = open(os.path.join(srcPref,"..","doc","libxml2-api.xml"))
data = f.read()
(parser, target) = getparser()
parser.feed(data)
@ -617,7 +620,7 @@ def buildStubs():
py_types['pythonObject'] = ('O', "pythonObject", "pythonObject", "pythonObject")
try:
f = open(srcPref + "libxml2-python-api.xml")
f = open(os.path.join(srcPref,"libxml2-python-api.xml"))
data = f.read()
(parser, target) = getparser()
parser.feed(data)