mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-31 02:43:06 +03:00
applied patch from Stefan Kost to fix behaviour on unknown element from
* libxslt/xslt.c: applied patch from Stefan Kost to fix behaviour on unknown element from the XSLT namespace. * python/generator.py: applied patch from Stephane bidoul to export enums in the bindings. Daniel
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Thu Jan 22 18:42:03 CET 2004 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* libxslt/xslt.c: applied patch from Stefan Kost to fix
|
||||||
|
behaviour on unknown element from the XSLT namespace.
|
||||||
|
* python/generator.py: applied patch from Stephane bidoul
|
||||||
|
to export enums in the bindings.
|
||||||
|
|
||||||
Thu Jan 22 10:35:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
|
Thu Jan 22 10:35:14 HKT 2004 William Brack <wbrack@mmm.com.hk>
|
||||||
|
|
||||||
* tests/general/Makefile.am, tests/general/bug-141.out,
|
* tests/general/Makefile.am, tests/general/bug-141.out,
|
||||||
|
@ -1871,10 +1871,19 @@ xsltParseStylesheetTop(xsltStylesheetPtr style, xmlNodePtr top) {
|
|||||||
} else if (IS_XSLT_NAME(cur, "namespace-alias")) {
|
} else if (IS_XSLT_NAME(cur, "namespace-alias")) {
|
||||||
xsltNamespaceAlias(style, cur);
|
xsltNamespaceAlias(style, cur);
|
||||||
} else {
|
} else {
|
||||||
xsltTransformError(NULL, style, cur,
|
if ((style != NULL) && (style->doc->version != NULL) && (!strncmp(style->doc->version,"1.0",3))) {
|
||||||
|
xsltTransformError(NULL, style, cur,
|
||||||
|
"xsltParseStylesheetTop: unknown %s element\n",
|
||||||
|
cur->name);
|
||||||
|
if (style != NULL) style->errors++;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
/* do Forwards-Compatible Processing */
|
||||||
|
xsltTransformError(NULL, style, cur,
|
||||||
"xsltParseStylesheetTop: ignoring unknown %s element\n",
|
"xsltParseStylesheetTop: ignoring unknown %s element\n",
|
||||||
cur->name);
|
cur->name);
|
||||||
if (style != NULL) style->warnings++;
|
if (style != NULL) style->warnings++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cur = cur->next;
|
cur = cur->next;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
functions = {}
|
functions = {}
|
||||||
|
enums = {} # { enumType: { enumConstant: enumValue } }
|
||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
@ -136,6 +137,9 @@ class docParser:
|
|||||||
self.function_return_info = attrs['info']
|
self.function_return_info = attrs['info']
|
||||||
if attrs.has_key('field'):
|
if attrs.has_key('field'):
|
||||||
self.function_return_field = attrs['field']
|
self.function_return_field = attrs['field']
|
||||||
|
elif tag == 'enum':
|
||||||
|
enum(attrs['type'],attrs['name'],attrs['value'])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def end(self, tag):
|
def end(self, tag):
|
||||||
@ -166,10 +170,13 @@ class docParser:
|
|||||||
|
|
||||||
|
|
||||||
def function(name, desc, ret, args, file):
|
def function(name, desc, ret, args, file):
|
||||||
global functions
|
|
||||||
|
|
||||||
functions[name] = (desc, ret, args, file)
|
functions[name] = (desc, ret, args, file)
|
||||||
|
|
||||||
|
def enum(type, name, value):
|
||||||
|
if not enums.has_key(type):
|
||||||
|
enums[type] = {}
|
||||||
|
enums[type][name] = value
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
#
|
#
|
||||||
# Some filtering rukes to drop functions/types which should not
|
# Some filtering rukes to drop functions/types which should not
|
||||||
@ -943,6 +950,17 @@ def buildWrappers():
|
|||||||
classes.write(" return ret\n");
|
classes.write(" return ret\n");
|
||||||
classes.write("\n");
|
classes.write("\n");
|
||||||
|
|
||||||
|
#
|
||||||
|
# Generate enum constants
|
||||||
|
#
|
||||||
|
for type,enum in enums.items():
|
||||||
|
classes.write("# %s\n" % type)
|
||||||
|
items = enum.items()
|
||||||
|
items.sort(lambda i1,i2: cmp(long(i1[1]),long(i2[1])))
|
||||||
|
for name,value in items:
|
||||||
|
classes.write("%s = %s\n" % (name,value))
|
||||||
|
classes.write("\n");
|
||||||
|
|
||||||
txt.close()
|
txt.close()
|
||||||
classes.close()
|
classes.close()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user