mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-21 14:53:44 +03:00
Corrected 'length' facet validation for QNames and notations. Corrected
* xmlschemastypes.c: Corrected 'length' facet validation for QNames and notations. Corrected xmlSchemaGetCanonValue: some data types did not return a value if already in normalized form. * xmlschemas.c include/libxml/schemasInternals.h: Eliminated creation of structs for <restriction>, <extension>, <simpleContent>, <complexContent>, <list> and <union>: the information is now set directly on the corresponding simple/ complex type. Added some more complex type constraints. Added facet derivation constraints. Introduced "particle" components, which seem to be really needed if applying constraints. Corrected/change some of the parsing functions. This is all a bit scary, since a significant change to the code. * result/schemas/src-element2-*.err result/schemas/element-*.err: Adapted regression test results.
This commit is contained in:
18
ChangeLog
18
ChangeLog
@@ -1,3 +1,21 @@
|
||||
Fri Apr 1 15:29:27 CEST 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
|
||||
|
||||
* xmlschemastypes.c: Corrected 'length' facet validation for
|
||||
QNames and notations. Corrected xmlSchemaGetCanonValue: some
|
||||
data types did not return a value if already in normalized
|
||||
form.
|
||||
* xmlschemas.c include/libxml/schemasInternals.h:
|
||||
Eliminated creation of structs for <restriction>, <extension>,
|
||||
<simpleContent>, <complexContent>, <list> and <union>: the
|
||||
information is now set directly on the corresponding simple/
|
||||
complex type. Added some more complex type constraints.
|
||||
Added facet derivation constraints. Introduced "particle"
|
||||
components, which seem to be really needed if applying
|
||||
constraints. Corrected/change some of the parsing functions.
|
||||
This is all a bit scary, since a significant change to the code.
|
||||
* result/schemas/src-element2-*.err result/schemas/element-*.err:
|
||||
Adapted regression test results.
|
||||
|
||||
Fri Apr 1 16:07:59 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* doc/apibuild.py doc/elfgcchack.xsl: revamped the elfgcchack.h
|
||||
|
7167
xmlschemas.c
7167
xmlschemas.c
File diff suppressed because it is too large
Load Diff
@@ -4820,6 +4820,14 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
|
||||
}
|
||||
return(XML_SCHEMAV_CVC_ENUMERATION_VALID);
|
||||
case XML_SCHEMA_FACET_LENGTH:
|
||||
/*
|
||||
* SPEC (1.3) "if {primitive type definition} is QName or NOTATION,
|
||||
* then any {value} is facet-valid."
|
||||
*/
|
||||
if ((valType == XML_SCHEMAS_QNAME) ||
|
||||
(valType == XML_SCHEMAS_NOTATION))
|
||||
return (0);
|
||||
/* No break on purpose. */
|
||||
case XML_SCHEMA_FACET_MAXLENGTH:
|
||||
case XML_SCHEMA_FACET_MINLENGTH: {
|
||||
unsigned int len = 0;
|
||||
@@ -4870,9 +4878,6 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet,
|
||||
case XML_SCHEMAS_NAME:
|
||||
case XML_SCHEMAS_NCNAME:
|
||||
case XML_SCHEMAS_ID:
|
||||
/*
|
||||
* FIXME: What exactly to do with anyURI?
|
||||
*/
|
||||
case XML_SCHEMAS_ANYURI:
|
||||
if (value != NULL)
|
||||
len = xmlSchemaNormLen(value);
|
||||
@@ -5048,7 +5053,11 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue)
|
||||
case XML_SCHEMAS_ANYURI:
|
||||
if (val->value.str == NULL)
|
||||
return (-1);
|
||||
*retValue = BAD_CAST xmlSchemaCollapseString(BAD_CAST val->value.str);
|
||||
*retValue =
|
||||
BAD_CAST xmlSchemaCollapseString(BAD_CAST val->value.str);
|
||||
if (*retValue == NULL)
|
||||
*retValue =
|
||||
BAD_CAST xmlStrdup((const xmlChar *) val->value.str);
|
||||
break;
|
||||
case XML_SCHEMAS_QNAME:
|
||||
/*
|
||||
|
Reference in New Issue
Block a user