| Index: third_party/libxml/src/xmlschemas.c
|
| diff --git a/third_party/libxml/src/xmlschemas.c b/third_party/libxml/src/xmlschemas.c
|
| index 8be14d88f0918262db1cde182f2e658b55fa945e..0657b66a1fde684e1ba69e308dc17372835f7417 100644
|
| --- a/third_party/libxml/src/xmlschemas.c
|
| +++ b/third_party/libxml/src/xmlschemas.c
|
| @@ -107,7 +107,7 @@
|
| #endif
|
|
|
| #define UNBOUNDED (1 << 30)
|
| -#define TODO \
|
| +#define TODO \
|
| xmlGenericError(xmlGenericErrorContext, \
|
| "Unimplemented block at %s:%d\n", \
|
| __FILE__, __LINE__);
|
| @@ -975,6 +975,7 @@ struct _xmlSchemaValidCtxt {
|
| xmlSAXHandlerPtr sax;
|
| xmlParserCtxtPtr parserCtxt;
|
| void *user_data; /* TODO: What is this for? */
|
| + char *filename;
|
|
|
| int err;
|
| int nberrors;
|
| @@ -1028,6 +1029,10 @@ struct _xmlSchemaValidCtxt {
|
| int hasKeyrefs;
|
| int createIDCNodeTables;
|
| int psviExposeIDCNodeTables;
|
| +
|
| + /* Locator for error reporting in streaming mode */
|
| + xmlSchemaValidityLocatorFunc locFunc;
|
| + void *locCtxt;
|
| };
|
|
|
| /**
|
| @@ -1043,9 +1048,9 @@ struct _xmlSchemaSubstGroup {
|
| };
|
|
|
| /************************************************************************
|
| - * *
|
| - * Some predeclarations *
|
| - * *
|
| + * *
|
| + * Some predeclarations *
|
| + * *
|
| ************************************************************************/
|
|
|
| static int xmlSchemaParseInclude(xmlSchemaParserCtxtPtr ctxt,
|
| @@ -1098,7 +1103,7 @@ xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
|
|
|
| /************************************************************************
|
| * *
|
| - * Helper functions *
|
| + * Helper functions *
|
| * *
|
| ************************************************************************/
|
|
|
| @@ -1466,7 +1471,7 @@ xmlSchemaWildcardPCToString(int pc)
|
| * @retValue: the returned value
|
| * @ws: the whitespace type of the value
|
| *
|
| - * Get a the cononical representation of the value.
|
| + * Get a the canonical representation of the value.
|
| * The caller has to free the returned retValue.
|
| *
|
| * Returns 0 if the value could be built and -1 in case of
|
| @@ -1836,7 +1841,7 @@ xmlSchemaFormatFacetEnumSet(xmlSchemaAbstractCtxtPtr actxt,
|
|
|
| /************************************************************************
|
| * *
|
| - * Error functions *
|
| + * Error functions *
|
| * *
|
| ************************************************************************/
|
|
|
| @@ -1974,7 +1979,7 @@ xmlSchemaPErrExt(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node, int error,
|
|
|
| /************************************************************************
|
| * *
|
| - * Allround error functions *
|
| + * Allround error functions *
|
| * *
|
| ************************************************************************/
|
|
|
| @@ -2034,6 +2039,7 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
|
| if (ctxt->type == XML_SCHEMA_CTXT_VALIDATOR) {
|
| xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctxt;
|
| const char *file = NULL;
|
| + int col = 0;
|
| if (errorLevel != XML_ERR_WARNING) {
|
| vctxt->nberrors++;
|
| vctxt->err = error;
|
| @@ -2062,6 +2068,7 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
|
| (vctxt->parserCtxt->input != NULL)) {
|
| file = vctxt->parserCtxt->input->filename;
|
| line = vctxt->parserCtxt->input->line;
|
| + col = vctxt->parserCtxt->input->col;
|
| }
|
| } else {
|
| /*
|
| @@ -2078,11 +2085,25 @@ xmlSchemaErr4Line(xmlSchemaAbstractCtxtPtr ctxt,
|
| (vctxt->parserCtxt->input != NULL))
|
| file = vctxt->parserCtxt->input->filename;
|
| }
|
| + if (vctxt->locFunc != NULL) {
|
| + if ((file == NULL) || (line == 0)) {
|
| + unsigned long l;
|
| + const char *f;
|
| + vctxt->locFunc(vctxt->locCtxt, &f, &l);
|
| + if (file == NULL)
|
| + file = f;
|
| + if (line == 0)
|
| + line = (int) l;
|
| + }
|
| + }
|
| + if ((file == NULL) && (vctxt->filename != NULL))
|
| + file = vctxt->filename;
|
| +
|
| __xmlRaiseError(schannel, channel, data, ctxt,
|
| node, XML_FROM_SCHEMASV,
|
| error, errorLevel, file, line,
|
| (const char *) str1, (const char *) str2,
|
| - (const char *) str3, 0, 0, msg, str1, str2, str3, str4);
|
| + (const char *) str3, 0, col, msg, str1, str2, str3, str4);
|
|
|
| } else if (ctxt->type == XML_SCHEMA_CTXT_PARSER) {
|
| xmlSchemaParserCtxtPtr pctxt = (xmlSchemaParserCtxtPtr) ctxt;
|
| @@ -3199,25 +3220,25 @@ xmlSchemaPContentErr(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Streamable error functions *
|
| - * *
|
| + * *
|
| + * Streamable error functions *
|
| + * *
|
| ************************************************************************/
|
|
|
|
|
|
|
|
|
| /************************************************************************
|
| - * *
|
| - * Validation helper functions *
|
| - * *
|
| + * *
|
| + * Validation helper functions *
|
| + * *
|
| ************************************************************************/
|
|
|
|
|
| /************************************************************************
|
| - * *
|
| - * Allocation functions *
|
| - * *
|
| + * *
|
| + * Allocation functions *
|
| + * *
|
| ************************************************************************/
|
|
|
| /**
|
| @@ -4135,9 +4156,9 @@ xmlSchemaFree(xmlSchemaPtr schema)
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Debug functions *
|
| - * *
|
| + * *
|
| + * Debug functions *
|
| + * *
|
| ************************************************************************/
|
|
|
| #ifdef LIBXML_OUTPUT_ENABLED
|
| @@ -4587,7 +4608,7 @@ xmlSchemaDebugDumpIDCTable(FILE * output,
|
|
|
| /************************************************************************
|
| * *
|
| - * Utilities *
|
| + * Utilities *
|
| * *
|
| ************************************************************************/
|
|
|
| @@ -4692,9 +4713,9 @@ xmlSchemaGetProp(xmlSchemaParserCtxtPtr ctxt, xmlNodePtr node,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Parsing functions *
|
| - * *
|
| + * *
|
| + * Parsing functions *
|
| + * *
|
| ************************************************************************/
|
|
|
| #define WXS_FIND_GLOBAL_ITEM(slot) \
|
| @@ -4966,9 +4987,9 @@ xmlSchemaGetNamedComponent(xmlSchemaPtr schema,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Parsing functions *
|
| - * *
|
| + * *
|
| + * Parsing functions *
|
| + * *
|
| ************************************************************************/
|
|
|
| #define IS_BLANK_NODE(n) \
|
| @@ -5743,9 +5764,9 @@ xmlSchemaAddElementSubstitutionMember(xmlSchemaParserCtxtPtr pctxt,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| + * *
|
| * Utilities for parsing *
|
| - * *
|
| + * *
|
| ************************************************************************/
|
|
|
| /**
|
| @@ -5939,7 +5960,7 @@ xmlSchemaPValAttrNodeID(xmlSchemaParserCtxtPtr ctxt, xmlAttrPtr attr)
|
| xmlFree((xmlChar *) value);
|
| value = strip;
|
| }
|
| - res = xmlAddID(NULL, attr->doc, value, attr);
|
| + res = xmlAddID(NULL, attr->doc, value, attr);
|
| if (res == NULL) {
|
| ret = XML_SCHEMAP_S4S_ATTR_INVALID_VALUE;
|
| xmlSchemaPSimpleTypeErr(ctxt,
|
| @@ -6120,7 +6141,7 @@ xmlSchemaPGetBoolNodeValue(xmlSchemaParserCtxtPtr ctxt,
|
| value = xmlNodeGetContent(node);
|
| /*
|
| * 3.2.2.1 Lexical representation
|
| - * An instance of a datatype that is defined as �boolean�
|
| + * An instance of a datatype that is defined as `boolean`
|
| * can have the following legal literals {true, false, 1, 0}.
|
| */
|
| if (xmlStrEqual(BAD_CAST value, BAD_CAST "true"))
|
| @@ -6168,7 +6189,7 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
|
| return (def);
|
| /*
|
| * 3.2.2.1 Lexical representation
|
| - * An instance of a datatype that is defined as �boolean�
|
| + * An instance of a datatype that is defined as `boolean`
|
| * can have the following legal literals {true, false, 1, 0}.
|
| */
|
| if (xmlStrEqual(val, BAD_CAST "true"))
|
| @@ -6191,9 +6212,9 @@ xmlGetBooleanProp(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| + * *
|
| * Shema extraction from an Infoset *
|
| - * *
|
| + * *
|
| ************************************************************************/
|
| static xmlSchemaTypePtr xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr
|
| ctxt, xmlSchemaPtr schema,
|
| @@ -7698,8 +7719,8 @@ xmlSchemaParseAttributeGroupRef(xmlSchemaParserCtxtPtr pctxt,
|
| /*
|
| * SPEC src-redefine:
|
| * (7.1) "If it has an <attributeGroup> among its contents
|
| - * the �actual value� of whose ref [attribute] is the same
|
| - * as the �actual value� of its own name attribute plus
|
| + * the `actual value` of whose ref [attribute] is the same
|
| + * as the `actual value` of its own name attribute plus
|
| * target namespace, then it must have exactly one such group."
|
| */
|
| if (pctxt->redefCounter != 0) {
|
| @@ -8227,7 +8248,7 @@ xmlSchemaParseIDCSelectorAndField(xmlSchemaParserCtxtPtr ctxt,
|
| */
|
| attr = xmlSchemaGetPropNode(node, "xpath");
|
| if (attr == NULL) {
|
| - xmlSchemaPMissingAttrErr(ctxt,
|
| + xmlSchemaPMissingAttrErr(ctxt,
|
| XML_SCHEMAP_S4S_ATTR_MISSING,
|
| NULL, node,
|
| "name", NULL);
|
| @@ -8848,7 +8869,7 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| type->flags |= XML_SCHEMAS_TYPE_VARIETY_UNION;
|
| /*
|
| * SPEC (Base type) (2) "If the <list> or <union> alternative is chosen,
|
| - * then the �simple ur-type definition�."
|
| + * then the `simple ur-type definition`."
|
| */
|
| type->baseType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE);
|
| /*
|
| @@ -9016,7 +9037,7 @@ xmlSchemaParseList(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| type->flags |= XML_SCHEMAS_TYPE_VARIETY_LIST;
|
| /*
|
| * SPEC (Base type) (2) "If the <list> or <union> alternative is chosen,
|
| - * then the �simple ur-type definition�."
|
| + * then the `simple ur-type definition`."
|
| */
|
| type->baseType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYSIMPLETYPE);
|
| /*
|
| @@ -9161,9 +9182,9 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| }
|
| /*
|
| * TargetNamespace:
|
| - * SPEC "The �actual value� of the targetNamespace [attribute]
|
| + * SPEC "The `actual value` of the targetNamespace [attribute]
|
| * of the <schema> ancestor element information item if present,
|
| - * otherwise �absent�.
|
| + * otherwise `absent`.
|
| */
|
| if (topLevel == 0) {
|
| #ifdef ENABLE_NAMED_LOCALS
|
| @@ -9298,8 +9319,8 @@ xmlSchemaParseSimpleType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| /*
|
| * REDEFINE: SPEC src-redefine (5)
|
| * "Within the [children], each <simpleType> must have a
|
| - * <restriction> among its [children] ... the �actual value� of whose
|
| - * base [attribute] must be the same as the �actual value� of its own
|
| + * <restriction> among its [children] ... the `actual value` of whose
|
| + * base [attribute] must be the same as the `actual value` of its own
|
| * name attribute plus target namespace;"
|
| */
|
| if (topLevel && ctxt->isRedefine && (! hasRestriction)) {
|
| @@ -10383,7 +10404,7 @@ xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt,
|
| /*
|
| * Given that the schemaLocation [attribute] is only a hint, it is open
|
| * to applications to ignore all but the first <import> for a given
|
| - * namespace, regardless of the �actual value� of schemaLocation, but
|
| + * namespace, regardless of the `actual value` of schemaLocation, but
|
| * such a strategy risks missing useful information when new
|
| * schemaLocations are offered.
|
| *
|
| @@ -10736,7 +10757,7 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
|
| XML_SCHEMAP_S4S_ATTR_INVALID_VALUE,
|
| NULL, node,
|
| xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYURI),
|
| - NULL, namespaceName, NULL, NULL, NULL);
|
| + NULL, schemaLocation, NULL, NULL, NULL);
|
| return (pctxt->err);
|
| }
|
| /*
|
| @@ -10767,8 +10788,8 @@ xmlSchemaParseImport(xmlSchemaParserCtxtPtr pctxt, xmlSchemaPtr schema,
|
| thisTargetNamespace = WXS_BUCKET(pctxt)->origTargetNamespace;
|
| if (namespaceName != NULL) {
|
| /*
|
| - * 1.1 If the namespace [attribute] is present, then its �actual value�
|
| - * must not match the �actual value� of the enclosing <schema>'s
|
| + * 1.1 If the namespace [attribute] is present, then its `actual value`
|
| + * must not match the `actual value` of the enclosing <schema>'s
|
| * targetNamespace [attribute].
|
| */
|
| if (xmlStrEqual(thisTargetNamespace, namespaceName)) {
|
| @@ -10969,7 +10990,7 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt,
|
| * for inclusions, since the that was the feedback from the
|
| * schema people. I.e. the following spec piece will *not* be
|
| * satisfied:
|
| - * SPEC src-include: "It is not an error for the �actual value� of the
|
| + * SPEC src-include: "It is not an error for the `actual value` of the
|
| * schemaLocation [attribute] to fail to resolve it all, in which
|
| * case no corresponding inclusion is performed.
|
| * So do we need a warning report here?"
|
| @@ -10986,7 +11007,7 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt,
|
| *
|
| * SPEC src-redefine (1)
|
| * "If there are any element information items among the [children]
|
| - * other than <annotation> then the �actual value� of the
|
| + * other than <annotation> then the `actual value` of the
|
| * schemaLocation [attribute] must successfully resolve."
|
| * TODO: Ask the WG if a the location has always to resolve
|
| * here as well!
|
| @@ -11006,9 +11027,9 @@ xmlSchemaParseIncludeOrRedefine(xmlSchemaParserCtxtPtr pctxt,
|
| if (bucket->origTargetNamespace != NULL) {
|
| /*
|
| * SPEC src-include (2.1)
|
| - * "SII has a targetNamespace [attribute], and its �actual
|
| - * value� is identical to the �actual value� of the targetNamespace
|
| - * [attribute] of SII� (which must have such an [attribute])."
|
| + * "SII has a targetNamespace [attribute], and its `actual
|
| + * value` is identical to the `actual value` of the targetNamespace
|
| + * [attribute] of SII' (which must have such an [attribute])."
|
| */
|
| if (pctxt->targetNamespace == NULL) {
|
| xmlSchemaCustomErr(ACTXT_CAST pctxt,
|
| @@ -11356,8 +11377,8 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| /*
|
| * SPEC src-redefine:
|
| * (6.1) "If it has a <group> among its contents at
|
| - * some level the �actual value� of whose ref
|
| - * [attribute] is the same as the �actual value� of
|
| + * some level the `actual value` of whose ref
|
| + * [attribute] is the same as the `actual value` of
|
| * its own name attribute plus target namespace, then
|
| * all of the following must be true:"
|
| * (6.1.1) "It must have exactly one such group."
|
| @@ -11382,9 +11403,9 @@ xmlSchemaParseModelGroup(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| xmlChar *str = NULL;
|
| /*
|
| * SPEC src-redefine:
|
| - * (6.1.2) "The �actual value� of both that
|
| + * (6.1.2) "The `actual value` of both that
|
| * group's minOccurs and maxOccurs [attribute]
|
| - * must be 1 (or �absent�).
|
| + * must be 1 (or `absent`).
|
| */
|
| xmlSchemaCustomErr(ACTXT_CAST ctxt,
|
| XML_SCHEMAP_SRC_REDEFINE, child, NULL,
|
| @@ -11498,8 +11519,8 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| *
|
| * SPEC (1.2) "...otherwise (<restriction> has no <simpleType> "
|
| * among its [children]), the simple type definition which is
|
| - * the {content type} of the type definition �resolved� to by
|
| - * the �actual value� of the base [attribute]"
|
| + * the {content type} of the type definition `resolved` to by
|
| + * the `actual value` of the base [attribute]"
|
| */
|
| if (xmlSchemaPValAttrQName(ctxt, schema, NULL, node, "base",
|
| &(type->baseNs), &(type->base)) == 0)
|
| @@ -11522,8 +11543,8 @@ xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| /*
|
| * REDEFINE: SPEC src-redefine (5)
|
| * "Within the [children], each <simpleType> must have a
|
| - * <restriction> among its [children] ... the �actual value� of
|
| - * whose base [attribute] must be the same as the �actual value�
|
| + * <restriction> among its [children] ... the `actual value` of
|
| + * whose base [attribute] must be the same as the `actual value`
|
| * of its own name attribute plus target namespace;"
|
| */
|
| xmlSchemaPCustomErrExt(ctxt, XML_SCHEMAP_SRC_REDEFINE,
|
| @@ -12284,7 +12305,7 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| * SPEC
|
| * "...the third alternative (neither <simpleContent> nor
|
| * <complexContent>) is chosen. This case is understood as shorthand
|
| - * for complex content restricting the �ur-type definition�, and the
|
| + * for complex content restricting the `ur-type definition`, and the
|
| * details of the mappings should be modified as necessary.
|
| */
|
| type->baseType = xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
|
| @@ -12353,15 +12374,15 @@ xmlSchemaParseComplexType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Validating using Schemas *
|
| - * *
|
| + * *
|
| + * Validating using Schemas *
|
| + * *
|
| ************************************************************************/
|
|
|
| /************************************************************************
|
| - * *
|
| - * Reading/Writing Schemas *
|
| - * *
|
| + * *
|
| + * Reading/Writing Schemas *
|
| + * *
|
| ************************************************************************/
|
|
|
| #if 0 /* Will be enabled if it is clear what options are needed. */
|
| @@ -12938,6 +12959,15 @@ xmlSchemaBuildAContentModel(xmlSchemaParserCtxtPtr pctxt,
|
| if (tmp2 != 1) ret = 0;
|
| sub = sub->next;
|
| }
|
| +
|
| + /*
|
| + * epsilon needed to block previous trans from
|
| + * being allowed to enter back from another
|
| + * construct
|
| + */
|
| + pctxt->state = xmlAutomataNewEpsilon(pctxt->am,
|
| + pctxt->state, NULL);
|
| +
|
| if (particle->minOccurs == 0) {
|
| xmlAutomataNewEpsilon(pctxt->am, oldstate,
|
| pctxt->state);
|
| @@ -13183,8 +13213,8 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl,
|
| if ((elemDecl->subtypes == NULL) && (elemDecl->namedType != NULL)) {
|
| xmlSchemaTypePtr type;
|
|
|
| - /* (type definition) ... otherwise the type definition �resolved�
|
| - * to by the �actual value� of the type [attribute] ...
|
| + /* (type definition) ... otherwise the type definition `resolved`
|
| + * to by the `actual value` of the type [attribute] ...
|
| */
|
| type = xmlSchemaGetType(ctxt->schema, elemDecl->namedType,
|
| elemDecl->namedTypeNs);
|
| @@ -13222,7 +13252,7 @@ xmlSchemaResolveElementReferences(xmlSchemaElementPtr elemDecl,
|
| /*
|
| * The type definitions is set to:
|
| * SPEC "...the {type definition} of the element
|
| - * declaration �resolved� to by the �actual value�
|
| + * declaration `resolved` to by the `actual value`
|
| * of the substitutionGroup [attribute], if present"
|
| */
|
| if (elemDecl->subtypes == NULL)
|
| @@ -13260,8 +13290,8 @@ xmlSchemaResolveUnionMemberTypes(xmlSchemaParserCtxtPtr ctxt,
|
|
|
| /*
|
| * SPEC (1) "If the <union> alternative is chosen, then [Definition:]
|
| - * define the explicit members as the type definitions �resolved�
|
| - * to by the items in the �actual value� of the memberTypes [attribute],
|
| + * define the explicit members as the type definitions `resolved`
|
| + * to by the items in the `actual value` of the memberTypes [attribute],
|
| * if any, followed by the type definitions corresponding to the
|
| * <simpleType>s among the [children] of <union>, if any."
|
| */
|
| @@ -13556,7 +13586,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| return (0);
|
| }
|
| /*
|
| - * 3 If both O1 and O2 are sets of (namespace names or �absent�),
|
| + * 3 If both O1 and O2 are sets of (namespace names or `absent`),
|
| * then the union of those sets must be the value.
|
| */
|
| if ((completeWild->nsSet != NULL) && (curWild->nsSet != NULL)) {
|
| @@ -13590,7 +13620,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
| /*
|
| * 4 If the two are negations of different values (namespace names
|
| - * or �absent�), then a pair of not and �absent� must be the value.
|
| + * or `absent`), then a pair of not and `absent` must be the value.
|
| */
|
| if ((completeWild->negNsSet != NULL) &&
|
| (curWild->negNsSet != NULL) &&
|
| @@ -13632,7 +13662,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| if (nsFound && absentFound) {
|
| /*
|
| * 5.1 If the set S includes both the negated namespace
|
| - * name and �absent�, then any must be the value.
|
| + * name and `absent`, then any must be the value.
|
| */
|
| completeWild->any = 1;
|
| if (completeWild->nsSet != NULL) {
|
| @@ -13646,7 +13676,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| } else if (nsFound && (!absentFound)) {
|
| /*
|
| * 5.2 If the set S includes the negated namespace name
|
| - * but not �absent�, then a pair of not and �absent� must
|
| + * but not `absent`, then a pair of not and `absent` must
|
| * be the value.
|
| */
|
| if (completeWild->nsSet != NULL) {
|
| @@ -13661,7 +13691,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| completeWild->negNsSet->value = NULL;
|
| } else if ((!nsFound) && absentFound) {
|
| /*
|
| - * 5.3 If the set S includes �absent� but not the negated
|
| + * 5.3 If the set S includes `absent` but not the negated
|
| * namespace name, then the union is not expressible.
|
| */
|
| xmlSchemaPErr(ctxt, completeWild->node,
|
| @@ -13672,7 +13702,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| } else if ((!nsFound) && (!absentFound)) {
|
| /*
|
| * 5.4 If the set S does not include either the negated namespace
|
| - * name or �absent�, then whichever of O1 or O2 is a pair of not
|
| + * name or `absent`, then whichever of O1 or O2 is a pair of not
|
| * and a namespace name must be the value.
|
| */
|
| if (completeWild->negNsSet == NULL) {
|
| @@ -13706,7 +13736,7 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| while (cur != NULL) {
|
| if (cur->value == NULL) {
|
| /*
|
| - * 6.1 If the set S includes �absent�, then any must be the
|
| + * 6.1 If the set S includes `absent`, then any must be the
|
| * value.
|
| */
|
| completeWild->any = 1;
|
| @@ -13724,8 +13754,8 @@ xmlSchemaUnionWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
| if (completeWild->negNsSet == NULL) {
|
| /*
|
| - * 6.2 If the set S does not include �absent�, then a pair of not
|
| - * and �absent� must be the value.
|
| + * 6.2 If the set S does not include `absent`, then a pair of not
|
| + * and `absent` must be the value.
|
| */
|
| if (completeWild->nsSet != NULL) {
|
| xmlSchemaFreeWildcardNsSet(completeWild->nsSet);
|
| @@ -13808,9 +13838,9 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
| /*
|
| * 3 If either O1 or O2 is a pair of not and a value (a namespace
|
| - * name or �absent�) and the other is a set of (namespace names or
|
| - * �absent�), then that set, minus the negated value if it was in
|
| - * the set, minus �absent� if it was in the set, must be the value.
|
| + * name or `absent`) and the other is a set of (namespace names or
|
| + * `absent`), then that set, minus the negated value if it was in
|
| + * the set, minus `absent` if it was in the set, must be the value.
|
| */
|
| if (((completeWild->negNsSet != NULL) && (curWild->nsSet != NULL)) ||
|
| ((curWild->negNsSet != NULL) && (completeWild->nsSet != NULL))) {
|
| @@ -13859,7 +13889,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| return(0);
|
| }
|
| /*
|
| - * 4 If both O1 and O2 are sets of (namespace names or �absent�),
|
| + * 4 If both O1 and O2 are sets of (namespace names or `absent`),
|
| * then the intersection of those sets must be the value.
|
| */
|
| if ((completeWild->nsSet != NULL) && (curWild->nsSet != NULL)) {
|
| @@ -13909,7 +13939,7 @@ xmlSchemaIntersectWildcards(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
| /*
|
| * 6 If the one is a negation of a namespace name and the other
|
| - * is a negation of �absent�, then the one which is the negation
|
| + * is a negation of `absent`, then the one which is the negation
|
| * of a namespace name must be the value.
|
| */
|
| if ((completeWild->negNsSet != NULL) && (curWild->negNsSet != NULL) &&
|
| @@ -13941,7 +13971,7 @@ xmlSchemaCheckCOSNSSubset(xmlSchemaWildcardPtr sub,
|
| if (super->any)
|
| return (0);
|
| /*
|
| - * 2.1 sub must be a pair of not and a namespace name or �absent�.
|
| + * 2.1 sub must be a pair of not and a namespace name or `absent`.
|
| * 2.2 super must be a pair of not and the same value.
|
| */
|
| if ((sub->negNsSet != NULL) &&
|
| @@ -13949,7 +13979,7 @@ xmlSchemaCheckCOSNSSubset(xmlSchemaWildcardPtr sub,
|
| (sub->negNsSet->value == super->negNsSet->value))
|
| return (0);
|
| /*
|
| - * 3.1 sub must be a set whose members are either namespace names or �absent�.
|
| + * 3.1 sub must be a set whose members are either namespace names or `absent`.
|
| */
|
| if (sub->nsSet != NULL) {
|
| /*
|
| @@ -13980,7 +14010,7 @@ xmlSchemaCheckCOSNSSubset(xmlSchemaWildcardPtr sub,
|
| xmlSchemaWildcardNsPtr cur;
|
| /*
|
| * 3.2.2 super must be a pair of not and a namespace name or
|
| - * �absent� and that value must not be in sub's set.
|
| + * `absent` and that value must not be in sub's set.
|
| */
|
| cur = sub->nsSet;
|
| while (cur != NULL) {
|
| @@ -14142,7 +14172,7 @@ xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt,
|
| * SPEC (2.1.2) "R's {attribute declaration}'s
|
| * {type definition} must be validly derived from
|
| * B's {type definition} given the empty set as
|
| - * defined in Type Derivation OK (Simple) (�3.14.6)."
|
| + * defined in Type Derivation OK (Simple) ($3.14.6)."
|
| */
|
| xmlSchemaPAttrUseErr4(pctxt,
|
| XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2,
|
| @@ -14174,8 +14204,8 @@ xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt,
|
| /*
|
| * 2.1.3 ... one of the following must be true
|
| *
|
| - * 2.1.3.1 B's �effective value constraint� is
|
| - * �absent� or default.
|
| + * 2.1.3.1 B's `effective value constraint` is
|
| + * `absent` or default.
|
| */
|
| if ((bEffValue != NULL) &&
|
| (effFixed == 1)) {
|
| @@ -14184,7 +14214,7 @@ xmlSchemaCheckDerivationOKRestriction2to4(xmlSchemaParserCtxtPtr pctxt,
|
| xmlSchemaGetEffectiveValueConstraint(bcur,
|
| &effFixed, &rEffValue, NULL);
|
| /*
|
| - * 2.1.3.2 R's �effective value constraint� is
|
| + * 2.1.3.2 R's `effective value constraint` is
|
| * fixed with the same string as B's.
|
| * MAYBE TODO: Compare the computed values.
|
| * Hmm, it says "same string" so
|
| @@ -14218,9 +14248,9 @@ not_found:
|
| /*
|
| * (2.2) "otherwise the {base type definition} must have an
|
| * {attribute wildcard} and the {target namespace} of the
|
| - * R's {attribute declaration} must be �valid� with respect
|
| + * R's {attribute declaration} must be `valid` with respect
|
| * to that wildcard, as defined in Wildcard allows Namespace
|
| - * Name (�3.10.4)."
|
| + * Name ($3.10.4)."
|
| */
|
| if ((baseWild == NULL) ||
|
| (xmlSchemaCheckCVCWildcardNamespace(baseWild,
|
| @@ -14318,7 +14348,7 @@ not_found:
|
| * (4.2) "The complex type definition's {attribute wildcard}'s
|
| * {namespace constraint} must be a subset of the {base type
|
| * definition}'s {attribute wildcard}'s {namespace constraint},
|
| - * as defined by Wildcard Subset (�3.10.6)."
|
| + * as defined by Wildcard Subset ($3.10.6)."
|
| */
|
| xmlSchemaCustomErr4(ACTXT_CAST pctxt,
|
| XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2,
|
| @@ -14332,8 +14362,8 @@ not_found:
|
| FREE_AND_NULL(str);
|
| return(pctxt->err);
|
| }
|
| - /* 4.3 Unless the {base type definition} is the �ur-type
|
| - * definition�, the complex type definition's {attribute
|
| + /* 4.3 Unless the {base type definition} is the `ur-type
|
| + * definition`, the complex type definition's {attribute
|
| * wildcard}'s {process contents} must be identical to or
|
| * stronger than the {base type definition}'s {attribute
|
| * wildcard}'s {process contents}, where strict is stronger
|
| @@ -14519,7 +14549,7 @@ inherit_next: {}
|
| if (WXS_IS_EXTENSION(type)) {
|
| if (baseType->attributeWildcard != NULL) {
|
| /*
|
| - * (3.2.2.1) "If the �base wildcard� is non-�absent�, then
|
| + * (3.2.2.1) "If the `base wildcard` is non-`absent`, then
|
| * the appropriate case among the following:"
|
| */
|
| if (type->attributeWildcard != NULL) {
|
| @@ -14527,26 +14557,26 @@ inherit_next: {}
|
| * Union the complete wildcard with the base wildcard.
|
| * SPEC {attribute wildcard}
|
| * (3.2.2.1.2) "otherwise a wildcard whose {process contents}
|
| - * and {annotation} are those of the �complete wildcard�,
|
| + * and {annotation} are those of the `complete wildcard`,
|
| * and whose {namespace constraint} is the intensional union
|
| - * of the {namespace constraint} of the �complete wildcard�
|
| - * and of the �base wildcard�, as defined in Attribute
|
| - * Wildcard Union (�3.10.6)."
|
| + * of the {namespace constraint} of the `complete wildcard`
|
| + * and of the `base wildcard`, as defined in Attribute
|
| + * Wildcard Union ($3.10.6)."
|
| */
|
| if (xmlSchemaUnionWildcards(pctxt, type->attributeWildcard,
|
| baseType->attributeWildcard) == -1)
|
| goto exit_failure;
|
| } else {
|
| /*
|
| - * (3.2.2.1.1) "If the �complete wildcard� is �absent�,
|
| - * then the �base wildcard�."
|
| + * (3.2.2.1.1) "If the `complete wildcard` is `absent`,
|
| + * then the `base wildcard`."
|
| */
|
| type->attributeWildcard = baseType->attributeWildcard;
|
| }
|
| } else {
|
| /*
|
| - * (3.2.2.2) "otherwise (the �base wildcard� is �absent�) the
|
| - * �complete wildcard"
|
| + * (3.2.2.2) "otherwise (the `base wildcard` is `absent`) the
|
| + * `complete wildcard`"
|
| * NOOP
|
| */
|
| }
|
| @@ -14554,7 +14584,7 @@ inherit_next: {}
|
| /*
|
| * SPEC {attribute wildcard}
|
| * (3.1) "If the <restriction> alternative is chosen, then the
|
| - * �complete wildcard�;"
|
| + * `complete wildcard`;"
|
| * NOOP
|
| */
|
| }
|
| @@ -14803,12 +14833,12 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
|
| /* 2.2 */
|
| if (type->baseType == baseType) {
|
| /*
|
| - * 2.2.1 D's �base type definition� is B.
|
| + * 2.2.1 D's `base type definition` is B.
|
| */
|
| return (0);
|
| }
|
| /*
|
| - * 2.2.2 D's �base type definition� is not the �ur-type definition�
|
| + * 2.2.2 D's `base type definition` is not the `ur-type definition`
|
| * and is validly derived from B given the subset, as defined by this
|
| * constraint.
|
| */
|
| @@ -14818,8 +14848,8 @@ xmlSchemaCheckCOSSTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
|
| return (0);
|
| }
|
| /*
|
| - * 2.2.3 D's {variety} is list or union and B is the �simple ur-type
|
| - * definition�.
|
| + * 2.2.3 D's {variety} is list or union and B is the `simple ur-type
|
| + * definition`.
|
| */
|
| if (WXS_IS_ANY_SIMPLE_TYPE(baseType) &&
|
| (WXS_IS_LIST(type) || WXS_IS_UNION(type))) {
|
| @@ -15131,14 +15161,14 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt,
|
| * NOTE: This is somehow redundant, since we actually built a simple type
|
| * to have all the needed information; this acts as an self test.
|
| */
|
| - /* Base type: If the datatype has been �derived� by �restriction�
|
| - * then the Simple Type Definition component from which it is �derived�,
|
| - * otherwise the Simple Type Definition for anySimpleType (�4.1.6).
|
| + /* Base type: If the datatype has been `derived` by `restriction`
|
| + * then the Simple Type Definition component from which it is `derived`,
|
| + * otherwise the Simple Type Definition for anySimpleType ($4.1.6).
|
| */
|
| if (baseType == NULL) {
|
| /*
|
| * TODO: Think about: "modulo the impact of Missing
|
| - * Sub-components (�5.3)."
|
| + * Sub-components ($5.3)."
|
| */
|
| xmlSchemaPCustomErr(ctxt,
|
| XML_SCHEMAP_ST_PROPS_CORRECT_1,
|
| @@ -15156,9 +15186,10 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt,
|
| FREE_AND_NULL(str)
|
| return (XML_SCHEMAP_ST_PROPS_CORRECT_1);
|
| }
|
| - if ( (WXS_IS_LIST(type) || WXS_IS_UNION(type)) &&
|
| - (WXS_IS_RESTRICTION(type) == 0) &&
|
| - (! WXS_IS_ANY_SIMPLE_TYPE(baseType))) {
|
| + if ((WXS_IS_LIST(type) || WXS_IS_UNION(type)) &&
|
| + (WXS_IS_RESTRICTION(type) == 0) &&
|
| + ((! WXS_IS_ANY_SIMPLE_TYPE(baseType)) &&
|
| + (baseType->type != XML_SCHEMA_TYPE_SIMPLE))) {
|
| xmlSchemaPCustomErr(ctxt,
|
| XML_SCHEMAP_ST_PROPS_CORRECT_1,
|
| WXS_BASIC_CAST type, NULL,
|
| @@ -15197,10 +15228,10 @@ xmlSchemaCheckSTPropsCorrect(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
|
|
| /*
|
| - * 2 All simple type definitions must be derived ultimately from the �simple
|
| - * ur-type definition (so� circular definitions are disallowed). That is, it
|
| - * must be possible to reach a built-in primitive datatype or the �simple
|
| - * ur-type definition� by repeatedly following the {base type definition}.
|
| + * 2 All simple type definitions must be derived ultimately from the `simple
|
| + * ur-type definition` (so circular definitions are disallowed). That is, it
|
| + * must be possible to reach a built-in primitive datatype or the `simple
|
| + * ur-type definition` by repeatedly following the {base type definition}.
|
| *
|
| * NOTE: this is done in xmlSchemaCheckTypeDefCircular().
|
| */
|
| @@ -15384,10 +15415,10 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
|
| }
|
| /*
|
| * MAYBE TODO: (Hmm, not really) Datatypes states:
|
| - * A �list� datatype can be �derived� from an �atomic� datatype
|
| - * whose �lexical space� allows space (such as string or anyURI)or
|
| - * a �union� datatype any of whose {member type definitions}'s
|
| - * �lexical space� allows space.
|
| + * A `list` datatype can be `derived` from an `atomic` datatype
|
| + * whose `lexical space` allows space (such as string or anyURI)or
|
| + * a `union` datatype any of whose {member type definitions}'s
|
| + * `lexical space` allows space.
|
| */
|
| } else {
|
| /*
|
| @@ -15424,7 +15455,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
|
| /*
|
| * 2.3.2.3 The {item type definition} must be validly derived
|
| * from the {base type definition}'s {item type definition} given
|
| - * the empty set, as defined in Type Derivation OK (Simple) (�3.14.6).
|
| + * the empty set, as defined in Type Derivation OK (Simple) ($3.14.6).
|
| */
|
| {
|
| xmlSchemaTypePtr baseItemType;
|
| @@ -15471,7 +15502,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
|
| case XML_SCHEMA_FACET_WHITESPACE:
|
| /*
|
| * TODO: 2.5.1.2 List datatypes
|
| - * The value of �whiteSpace� is fixed to the value collapse.
|
| + * The value of `whiteSpace` is fixed to the value collapse.
|
| */
|
| case XML_SCHEMA_FACET_PATTERN:
|
| case XML_SCHEMA_FACET_ENUMERATION:
|
| @@ -15524,8 +15555,8 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
|
| member = member->next;
|
| }
|
| /*
|
| - * 3.3.1 If the {base type definition} is the �simple ur-type
|
| - * definition�
|
| + * 3.3.1 If the {base type definition} is the `simple ur-type
|
| + * definition`
|
| */
|
| if (type->baseType->builtInType == XML_SCHEMAS_ANYSIMPLETYPE) {
|
| /*
|
| @@ -15587,7 +15618,7 @@ xmlSchemaCheckCOSSTRestricts(xmlSchemaParserCtxtPtr pctxt,
|
| * 3.3.2.3 The {member type definitions}, in order, must be validly
|
| * derived from the corresponding type definitions in the {base
|
| * type definition}'s {member type definitions} given the empty set,
|
| - * as defined in Type Derivation OK (Simple) (�3.14.6).
|
| + * as defined in Type Derivation OK (Simple) ($3.14.6).
|
| */
|
| {
|
| xmlSchemaTypeLinkPtr baseMember;
|
| @@ -15694,7 +15725,7 @@ xmlSchemaCheckSRCSimpleType(xmlSchemaParserCtxtPtr ctxt,
|
| /*
|
| * src-simple-type.1 The corresponding simple type definition, if any,
|
| * must satisfy the conditions set out in Constraints on Simple Type
|
| - * Definition Schema Components (�3.14.6).
|
| + * Definition Schema Components ($3.14.6).
|
| */
|
| if (WXS_IS_RESTRICTION(type)) {
|
| /*
|
| @@ -15792,8 +15823,8 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt,
|
| * SPEC (2.1) "its {content type} must be a simple type definition
|
| * or mixed."
|
| * SPEC (2.2.2) "If the {content type} is mixed, then the {content
|
| - * type}'s particle must be �emptiable� as defined by
|
| - * Particle Emptiable (�3.9.6)."
|
| + * type}'s particle must be `emptiable` as defined by
|
| + * Particle Emptiable ($3.9.6)."
|
| */
|
| if ((! WXS_HAS_SIMPLE_CONTENT(type)) &&
|
| ((! WXS_HAS_MIXED_CONTENT(type)) || (! WXS_EMPTIABLE(type)))) {
|
| @@ -15809,14 +15840,14 @@ xmlSchemaParseCheckCOSValidDefault(xmlSchemaParserCtxtPtr pctxt,
|
| }
|
| /*
|
| * 1 If the type definition is a simple type definition, then the string
|
| - * must be �valid� with respect to that definition as defined by String
|
| - * Valid (�3.14.4).
|
| + * must be `valid` with respect to that definition as defined by String
|
| + * Valid ($3.14.4).
|
| *
|
| * AND
|
| *
|
| * 2.2.1 If the {content type} is a simple type definition, then the
|
| - * string must be �valid� with respect to that simple type definition
|
| - * as defined by String Valid (�3.14.4).
|
| + * string must be `valid` with respect to that simple type definition
|
| + * as defined by String Valid ($3.14.4).
|
| */
|
| if (WXS_IS_SIMPLE(type))
|
| ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt, node,
|
| @@ -15857,8 +15888,8 @@ xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| *
|
| * SPEC (1) "The values of the properties of a complex type definition must
|
| * be as described in the property tableau in The Complex Type Definition
|
| - * Schema Component (�3.4.1), modulo the impact of Missing
|
| - * Sub-components (�5.3)."
|
| + * Schema Component ($3.4.1), modulo the impact of Missing
|
| + * Sub-components ($5.3)."
|
| */
|
| if ((type->baseType != NULL) &&
|
| (WXS_IS_SIMPLE(type->baseType)) &&
|
| @@ -15875,9 +15906,9 @@ xmlSchemaCheckCTPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| return (XML_SCHEMAP_SRC_CT_1);
|
| }
|
| /*
|
| - * SPEC (3) "Circular definitions are disallowed, except for the �ur-type
|
| - * definition�. That is, it must be possible to reach the �ur-type
|
| - * definition by repeatedly following the {base type definition}."
|
| + * SPEC (3) "Circular definitions are disallowed, except for the `ur-type
|
| + * definition`. That is, it must be possible to reach the `ur-type
|
| + * definition` by repeatedly following the {base type definition}."
|
| *
|
| * NOTE (3) is done in xmlSchemaCheckTypeDefCircular().
|
| */
|
| @@ -16029,8 +16060,8 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
|
| if (type->baseType == baseType)
|
| return (0);
|
| /*
|
| - * SPEC (2.3.1) "D's {base type definition} must not be the �ur-type
|
| - * definition�."
|
| + * SPEC (2.3.1) "D's {base type definition} must not be the `ur-type
|
| + * definition`."
|
| */
|
| if (WXS_IS_ANYTYPE(type->baseType))
|
| return (1);
|
| @@ -16047,7 +16078,7 @@ xmlSchemaCheckCOSCTDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
|
| /*
|
| * SPEC (2.3.2.2) "If D's {base type definition} is simple, then it
|
| * must be validly derived from B given the subset as defined in Type
|
| - * Derivation OK (Simple) (�3.14.6).
|
| + * Derivation OK (Simple) ($3.14.6).
|
| */
|
| return (xmlSchemaCheckCOSSTDerivedOK(actxt, type->baseType,
|
| baseType, set));
|
| @@ -16187,7 +16218,7 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt,
|
| * definition must also have one, and the base type definition's
|
| * {attribute wildcard}'s {namespace constraint} must be a subset
|
| * of the complex type definition's {attribute wildcard}'s {namespace
|
| - * constraint}, as defined by Wildcard Subset (�3.10.6)."
|
| + * constraint}, as defined by Wildcard Subset ($3.10.6)."
|
| */
|
|
|
| /*
|
| @@ -16284,9 +16315,9 @@ xmlSchemaCheckCOSCTExtends(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
| /*
|
| * URGENT TODO SPEC (1.4.3.2.2.2) "The particle of the
|
| - * complex type definition must be a �valid extension�
|
| + * complex type definition must be a `valid extension`
|
| * of the {base type definition}'s particle, as defined
|
| - * in Particle Valid (Extension) (�3.9.6)."
|
| + * in Particle Valid (Extension) ($3.9.6)."
|
| *
|
| * NOTE that we won't check "Particle Valid (Extension)",
|
| * since it is ensured by the derivation process in
|
| @@ -16403,7 +16434,7 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
|
| if (base->builtInType == XML_SCHEMAS_ANYTYPE) {
|
| /*
|
| * SPEC (5.1) "The {base type definition} must be the
|
| - * �ur-type definition�."
|
| + * `ur-type definition`."
|
| * PASS
|
| */
|
| } else if ((type->contentType == XML_SCHEMA_CONTENT_SIMPLE) ||
|
| @@ -16422,7 +16453,7 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
|
| * SPEC (5.2.2.1) "The {content type} of the {base type
|
| * definition} must be a simple type definition from which
|
| * the {content type} is validly derived given the empty
|
| - * set as defined in Type Derivation OK (Simple) (�3.14.6)."
|
| + * set as defined in Type Derivation OK (Simple) ($3.14.6)."
|
| *
|
| * ATTENTION TODO: This seems not needed if the type implicitely
|
| * derived from the base type.
|
| @@ -16453,8 +16484,8 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
|
| (xmlSchemaParticlePtr) base->subtypes))) {
|
| /*
|
| * SPEC (5.2.2.2) "The {base type definition} must be mixed
|
| - * and have a particle which is �emptiable� as defined in
|
| - * Particle Emptiable (�3.9.6)."
|
| + * and have a particle which is `emptiable` as defined in
|
| + * Particle Emptiable ($3.9.6)."
|
| * PASS
|
| */
|
| } else {
|
| @@ -16483,7 +16514,7 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
|
| /*
|
| * SPEC (5.3.2.2) "The {content type} of the {base type
|
| * definition} must be elementOnly or mixed and have a particle
|
| - * which is �emptiable� as defined in Particle Emptiable (�3.9.6)."
|
| + * which is `emptiable` as defined in Particle Emptiable ($3.9.6)."
|
| * PASS
|
| */
|
| } else {
|
| @@ -16516,9 +16547,9 @@ xmlSchemaCheckDerivationOKRestriction(xmlSchemaParserCtxtPtr ctxt,
|
| }
|
| /*
|
| * SPEC (5.4.2) "The particle of the complex type definition itself
|
| - * must be a �valid restriction� of the particle of the {content
|
| + * must be a `valid restriction` of the particle of the {content
|
| * type} of the {base type definition} as defined in Particle Valid
|
| - * (Restriction) (�3.9.6).
|
| + * (Restriction) ($3.9.6).
|
| *
|
| * URGENT TODO: (5.4.2)
|
| */
|
| @@ -16587,7 +16618,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt,
|
| if (! WXS_HAS_SIMPLE_CONTENT(type)) {
|
| /*
|
| * 1 If the <complexContent> alternative is chosen, the type definition
|
| - * �resolved� to by the �actual value� of the base [attribute]
|
| + * `resolved` to by the `actual value` of the base [attribute]
|
| * must be a complex type definition;
|
| */
|
| if (! WXS_IS_COMPLEX(base)) {
|
| @@ -16607,7 +16638,7 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt,
|
| * SPEC
|
| * 2 If the <simpleContent> alternative is chosen, all of the
|
| * following must be true:
|
| - * 2.1 The type definition �resolved� to by the �actual value� of the
|
| + * 2.1 The type definition `resolved` to by the `actual value` of the
|
| * base [attribute] must be one of the following:
|
| */
|
| if (WXS_IS_SIMPLE(base)) {
|
| @@ -16713,14 +16744,14 @@ xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt,
|
| /*
|
| * SPEC (3) "The corresponding complex type definition component must
|
| * satisfy the conditions set out in Constraints on Complex Type
|
| - * Definition Schema Components (�3.4.6);"
|
| + * Definition Schema Components ($3.4.6);"
|
| * NOTE (3) will be done in xmlSchemaTypeFixup().
|
| */
|
| /*
|
| * SPEC (4) If clause 2.2.1 or clause 2.2.2 in the correspondence specification
|
| * above for {attribute wildcard} is satisfied, the intensional
|
| * intersection must be expressible, as defined in Attribute Wildcard
|
| - * Intersection (�3.10.6).
|
| + * Intersection ($3.10.6).
|
| * NOTE (4) is done in xmlSchemaFixupTypeAttributeUses().
|
| */
|
| return (ret);
|
| @@ -16791,7 +16822,7 @@ xmlSchemaCheckRCaseNameAndTypeOK(xmlSchemaParserCtxtPtr ctxt,
|
| return (1);
|
| /*
|
| * SPEC (2) "R's occurrence range is a valid restriction of B's
|
| - * occurrence range as defined by Occurrence Range OK (�3.9.6)."
|
| + * occurrence range as defined by Occurrence Range OK ($3.9.6)."
|
| */
|
| if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
|
| b->minOccurs, b->maxOccurs) != 0)
|
| @@ -16883,19 +16914,19 @@ xmlSchemaCheckRCaseNSCompat(xmlSchemaParserCtxtPtr ctxt,
|
| {
|
| /* TODO:Error codes (rcase-NSCompat). */
|
| /*
|
| - * SPEC "For an element declaration particle to be a �valid restriction�
|
| + * SPEC "For an element declaration particle to be a `valid restriction`
|
| * of a wildcard particle all of the following must be true:"
|
| *
|
| - * SPEC (1) "The element declaration's {target namespace} is �valid�
|
| + * SPEC (1) "The element declaration's {target namespace} is `valid`
|
| * with respect to the wildcard's {namespace constraint} as defined by
|
| - * Wildcard allows Namespace Name (�3.10.4)."
|
| + * Wildcard allows Namespace Name ($3.10.4)."
|
| */
|
| if (xmlSchemaCheckCVCWildcardNamespace((xmlSchemaWildcardPtr) b->children,
|
| ((xmlSchemaElementPtr) r->children)->targetNamespace) != 0)
|
| return (1);
|
| /*
|
| * SPEC (2) "R's occurrence range is a valid restriction of B's
|
| - * occurrence range as defined by Occurrence Range OK (�3.9.6)."
|
| + * occurrence range as defined by Occurrence Range OK ($3.9.6)."
|
| */
|
| if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
|
| b->minOccurs, b->maxOccurs) != 0)
|
| @@ -16955,21 +16986,21 @@ xmlSchemaCheckRCaseNSSubset(xmlSchemaParserCtxtPtr ctxt,
|
| /* TODO: Error codes (rcase-NSSubset). */
|
| /*
|
| * SPEC (1) "R's occurrence range is a valid restriction of B's
|
| - * occurrence range as defined by Occurrence Range OK (�3.9.6)."
|
| + * occurrence range as defined by Occurrence Range OK ($3.9.6)."
|
| */
|
| if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
|
| b->minOccurs, b->maxOccurs))
|
| return (1);
|
| /*
|
| * SPEC (2) "R's {namespace constraint} must be an intensional subset
|
| - * of B's {namespace constraint} as defined by Wildcard Subset (�3.10.6)."
|
| + * of B's {namespace constraint} as defined by Wildcard Subset ($3.10.6)."
|
| */
|
| if (xmlSchemaCheckCOSNSSubset((xmlSchemaWildcardPtr) r->children,
|
| (xmlSchemaWildcardPtr) b->children))
|
| return (1);
|
| /*
|
| - * SPEC (3) "Unless B is the content model wildcard of the �ur-type
|
| - * definition�, R's {process contents} must be identical to or stronger
|
| + * SPEC (3) "Unless B is the content model wildcard of the `ur-type
|
| + * definition`, R's {process contents} must be identical to or stronger
|
| * than B's {process contents}, where strict is stronger than lax is
|
| * stronger than skip."
|
| */
|
| @@ -17047,12 +17078,12 @@ xmlSchemaCheckRCaseNSRecurseCheckCardinality(xmlSchemaParserCtxtPtr ctxt,
|
| if ((r->children == NULL) || (r->children->children == NULL))
|
| return (-1);
|
| /*
|
| - * SPEC "For a group particle to be a �valid restriction� of a
|
| + * SPEC "For a group particle to be a `valid restriction` of a
|
| * wildcard particle..."
|
| *
|
| - * SPEC (1) "Every member of the {particles} of the group is a �valid
|
| - * restriction� of the wildcard as defined by
|
| - * Particle Valid (Restriction) (�3.9.6)."
|
| + * SPEC (1) "Every member of the {particles} of the group is a `valid
|
| + * restriction` of the wildcard as defined by
|
| + * Particle Valid (Restriction) ($3.9.6)."
|
| */
|
| part = (xmlSchemaParticlePtr) r->children->children;
|
| do {
|
| @@ -17063,7 +17094,7 @@ xmlSchemaCheckRCaseNSRecurseCheckCardinality(xmlSchemaParserCtxtPtr ctxt,
|
| /*
|
| * SPEC (2) "The effective total range of the group [...] is a
|
| * valid restriction of B's occurrence range as defined by
|
| - * Occurrence Range OK (�3.9.6)."
|
| + * Occurrence Range OK ($3.9.6)."
|
| */
|
| if (xmlSchemaCheckParticleRangeOK(
|
| xmlSchemaGetParticleTotalRangeMin(r),
|
| @@ -17103,11 +17134,11 @@ xmlSchemaCheckRCaseRecurse(xmlSchemaParserCtxtPtr ctxt,
|
| (r->children->type != b->children->type))
|
| return (-1);
|
| /*
|
| - * SPEC "For an all or sequence group particle to be a �valid
|
| - * restriction� of another group particle with the same {compositor}..."
|
| + * SPEC "For an all or sequence group particle to be a `valid
|
| + * restriction` of another group particle with the same {compositor}..."
|
| *
|
| * SPEC (1) "R's occurrence range is a valid restriction of B's
|
| - * occurrence range as defined by Occurrence Range OK (�3.9.6)."
|
| + * occurrence range as defined by Occurrence Range OK ($3.9.6)."
|
| */
|
| if (xmlSchemaCheckParticleRangeOK(r->minOccurs, r->maxOccurs,
|
| b->minOccurs, b->maxOccurs))
|
| @@ -17731,7 +17762,7 @@ xmlSchemaFinishMemberTypeDefinitionsProperty(xmlSchemaParserCtxtPtr pctxt,
|
| xmlSchemaTypeLinkPtr link, lastLink, prevLink, subLink, newLink;
|
| /*
|
| * The actual value is then formed by replacing any union type
|
| - * definition in the �explicit members� with the members of their
|
| + * definition in the `explicit members` with the members of their
|
| * {member type definitions}, in order.
|
| *
|
| * TODO: There's a bug entry at
|
| @@ -17865,8 +17896,8 @@ xmlSchemaTypeFixupWhitespace(xmlSchemaTypePtr type)
|
| }
|
| }
|
| /*
|
| - * For all �atomic� datatypes other than string (and types �derived�
|
| - * by �restriction� from it) the value of whiteSpace is fixed to
|
| + * For all `atomic` datatypes other than string (and types `derived`
|
| + * by `restriction` from it) the value of whiteSpace is fixed to
|
| * collapse
|
| */
|
| {
|
| @@ -18055,7 +18086,7 @@ xmlSchemaFixupSimpleTypeStageTwo(xmlSchemaParserCtxtPtr pctxt,
|
| * SPEC src-simple-type 1
|
| * "The corresponding simple type definition, if any, must satisfy
|
| * the conditions set out in Constraints on Simple Type Definition
|
| - * Schema Components (�3.14.6)."
|
| + * Schema Components ($3.14.6)."
|
| */
|
| /*
|
| * Schema Component Constraint: Simple Type Definition Properties Correct
|
| @@ -18315,7 +18346,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
|
| ( ((xmlSchemaTreeItemPtr) particle->children)->children == NULL))) {
|
| if (type->flags & XML_SCHEMAS_TYPE_MIXED) {
|
| /*
|
| - * SPEC (2.1.4) "If the �effective mixed� is true, then
|
| + * SPEC (2.1.4) "If the `effective mixed` is true, then
|
| * a particle whose properties are as follows:..."
|
| *
|
| * Empty sequence model group with
|
| @@ -18377,7 +18408,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
|
| if (type->contentType == XML_SCHEMA_CONTENT_EMPTY) {
|
| /*
|
| * SPEC (3.2.1)
|
| - * "If the �effective content� is empty, then the
|
| + * "If the `effective content` is empty, then the
|
| * {content type} of the [...] base ..."
|
| */
|
| type->contentType = baseType->contentType;
|
| @@ -18475,8 +18506,8 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
|
| particle->children->children =
|
| (xmlSchemaTreeItemPtr) xmlSchemaAddParticle(pctxt,
|
| type->node,
|
| - ((xmlSchemaParticlePtr) type->subtypes)->minOccurs,
|
| - ((xmlSchemaParticlePtr) type->subtypes)->maxOccurs);
|
| + ((xmlSchemaParticlePtr) baseType->subtypes)->minOccurs,
|
| + ((xmlSchemaParticlePtr) baseType->subtypes)->maxOccurs);
|
| if (particle->children->children == NULL)
|
| goto exit_failure;
|
| particle = (xmlSchemaParticlePtr)
|
| @@ -18484,7 +18515,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
|
| particle->children =
|
| ((xmlSchemaParticlePtr) baseType->subtypes)->children;
|
| /*
|
| - * SPEC "followed by the �effective content�."
|
| + * SPEC "followed by the `effective content`."
|
| */
|
| particle->next = effectiveContent;
|
| /*
|
| @@ -18628,12 +18659,12 @@ xmlSchemaCheckFacet(xmlSchemaFacetPtr facet,
|
|
|
| /* 4.3.5.5 Constraints on enumeration Schema Components
|
| * Schema Component Constraint: enumeration valid restriction
|
| - * It is an �error� if any member of {value} is not in the
|
| - * �value space� of {base type definition}.
|
| + * It is an `error` if any member of {value} is not in the
|
| + * `value space` of {base type definition}.
|
| *
|
| * minInclusive, maxInclusive, minExclusive, maxExclusive:
|
| - * The value �must� be in the
|
| - * �value space� of the �base type�.
|
| + * The value `must` be in the
|
| + * `value space` of the `base type`.
|
| */
|
| /*
|
| * This function is intended to deliver a compiled value
|
| @@ -19068,9 +19099,9 @@ xmlSchemaCheckAttrGroupCircular(xmlSchemaAttributeGroupPtr attrGr,
|
| * not be an <attributeGroup> with ref [attribute] which resolves
|
| * to the component corresponding to this <attributeGroup>. Indirect
|
| * circularity is also ruled out. That is, when QName resolution
|
| - * (Schema Document) (�3.15.3) is applied to a �QName� arising from
|
| + * (Schema Document) ($3.15.3) is applied to a `QName` arising from
|
| * any <attributeGroup>s with a ref [attribute] among the [children],
|
| - * it must not be the case that a �QName� is encountered at any depth
|
| + * it must not be the case that a `QName` is encountered at any depth
|
| * which resolves to the component corresponding to this <attributeGroup>.
|
| */
|
| if (attrGr->attrUses == NULL)
|
| @@ -19327,8 +19358,8 @@ xmlSchemaCheckAGPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| * SPEC ag-props-correct
|
| * (1) "The values of the properties of an attribute group definition
|
| * must be as described in the property tableau in The Attribute
|
| - * Group Definition Schema Component (�3.6.1), modulo the impact of
|
| - * Missing Sub-components (�5.3);"
|
| + * Group Definition Schema Component ($3.6.1), modulo the impact of
|
| + * Missing Sub-components ($5.3);"
|
| */
|
|
|
| if ((attrGr->attrUses != NULL) &&
|
| @@ -19462,8 +19493,8 @@ xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| * SPEC a-props-correct (1)
|
| * "The values of the properties of an attribute declaration must
|
| * be as described in the property tableau in The Attribute
|
| - * Declaration Schema Component (�3.2.1), modulo the impact of
|
| - * Missing Sub-components (�5.3)."
|
| + * Declaration Schema Component ($3.2.1), modulo the impact of
|
| + * Missing Sub-components ($5.3)."
|
| */
|
|
|
| if (WXS_ATTR_TYPEDEF(attr) == NULL)
|
| @@ -19491,9 +19522,9 @@ xmlSchemaCheckAttrPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| /*
|
| * SPEC a-props-correct (2)
|
| * "if there is a {value constraint}, the canonical lexical
|
| - * representation of its value must be �valid� with respect
|
| - * to the {type definition} as defined in String Valid (�3.14.4)."
|
| - * TODO: Don't care about the *cononical* stuff here, this requirement
|
| + * representation of its value must be `valid` with respect
|
| + * to the {type definition} as defined in String Valid ($3.14.4)."
|
| + * TODO: Don't care about the *canonical* stuff here, this requirement
|
| * will be removed in WXS 1.1 anyway.
|
| */
|
| ret = xmlSchemaVCheckCVCSimpleType(ACTXT_CAST pctxt,
|
| @@ -19560,15 +19591,15 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| /*
|
| * SPEC (1) "The values of the properties of an element declaration
|
| * must be as described in the property tableau in The Element
|
| - * Declaration Schema Component (�3.3.1), modulo the impact of Missing
|
| - * Sub-components (�5.3)."
|
| + * Declaration Schema Component ($3.3.1), modulo the impact of Missing
|
| + * Sub-components ($5.3)."
|
| */
|
| if (WXS_SUBST_HEAD(elemDecl) != NULL) {
|
| xmlSchemaElementPtr head = WXS_SUBST_HEAD(elemDecl), circ;
|
|
|
| xmlSchemaCheckElementDeclComponent(head, pctxt);
|
| /*
|
| - * SPEC (3) "If there is a non-�absent� {substitution group
|
| + * SPEC (3) "If there is a non-`absent` {substitution group
|
| * affiliation}, then {scope} must be global."
|
| */
|
| if ((elemDecl->flags & XML_SCHEMAS_ELEM_GLOBAL) == 0) {
|
| @@ -19612,9 +19643,9 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
| * of the element declaration must be validly derived from the {type
|
| * definition} of the {substitution group affiliation}, given the value
|
| * of the {substitution group exclusions} of the {substitution group
|
| - * affiliation}, as defined in Type Derivation OK (Complex) (�3.4.6)
|
| + * affiliation}, as defined in Type Derivation OK (Complex) ($3.4.6)
|
| * (if the {type definition} is complex) or as defined in
|
| - * Type Derivation OK (Simple) (�3.14.6) (if the {type definition} is
|
| + * Type Derivation OK (Simple) ($3.14.6) (if the {type definition} is
|
| * simple)."
|
| *
|
| * NOTE: {substitution group exclusions} means the values of the
|
| @@ -19678,9 +19709,9 @@ xmlSchemaCheckElemPropsCorrect(xmlSchemaParserCtxtPtr pctxt,
|
|
|
| /*
|
| * SPEC (2) "If there is a {value constraint}, the canonical lexical
|
| - * representation of its value must be �valid� with respect to the
|
| + * representation of its value must be `valid` with respect to the
|
| * {type definition} as defined in Element Default Valid (Immediate)
|
| - * (�3.3.6)."
|
| + * ($3.3.6)."
|
| */
|
| if (typeDef == NULL) {
|
| xmlSchemaPErr(pctxt, elemDecl->node,
|
| @@ -19748,7 +19779,7 @@ xmlSchemaCheckElemSubstGroup(xmlSchemaParserCtxtPtr ctxt,
|
| /*
|
| * SPEC (2) "It is validly substitutable for HEAD subject to HEAD's
|
| * {disallowed substitutions} as the blocking constraint, as defined in
|
| - * Substitution Group OK (Transitive) (�3.3.6)."
|
| + * Substitution Group OK (Transitive) ($3.3.6)."
|
| */
|
| for (head = WXS_SUBST_HEAD(elemDecl); head != NULL;
|
| head = WXS_SUBST_HEAD(head)) {
|
| @@ -19881,7 +19912,7 @@ xmlSchemaCheckElementDeclConsistent(xmlSchemaParserCtxtPtr pctxt,
|
| * SPEC Element Declarations Consistent:
|
| * "If the {particles} contains, either directly,
|
| * indirectly (that is, within the {particles} of a
|
| - * contained model group, recursively) or �implicitly�
|
| + * contained model group, recursively) or `implicitly`
|
| * two or more element declaration particles with
|
| * the same {name} and {target namespace}, then
|
| * all their type definitions must be the same
|
| @@ -20079,12 +20110,12 @@ xmlSchemaAreValuesEqual(xmlSchemaValPtr x,
|
| ptx = xmlSchemaGetPrimitiveType(tx);
|
| pty = xmlSchemaGetPrimitiveType(ty);
|
| /*
|
| - * (1) if a datatype T' is �derived� by �restriction� from an
|
| - * atomic datatype T then the �value space� of T' is a subset of
|
| - * the �value space� of T. */
|
| + * (1) if a datatype T' is `derived` by `restriction` from an
|
| + * atomic datatype T then the `value space` of T' is a subset of
|
| + * the `value space` of T. */
|
| /*
|
| - * (2) if datatypes T' and T'' are �derived� by �restriction�
|
| - * from a common atomic ancestor T then the �value space�s of T'
|
| + * (2) if datatypes T' and T'' are `derived` by `restriction`
|
| + * from a common atomic ancestor T then the `value space`s of T'
|
| * and T'' may overlap.
|
| */
|
| if (ptx != pty)
|
| @@ -20152,7 +20183,7 @@ xmlSchemaResolveAttrUseReferences(xmlSchemaAttributeUsePtr ause,
|
| ref->name, ref->targetNamespace);
|
| if (ause->attrDecl == NULL) {
|
| xmlSchemaPResCompAttrErr(ctxt,
|
| - XML_SCHEMAP_SRC_RESOLVE,
|
| + XML_SCHEMAP_SRC_RESOLVE,
|
| WXS_BASIC_CAST ause, ause->node,
|
| "ref", ref->name, ref->targetNamespace,
|
| XML_SCHEMA_TYPE_ATTRIBUTE, NULL);
|
| @@ -20185,8 +20216,8 @@ xmlSchemaCheckAttrUsePropsCorrect(xmlSchemaParserCtxtPtr ctxt,
|
| * SPEC au-props-correct (1)
|
| * "The values of the properties of an attribute use must be as
|
| * described in the property tableau in The Attribute Use Schema
|
| - * Component (�3.5.1), modulo the impact of Missing
|
| - * Sub-components (�5.3)."
|
| + * Component ($3.5.1), modulo the impact of Missing
|
| + * Sub-components ($5.3)."
|
| */
|
|
|
| if (((WXS_ATTRUSE_DECL(use))->defValue != NULL) &&
|
| @@ -20287,8 +20318,8 @@ xmlSchemaResolveAttrTypeReferences(xmlSchemaAttributePtr item,
|
| /*
|
| * The simple type definition corresponding to the <simpleType> element
|
| * information item in the [children], if present, otherwise the simple
|
| - * type definition �resolved� to by the �actual value� of the type
|
| - * [attribute], if present, otherwise the �simple ur-type definition�.
|
| + * type definition `resolved` to by the `actual value` of the type
|
| + * [attribute], if present, otherwise the `simple ur-type definition`.
|
| */
|
| if (item->flags & XML_SCHEMAS_ATTR_INTERNAL_RESOLVED)
|
| return(0);
|
| @@ -20452,11 +20483,11 @@ xmlSchemaCheckSRCRedefineFirst(xmlSchemaParserCtxtPtr pctxt)
|
|
|
| /*
|
| * SPEC src-redefine:
|
| - * (6.2.1) "The �actual value� of its own name attribute plus
|
| - * target namespace must successfully �resolve� to a model
|
| + * (6.2.1) "The `actual value` of its own name attribute plus
|
| + * target namespace must successfully `resolve` to a model
|
| * group definition in I."
|
| - * (7.2.1) "The �actual value� of its own name attribute plus
|
| - * target namespace must successfully �resolve� to an attribute
|
| + * (7.2.1) "The `actual value` of its own name attribute plus
|
| + * target namespace must successfully `resolve` to an attribute
|
| * group definition in I."
|
|
|
| *
|
| @@ -20629,10 +20660,10 @@ xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt)
|
| * SPEC src-redefine:
|
| * (6.2.2) "The {model group} of the model group definition
|
| * which corresponds to it per XML Representation of Model
|
| - * Group Definition Schema Components (�3.7.2) must be a
|
| - * �valid restriction� of the {model group} of that model
|
| + * Group Definition Schema Components ($3.7.2) must be a
|
| + * `valid restriction` of the {model group} of that model
|
| * group definition in I, as defined in Particle Valid
|
| - * (Restriction) (�3.9.6)."
|
| + * (Restriction) ($3.9.6)."
|
| */
|
| break;
|
| case XML_SCHEMA_TYPE_ATTRIBUTEGROUP:
|
| @@ -20641,11 +20672,11 @@ xmlSchemaCheckSRCRedefineSecond(xmlSchemaParserCtxtPtr pctxt)
|
| * (7.2.2) "The {attribute uses} and {attribute wildcard} of
|
| * the attribute group definition which corresponds to it
|
| * per XML Representation of Attribute Group Definition Schema
|
| - * Components (�3.6.2) must be �valid restrictions� of the
|
| + * Components ($3.6.2) must be `valid restrictions` of the
|
| * {attribute uses} and {attribute wildcard} of that attribute
|
| * group definition in I, as defined in clause 2, clause 3 and
|
| * clause 4 of Derivation Valid (Restriction, Complex)
|
| - * (�3.4.6) (where references to the base type definition are
|
| + * ($3.4.6) (where references to the base type definition are
|
| * understood as references to the attribute group definition
|
| * in I)."
|
| */
|
| @@ -20820,9 +20851,9 @@ xmlSchemaFixupComponents(xmlSchemaParserCtxtPtr pctxt,
|
|
|
| * (6.2.2) The {model group} of the model group definition which
|
| * corresponds to it per XML Representation of Model Group
|
| - * Definition Schema Components (�3.7.2) must be a �valid
|
| - * restriction� of the {model group} of that model group definition
|
| - * in I, as defined in Particle Valid (Restriction) (�3.9.6)."
|
| + * Definition Schema Components ($3.7.2) must be a `valid
|
| + * restriction` of the {model group} of that model group definition
|
| + * in I, as defined in Particle Valid (Restriction) ($3.9.6)."
|
| */
|
| xmlSchemaCheckSRCRedefineFirst(pctxt);
|
|
|
| @@ -21506,8 +21537,8 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type)
|
| return(XML_SCHEMA_WHITESPACE_REPLACE);
|
| else {
|
| /*
|
| - * For all �atomic� datatypes other than string (and types �derived�
|
| - * by �restriction� from it) the value of whiteSpace is fixed to
|
| + * For all `atomic` datatypes other than string (and types `derived`
|
| + * by `restriction` from it) the value of whiteSpace is fixed to
|
| * collapse
|
| * Note that this includes built-in list datatypes.
|
| */
|
| @@ -21532,16 +21563,16 @@ xmlSchemaGetWhiteSpaceFacetValue(xmlSchemaTypePtr type)
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Simple type validation *
|
| - * *
|
| + * *
|
| + * Simple type validation *
|
| + * *
|
| ************************************************************************/
|
|
|
|
|
| /************************************************************************
|
| - * *
|
| - * DOM Validation code *
|
| - * *
|
| + * *
|
| + * DOM Validation code *
|
| + * *
|
| ************************************************************************/
|
|
|
| /**
|
| @@ -21935,9 +21966,9 @@ xmlSchemaVAddNodeQName(xmlSchemaValidCtxtPtr vctxt,
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| + * *
|
| * Validation of identity-constraints (IDC) *
|
| - * *
|
| + * *
|
| ************************************************************************/
|
|
|
| /**
|
| @@ -22812,7 +22843,7 @@ xmlSchemaXPathProcessHistory(xmlSchemaValidCtxtPtr vctxt,
|
| xmlChar *str = NULL;
|
| /*
|
| * cvc-identity-constraint:
|
| - * 3 For each node in the �target node set� all
|
| + * 3 For each node in the `target node set` all
|
| * of the {fields}, with that node as the context
|
| * node, evaluate to either an empty node-set or
|
| * a node-set with exactly one member, which must
|
| @@ -22942,8 +22973,8 @@ create_key:
|
|
|
| /*
|
| * 4.1 If the {identity-constraint category} is unique(/key),
|
| - * then no two members of the �qualified node set� have
|
| - * �key-sequences� whose members are pairwise equal, as
|
| + * then no two members of the `qualified node set` have
|
| + * `key-sequences` whose members are pairwise equal, as
|
| * defined by Equal in [XML Schemas: Datatypes].
|
| *
|
| * Get the IDC binding from the matcher and check for
|
| @@ -23071,10 +23102,10 @@ selector_key_error:
|
| {
|
| xmlChar *str = NULL;
|
| /*
|
| - * 4.2.1 (KEY) The �target node set� and the
|
| - * �qualified node set� are equal, that is, every
|
| - * member of the �target node set� is also a member
|
| - * of the �qualified node set� and vice versa.
|
| + * 4.2.1 (KEY) The `target node set` and the
|
| + * `qualified node set` are equal, that is, every
|
| + * member of the `target node set` is also a member
|
| + * of the `qualified node set` and vice versa.
|
| */
|
| xmlSchemaCustomErr(ACTXT_CAST vctxt,
|
| XML_SCHEMAV_CVC_IDC, NULL,
|
| @@ -23865,9 +23896,9 @@ xmlSchemaCheckCVCIDCKeyRef(xmlSchemaValidCtxtPtr vctxt)
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * XML Reader validation code *
|
| - * *
|
| + * *
|
| + * XML Reader validation code *
|
| + * *
|
| ************************************************************************/
|
|
|
| static xmlSchemaAttrInfoPtr
|
| @@ -24470,14 +24501,14 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
|
| */
|
| /*
|
| * 2.1 If The definition is ENTITY or is validly derived from ENTITY given
|
| - * the empty set, as defined in Type Derivation OK (Simple) (�3.14.6), then
|
| - * the string must be a �declared entity name�.
|
| + * the empty set, as defined in Type Derivation OK (Simple) ($3.14.6), then
|
| + * the string must be a `declared entity name`.
|
| */
|
| /*
|
| * 2.2 If The definition is ENTITIES or is validly derived from ENTITIES
|
| - * given the empty set, as defined in Type Derivation OK (Simple) (�3.14.6),
|
| - * then every whitespace-delimited substring of the string must be a �declared
|
| - * entity name�.
|
| + * given the empty set, as defined in Type Derivation OK (Simple) ($3.14.6),
|
| + * then every whitespace-delimited substring of the string must be a `declared
|
| + * entity name`.
|
| */
|
| /*
|
| * 2.3 otherwise no further condition applies.
|
| @@ -24489,8 +24520,8 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
|
| if (WXS_IS_ANY_SIMPLE_TYPE(type) || WXS_IS_ATOMIC(type)) {
|
| xmlSchemaTypePtr biType; /* The built-in type. */
|
| /*
|
| - * SPEC (1.2.1) "if {variety} is �atomic� then the string must �match�
|
| - * a literal in the �lexical space� of {base type definition}"
|
| + * SPEC (1.2.1) "if {variety} is `atomic` then the string must `match`
|
| + * a literal in the `lexical space` of {base type definition}"
|
| */
|
| /*
|
| * Whitespace-normalize.
|
| @@ -24601,9 +24632,9 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
|
| xmlChar *tmpValue = NULL;
|
| unsigned long len = 0;
|
| xmlSchemaValPtr prevVal = NULL, curVal = NULL;
|
| - /* 1.2.2 if {variety} is �list� then the string must be a sequence
|
| - * of white space separated tokens, each of which �match�es a literal
|
| - * in the �lexical space� of {item type definition}
|
| + /* 1.2.2 if {variety} is `list` then the string must be a sequence
|
| + * of white space separated tokens, each of which `match`es a literal
|
| + * in the `lexical space` of {item type definition}
|
| */
|
| /*
|
| * Note that XML_SCHEMAS_TYPE_NORMVALUENEEDED will be set if
|
| @@ -24684,10 +24715,10 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
|
| } else if (WXS_IS_UNION(type)) {
|
| xmlSchemaTypeLinkPtr memberLink;
|
| /*
|
| - * TODO: For all datatypes �derived� by �union� whiteSpace does
|
| - * not apply directly; however, the normalization behavior of �union�
|
| + * TODO: For all datatypes `derived` by `union` whiteSpace does
|
| + * not apply directly; however, the normalization behavior of `union`
|
| * types is controlled by the value of whiteSpace on that one of the
|
| - * �memberTypes� against which the �union� is successfully validated.
|
| + * `memberTypes` against which the `union` is successfully validated.
|
| *
|
| * This means that the value is normalized by the first validating
|
| * member type, then the facets of the union type are applied. This
|
| @@ -24695,8 +24726,8 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
|
| */
|
|
|
| /*
|
| - * 1.2.3 if {variety} is �union� then the string must �match� a
|
| - * literal in the �lexical space� of at least one member of
|
| + * 1.2.3 if {variety} is `union` then the string must `match` a
|
| + * literal in the `lexical space` of at least one member of
|
| * {member type definitions}
|
| */
|
| memberLink = xmlSchemaGetUnionSimpleTypeMemberTypes(type);
|
| @@ -24735,9 +24766,9 @@ xmlSchemaVCheckCVCSimpleType(xmlSchemaAbstractCtxtPtr actxt,
|
| */
|
| if ((ret == 0) && (type->flags & XML_SCHEMAS_TYPE_HAS_FACETS)) {
|
| /*
|
| - * The normalization behavior of �union� types is controlled by
|
| - * the value of whiteSpace on that one of the �memberTypes�
|
| - * against which the �union� is successfully validated.
|
| + * The normalization behavior of `union` types is controlled by
|
| + * the value of whiteSpace on that one of the `memberTypes`
|
| + * against which the `union` is successfully validated.
|
| */
|
| NORMALIZE(memberLink->type);
|
| ret = xmlSchemaValidateFacets(actxt, node, type,
|
| @@ -24897,14 +24928,14 @@ xmlSchemaProcessXSIType(xmlSchemaValidCtxtPtr vctxt,
|
|
|
| /*
|
| * SPEC cvc-elt (3.3.4) : (4.3) (Type Derivation OK)
|
| - * "The �local type definition� must be validly
|
| + * "The `local type definition` must be validly
|
| * derived from the {type definition} given the union of
|
| * the {disallowed substitutions} and the {type definition}'s
|
| * {prohibited substitutions}, as defined in
|
| - * Type Derivation OK (Complex) (�3.4.6)
|
| + * Type Derivation OK (Complex) ($3.4.6)
|
| * (if it is a complex type definition),
|
| * or given {disallowed substitutions} as defined in Type
|
| - * Derivation OK (Simple) (�3.14.6) (if it is a simple type
|
| + * Derivation OK (Simple) ($3.14.6) (if it is a simple type
|
| * definition)."
|
| *
|
| * {disallowed substitutions}: the "block" on the element decl.
|
| @@ -24987,9 +25018,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
|
| return (vctxt->err);
|
| }
|
| if (actualType == NULL) {
|
| - VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
|
| - "The type definition is absent");
|
| - return (XML_SCHEMAV_CVC_TYPE_1);
|
| + VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
|
| + "The type definition is absent");
|
| + return (XML_SCHEMAV_CVC_TYPE_1);
|
| }
|
| if (vctxt->nbAttrInfos != 0) {
|
| int ret;
|
| @@ -25079,9 +25110,9 @@ xmlSchemaValidateElemDecl(xmlSchemaValidCtxtPtr vctxt)
|
| * No actual type definition.
|
| */
|
| if (actualType == NULL) {
|
| - VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
|
| - "The type definition is absent");
|
| - return (XML_SCHEMAV_CVC_TYPE_1);
|
| + VERROR(XML_SCHEMAV_CVC_TYPE_1, NULL,
|
| + "The type definition is absent");
|
| + return (XML_SCHEMAV_CVC_TYPE_1);
|
| }
|
| /*
|
| * Remember the actual type definition.
|
| @@ -25175,8 +25206,8 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
|
|
| /*
|
| * SPEC (cvc-attribute)
|
| - * (1) "The declaration must not be �absent� (see Missing
|
| - * Sub-components (�5.3) for how this can fail to be
|
| + * (1) "The declaration must not be `absent` (see Missing
|
| + * Sub-components ($5.3) for how this can fail to be
|
| * the case)."
|
| * (2) "Its {type definition} must not be absent."
|
| *
|
| @@ -25226,15 +25257,15 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| * use with an {attribute declaration} whose {name} matches
|
| * the attribute information item's [local name] and whose
|
| * {target namespace} is identical to the attribute information
|
| - * item's [namespace name] (where an �absent� {target namespace}
|
| + * item's [namespace name] (where an `absent` {target namespace}
|
| * is taken to be identical to a [namespace name] with no value),
|
| - * then the attribute information must be �valid� with respect
|
| + * then the attribute information must be `valid` with respect
|
| * to that attribute use as per Attribute Locally Valid (Use)
|
| - * (�3.5.4). In this case the {attribute declaration} of that
|
| - * attribute use is the �context-determined declaration� for the
|
| + * ($3.5.4). In this case the {attribute declaration} of that
|
| + * attribute use is the `context-determined declaration` for the
|
| * attribute information item with respect to Schema-Validity
|
| - * Assessment (Attribute) (�3.2.4) and
|
| - * Assessment Outcome (Attribute) (�3.2.5).
|
| + * Assessment (Attribute) ($3.2.4) and
|
| + * Assessment Outcome (Attribute) ($3.2.5).
|
| */
|
| iattr->state = XML_SCHEMAS_ATTR_ASSESSED;
|
| iattr->use = attrUse;
|
| @@ -25311,13 +25342,13 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| continue;
|
| /*
|
| * SPEC (cvc-complex-type)
|
| - * (3.2.2) "The attribute information item must be �valid� with
|
| - * respect to it as defined in Item Valid (Wildcard) (�3.10.4)."
|
| + * (3.2.2) "The attribute information item must be `valid` with
|
| + * respect to it as defined in Item Valid (Wildcard) ($3.10.4)."
|
| *
|
| * SPEC Item Valid (Wildcard) (cvc-wildcard)
|
| - * "... its [namespace name] must be �valid� with respect to
|
| + * "... its [namespace name] must be `valid` with respect to
|
| * the wildcard constraint, as defined in Wildcard allows
|
| - * Namespace Name (�3.10.4)."
|
| + * Namespace Name ($3.10.4)."
|
| */
|
| if (xmlSchemaCheckCVCWildcardNamespace(type->attributeWildcard,
|
| iattr->nsName) == 0) {
|
| @@ -25353,11 +25384,11 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| * SPEC (cvc-complex-type)
|
| * (5) "Let [Definition:] the wild IDs be the set of
|
| * all attribute information item to which clause 3.2
|
| - * applied and whose �validation� resulted in a
|
| - * �context-determined declaration� of mustFind or no
|
| - * �context-determined declaration� at all, and whose
|
| + * applied and whose `validation` resulted in a
|
| + * `context-determined declaration` of mustFind or no
|
| + * `context-determined declaration` at all, and whose
|
| * [local name] and [namespace name] resolve (as
|
| - * defined by QName resolution (Instance) (�3.15.4)) to
|
| + * defined by QName resolution (Instance) ($3.15.4)) to
|
| * an attribute declaration whose {type definition} is
|
| * or is derived from ID. Then all of the following
|
| * must be true:"
|
| @@ -25367,7 +25398,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| iattr->typeDef, XML_SCHEMAS_ID)) {
|
| /*
|
| * SPEC (5.1) "There must be no more than one
|
| - * item in �wild IDs�."
|
| + * item in `wild IDs`."
|
| */
|
| if (wildIDs != 0) {
|
| /* VAL TODO */
|
| @@ -25378,7 +25409,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| wildIDs++;
|
| /*
|
| * SPEC (cvc-complex-type)
|
| - * (5.2) "If �wild IDs� is non-empty, there must not
|
| + * (5.2) "If `wild IDs` is non-empty, there must not
|
| * be any attribute uses among the {attribute uses}
|
| * whose {attribute declaration}'s {type definition}
|
| * is or is derived from ID."
|
| @@ -25588,9 +25619,9 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| fixed = 0;
|
| /*
|
| * SPEC (cvc-attribute)
|
| - * (3) "The item's �normalized value� must be locally �valid�
|
| + * (3) "The item's `normalized value` must be locally `valid`
|
| * with respect to that {type definition} as per
|
| - * String Valid (�3.14.4)."
|
| + * String Valid ($3.14.4)."
|
| *
|
| * VAL TODO: Do we already have the
|
| * "normalized attribute value" here?
|
| @@ -25628,9 +25659,9 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| if (fixed) {
|
| /*
|
| * SPEC Attribute Locally Valid (Use) (cvc-au)
|
| - * "For an attribute information item to be�valid�
|
| + * "For an attribute information item to be `valid`
|
| * with respect to an attribute use its *normalized*
|
| - * value� must match the *canonical* lexical
|
| + * value must match the *canonical* lexical
|
| * representation of the attribute use's {value
|
| * constraint}value, if it is present and fixed."
|
| *
|
| @@ -25639,7 +25670,7 @@ xmlSchemaVAttributesComplex(xmlSchemaValidCtxtPtr vctxt)
|
| */
|
| /*
|
| * SPEC Attribute Locally Valid (cvc-attribute)
|
| - * (4) "The item's *actual* value� must match the *value* of
|
| + * (4) "The item's *actual* value must match the *value* of
|
| * the {value constraint}, if it is present and fixed."
|
| */
|
| if (iattr->val == NULL) {
|
| @@ -25869,8 +25900,8 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt,
|
| * SPEC (2.1) "its {content type} must be a simple type definition
|
| * or mixed."
|
| * SPEC (2.2.2) "If the {content type} is mixed, then the {content
|
| - * type}'s particle must be �emptiable� as defined by
|
| - * Particle Emptiable (�3.9.6)."
|
| + * type}'s particle must be `emptiable` as defined by
|
| + * Particle Emptiable ($3.9.6)."
|
| */
|
| if ((! WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) &&
|
| ((! WXS_HAS_MIXED_CONTENT(inode->typeDef)) ||
|
| @@ -25886,14 +25917,14 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt,
|
| }
|
| /*
|
| * 1 If the type definition is a simple type definition, then the string
|
| - * must be �valid� with respect to that definition as defined by String
|
| - * Valid (�3.14.4).
|
| + * must be `valid` with respect to that definition as defined by String
|
| + * Valid ($3.14.4).
|
| *
|
| * AND
|
| *
|
| * 2.2.1 If the {content type} is a simple type definition, then the
|
| - * string must be �valid� with respect to that simple type definition
|
| - * as defined by String Valid (�3.14.4).
|
| + * string must be `valid` with respect to that simple type definition
|
| + * as defined by String Valid ($3.14.4).
|
| */
|
| if (WXS_IS_SIMPLE(inode->typeDef)) {
|
|
|
| @@ -26034,6 +26065,20 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
|
| "AUTOMATON create on '%s'\n", inode->localName);
|
| #endif
|
| }
|
| +
|
| + /*
|
| + * Do not check further content if the node has been nilled
|
| + */
|
| + if (INODE_NILLED(inode)) {
|
| + ret = 0;
|
| +#ifdef DEBUG_AUTOMATA
|
| + xmlGenericError(xmlGenericErrorContext,
|
| + "AUTOMATON succeeded on nilled '%s'\n",
|
| + inode->localName);
|
| +#endif
|
| + goto skip_nilled;
|
| + }
|
| +
|
| /*
|
| * Get hold of the still expected content, since a further
|
| * call to xmlRegExecPushString() will loose this information.
|
| @@ -26071,6 +26116,9 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
|
|
|
| }
|
| }
|
| +
|
| +skip_nilled:
|
| +
|
| if (inode->typeDef->contentType == XML_SCHEMA_CONTENT_ELEMENTS)
|
| goto end_elem;
|
|
|
| @@ -26117,10 +26165,10 @@ character_content:
|
| (! INODE_NILLED(inode))) {
|
| /*
|
| * cvc-elt (3.3.4) : 5.1.1
|
| - * If the �actual type definition� is a �local type definition�
|
| + * If the `actual type definition` is a `local type definition`
|
| * then the canonical lexical representation of the {value constraint}
|
| - * value must be a valid default for the �actual type definition� as
|
| - * defined in Element Default Valid (Immediate) (�3.3.6).
|
| + * value must be a valid default for the `actual type definition` as
|
| + * defined in Element Default Valid (Immediate) ($3.3.6).
|
| */
|
| /*
|
| * NOTE: 'local' above means types acquired by xsi:type.
|
| @@ -26150,9 +26198,9 @@ character_content:
|
| * cvc-elt (3.3.4) : 5.1.2
|
| * The element information item with the canonical lexical
|
| * representation of the {value constraint} value used as its
|
| - * �normalized value� must be �valid� with respect to the
|
| - * �actual type definition� as defined by Element Locally Valid (Type)
|
| - * (�3.3.4).
|
| + * `normalized value` must be `valid` with respect to the
|
| + * `actual type definition` as defined by Element Locally Valid (Type)
|
| + * ($3.3.4).
|
| */
|
| if (WXS_IS_SIMPLE(inode->typeDef)) {
|
| ret = xmlSchemaVCheckINodeDataType(vctxt,
|
| @@ -26199,18 +26247,18 @@ default_psvi:
|
|
|
| } else if (! INODE_NILLED(inode)) {
|
| /*
|
| - * 5.2.1 The element information item must be �valid� with respect
|
| - * to the �actual type definition� as defined by Element Locally
|
| - * Valid (Type) (�3.3.4).
|
| + * 5.2.1 The element information item must be `valid` with respect
|
| + * to the `actual type definition` as defined by Element Locally
|
| + * Valid (Type) ($3.3.4).
|
| */
|
| if (WXS_IS_SIMPLE(inode->typeDef)) {
|
| /*
|
| * SPEC (cvc-type) (3.1)
|
| * "If the type definition is a simple type definition, ..."
|
| * (3.1.3) "If clause 3.2 of Element Locally Valid
|
| - * (Element) (�3.3.4) did not apply, then the �normalized value�
|
| - * must be �valid� with respect to the type definition as defined
|
| - * by String Valid (�3.14.4).
|
| + * (Element) ($3.3.4) did not apply, then the `normalized value`
|
| + * must be `valid` with respect to the type definition as defined
|
| + * by String Valid ($3.14.4).
|
| */
|
| ret = xmlSchemaVCheckINodeDataType(vctxt,
|
| inode, inode->typeDef, inode->value);
|
| @@ -26218,14 +26266,14 @@ default_psvi:
|
| /*
|
| * SPEC (cvc-type) (3.2) "If the type definition is a complex type
|
| * definition, then the element information item must be
|
| - * �valid� with respect to the type definition as per
|
| - * Element Locally Valid (Complex Type) (�3.4.4);"
|
| + * `valid` with respect to the type definition as per
|
| + * Element Locally Valid (Complex Type) ($3.4.4);"
|
| *
|
| * SPEC (cvc-complex-type) (2.2)
|
| * "If the {content type} is a simple type definition, ...
|
| - * the �normalized value� of the element information item is
|
| - * �valid� with respect to that simple type definition as
|
| - * defined by String Valid (�3.14.4)."
|
| + * the `normalized value` of the element information item is
|
| + * `valid` with respect to that simple type definition as
|
| + * defined by String Valid ($3.14.4)."
|
| */
|
| ret = xmlSchemaVCheckINodeDataType(vctxt,
|
| inode, inode->typeDef->contentTypeDef, inode->value);
|
| @@ -26267,8 +26315,8 @@ default_psvi:
|
| */
|
| if (WXS_HAS_MIXED_CONTENT(inode->typeDef)) {
|
| /*
|
| - * 5.2.2.2.1 If the {content type} of the �actual type
|
| - * definition� is mixed, then the *initial value* of the
|
| + * 5.2.2.2.1 If the {content type} of the `actual type
|
| + * definition` is mixed, then the *initial value* of the
|
| * item must match the canonical lexical representation
|
| * of the {value constraint} value.
|
| *
|
| @@ -26292,8 +26340,8 @@ default_psvi:
|
| }
|
| } else if (WXS_HAS_SIMPLE_CONTENT(inode->typeDef)) {
|
| /*
|
| - * 5.2.2.2.2 If the {content type} of the �actual type
|
| - * definition� is a simple type definition, then the
|
| + * 5.2.2.2.2 If the {content type} of the `actual type
|
| + * definition` is a simple type definition, then the
|
| * *actual value* of the item must match the canonical
|
| * lexical representation of the {value constraint} value.
|
| */
|
| @@ -26334,9 +26382,9 @@ end_elem:
|
| goto internal_error;
|
| /*
|
| * MAYBE TODO:
|
| - * SPEC (6) "The element information item must be �valid� with
|
| + * SPEC (6) "The element information item must be `valid` with
|
| * respect to each of the {identity-constraint definitions} as per
|
| - * Identity-constraint Satisfied (�3.11.4)."
|
| + * Identity-constraint Satisfied ($3.11.4)."
|
| */
|
| /*
|
| * PSVI TODO: If we expose IDC node-tables via PSVI then the tables
|
| @@ -26414,8 +26462,8 @@ end_elem:
|
| vctxt->depth--;
|
| vctxt->inode = vctxt->elemInfos[vctxt->depth];
|
| /*
|
| - * VAL TODO: 7 If the element information item is the �validation root�, it must be
|
| - * �valid� per Validation Root Valid (ID/IDREF) (�3.3.4).
|
| + * VAL TODO: 7 If the element information item is the `validation root`, it must be
|
| + * `valid` per Validation Root Valid (ID/IDREF) ($3.3.4).
|
| */
|
| return (ret);
|
|
|
| @@ -26496,11 +26544,11 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
|
| * Fallback to "anyType".
|
| *
|
| * SPEC (cvc-assess-elt)
|
| - * "If the item cannot be �strictly assessed�, [...]
|
| + * "If the item cannot be `strictly assessed`, [...]
|
| * an element information item's schema validity may be laxly
|
| - * assessed if its �context-determined declaration� is not
|
| - * skip by �validating� with respect to the �ur-type
|
| - * definition� as per Element Locally Valid (Type) (�3.3.4)."
|
| + * assessed if its `context-determined declaration` is not
|
| + * skip by `validating` with respect to the `ur-type
|
| + * definition` as per Element Locally Valid (Type) ($3.3.4)."
|
| */
|
| vctxt->inode->typeDef =
|
| xmlSchemaGetBuiltInType(XML_SCHEMAS_ANYTYPE);
|
| @@ -26572,9 +26620,9 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
|
| * SPEC (2.4) "If the {content type} is element-only or mixed,
|
| * then the sequence of the element information item's
|
| * element information item [children], if any, taken in
|
| - * order, is �valid� with respect to the {content type}'s
|
| + * order, is `valid` with respect to the {content type}'s
|
| * particle, as defined in Element Sequence Locally Valid
|
| - * (Particle) (�3.9.4)."
|
| + * (Particle) ($3.9.4)."
|
| */
|
| ret = xmlRegExecPushString2(regexCtxt,
|
| vctxt->inode->localName,
|
| @@ -26811,6 +26859,11 @@ xmlSchemaValidateElem(xmlSchemaValidCtxtPtr vctxt)
|
| vctxt->skipDepth = 0;
|
| return(ret);
|
| }
|
| + /*
|
| + * Augment the IDC definitions for the main schema and all imported ones
|
| + * NOTE: main schema is the first in the imported list
|
| + */
|
| + xmlHashScan(vctxt->schema->schemasImports,(xmlHashScanner)xmlSchemaAugmentImportedIDC, vctxt);
|
| }
|
| if (vctxt->depth > 0) {
|
| /*
|
| @@ -26904,15 +26957,15 @@ type_validation:
|
| if (vctxt->inode->typeDef == NULL) {
|
| vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
|
| ret = XML_SCHEMAV_CVC_TYPE_1;
|
| - VERROR(ret, NULL,
|
| - "The type definition is absent");
|
| + VERROR(ret, NULL,
|
| + "The type definition is absent");
|
| goto exit;
|
| }
|
| if (vctxt->inode->typeDef->flags & XML_SCHEMAS_TYPE_ABSTRACT) {
|
| vctxt->inode->flags |= XML_SCHEMA_NODE_INFO_ERR_BAD_TYPE;
|
| ret = XML_SCHEMAV_CVC_TYPE_2;
|
| - VERROR(ret, NULL,
|
| - "The type definition is abstract");
|
| + VERROR(ret, NULL,
|
| + "The type definition is abstract");
|
| goto exit;
|
| }
|
| /*
|
| @@ -27159,9 +27212,9 @@ internal_error:
|
| #endif
|
|
|
| /************************************************************************
|
| - * *
|
| - * SAX validation handlers *
|
| - * *
|
| + * *
|
| + * SAX validation handlers *
|
| + * *
|
| ************************************************************************/
|
|
|
| /*
|
| @@ -27412,9 +27465,9 @@ internal_error:
|
| }
|
|
|
| /************************************************************************
|
| - * *
|
| - * Validation interfaces *
|
| - * *
|
| + * *
|
| + * Validation interfaces *
|
| + * *
|
| ************************************************************************/
|
|
|
| /**
|
| @@ -27444,8 +27497,28 @@ xmlSchemaNewValidCtxt(xmlSchemaPtr schema)
|
| }
|
|
|
| /**
|
| + * xmlSchemaValidateSetFilename:
|
| + * @vctxt: the schema validation context
|
| + * @filename: the file name
|
| + *
|
| + * Workaround to provide file error reporting information when this is
|
| + * not provided by current APIs
|
| + */
|
| +void
|
| +xmlSchemaValidateSetFilename(xmlSchemaValidCtxtPtr vctxt, const char *filename) {
|
| + if (vctxt == NULL)
|
| + return;
|
| + if (vctxt->filename != NULL)
|
| + xmlFree(vctxt->filename);
|
| + if (filename != NULL)
|
| + vctxt->filename = (char *) xmlStrdup((const xmlChar *) filename);
|
| + else
|
| + vctxt->filename = NULL;
|
| +}
|
| +
|
| +/**
|
| * xmlSchemaClearValidCtxt:
|
| - * @ctxt: the schema validation context
|
| + * @vctxt: the schema validation context
|
| *
|
| * Free the resources associated to the schema validation context;
|
| * leaves some fields alive intended for reuse of the context.
|
| @@ -27546,6 +27619,11 @@ xmlSchemaClearValidCtxt(xmlSchemaValidCtxtPtr vctxt)
|
| * where the user provides the dict?
|
| */
|
| vctxt->dict = xmlDictCreate();
|
| +
|
| + if (vctxt->filename != NULL) {
|
| + xmlFree(vctxt->filename);
|
| + vctxt->filename = NULL;
|
| + }
|
| }
|
|
|
| /**
|
| @@ -27631,6 +27709,8 @@ xmlSchemaFreeValidCtxt(xmlSchemaValidCtxtPtr ctxt)
|
| xmlSchemaItemListFree(ctxt->nodeQNames);
|
| if (ctxt->dict != NULL)
|
| xmlDictFree(ctxt->dict);
|
| + if (ctxt->filename != NULL)
|
| + xmlFree(ctxt->filename);
|
| xmlFree(ctxt);
|
| }
|
|
|
| @@ -27785,7 +27865,10 @@ xmlSchemaVDocWalk(xmlSchemaValidCtxtPtr vctxt)
|
| const xmlChar *nsName;
|
|
|
| /* DOC VAL TODO: Move this to the start function. */
|
| - valRoot = xmlDocGetRootElement(vctxt->doc);
|
| + if (vctxt->validationRoot != NULL)
|
| + valRoot = vctxt->validationRoot;
|
| + else
|
| + valRoot = xmlDocGetRootElement(vctxt->doc);
|
| if (valRoot == NULL) {
|
| /* VAL TODO: Error code? */
|
| VERROR(1, NULL, "The document has no document element");
|
| @@ -28106,9 +28189,9 @@ xmlSchemaValidateDoc(xmlSchemaValidCtxtPtr ctxt, xmlDocPtr doc)
|
|
|
|
|
| /************************************************************************
|
| - * *
|
| - * Function and data for SAX streaming API *
|
| - * *
|
| + * *
|
| + * Function and data for SAX streaming API *
|
| + * *
|
| ************************************************************************/
|
| typedef struct _xmlSchemaSplitSAXData xmlSchemaSplitSAXData;
|
| typedef xmlSchemaSplitSAXData *xmlSchemaSplitSAXDataPtr;
|
| @@ -28625,6 +28708,63 @@ xmlSchemaSAXUnplug(xmlSchemaSAXPlugPtr plug)
|
| }
|
|
|
| /**
|
| + * xmlSchemaValidateSetLocator:
|
| + * @vctxt: a schema validation context
|
| + * @f: the locator function pointer
|
| + * @ctxt: the locator context
|
| + *
|
| + * Allows to set a locator function to the validation context,
|
| + * which will be used to provide file and line information since
|
| + * those are not provided as part of the SAX validation flow
|
| + * Setting @f to NULL disable the locator.
|
| + */
|
| +
|
| +void
|
| +xmlSchemaValidateSetLocator(xmlSchemaValidCtxtPtr vctxt,
|
| + xmlSchemaValidityLocatorFunc f,
|
| + void *ctxt)
|
| +{
|
| + if (vctxt == NULL) return;
|
| + vctxt->locFunc = f;
|
| + vctxt->locCtxt = ctxt;
|
| +}
|
| +
|
| +/**
|
| + * xmlSchemaValidateStreamLocator:
|
| + * @ctx: the xmlTextReaderPtr used
|
| + * @file: returned file information
|
| + * @line: returned line information
|
| + *
|
| + * Internal locator function for the readers
|
| + *
|
| + * Returns 0 in case the Schema validation could be (des)activated and
|
| + * -1 in case of error.
|
| + */
|
| +static int
|
| +xmlSchemaValidateStreamLocator(void *ctx, const char **file,
|
| + unsigned long *line) {
|
| + xmlParserCtxtPtr ctxt;
|
| +
|
| + if ((ctx == NULL) || ((file == NULL) && (line == NULL)))
|
| + return(-1);
|
| +
|
| + if (file != NULL)
|
| + *file = NULL;
|
| + if (line != NULL)
|
| + *line = 0;
|
| +
|
| + ctxt = (xmlParserCtxtPtr) ctx;
|
| + if (ctxt->input != NULL) {
|
| + if (file != NULL)
|
| + *file = ctxt->input->filename;
|
| + if (line != NULL)
|
| + *line = ctxt->input->line;
|
| + return(0);
|
| + }
|
| + return(-1);
|
| +}
|
| +
|
| +/**
|
| * xmlSchemaValidateStream:
|
| * @ctxt: a schema validation context
|
| * @input: the input to use for reading the data
|
| @@ -28667,6 +28807,7 @@ xmlSchemaValidateStream(xmlSchemaValidCtxtPtr ctxt,
|
| xmlCtxtUseOptions(pctxt, options);
|
| #endif
|
| pctxt->linenumbers = 1;
|
| + xmlSchemaValidateSetLocator(ctxt, xmlSchemaValidateStreamLocator, pctxt);
|
|
|
| inputStream = xmlNewIOInputStream(pctxt, input, enc);;
|
| if (inputStream == NULL) {
|
|
|