Home | History | Annotate | Download | only in libxml2

Lines Matching refs:facet

1712 	    *buf = xmlStrdup(BAD_CAST "facet '");
1788 xmlSchemaFacetPtr facet;
1802 for (facet = type->facets; facet != NULL; facet = facet->next) {
1803 if (facet->type != XML_SCHEMA_FACET_ENUMERATION)
1806 res = xmlSchemaGetCanonValueWhtspExt(facet->val,
1829 * The enumeration facet of a type restricts the enumeration
1830 * facet of the ancestor type; i.e., such restricted enumerations
2635 xmlSchemaFacetPtr facet,
2649 * facet to be given.
2652 facetType = facet->type;
2654 msg = xmlStrcat(msg, BAD_CAST "facet '");
2675 snprintf(len, 24, "%lu", xmlSchemaGetFacetValueAsULong(facet));
2704 facet->value);
2709 facet->value);
2714 facet->value);
2719 facet->value);
2724 facet->value);
2729 facet->value);
2734 facet->value);
2736 msg = xmlStrcat(msg, BAD_CAST "The value '%s' is not facet-valid.\n");
2739 msg = xmlStrcat(msg, BAD_CAST "The value is not facet-valid.\n");
3012 * @facet: the illegal facet
3014 * Reports an illegal facet for atomic simple types.
3021 xmlSchemaFacetPtr facet)
3027 "%s: The facet '%s' is not allowed on types derived from the "
3029 BAD_CAST des, xmlSchemaFacetTypeToString(facet->type),
3042 * @facet: the illegal facet
3044 * Reports an illegal facet for <list> and <union>.
3050 xmlSchemaFacetPtr facet)
3057 "%s: The facet '%s' is not allowed.\n",
3058 BAD_CAST des, xmlSchemaFacetTypeToString(facet->type));
3272 * Allocate a new Facet structure.
3938 * @facet: a schema facet structure
3940 * Deallocate a Schema Facet structure.
3943 xmlSchemaFreeFacet(xmlSchemaFacetPtr facet)
3945 if (facet == NULL)
3947 if (facet->val != NULL)
3948 xmlSchemaFreeValue(facet->val);
3949 if (facet->regexp != NULL)
3950 xmlRegFreeRegexp(facet->regexp);
3951 if (facet->annot != NULL)
3952 xmlSchemaFreeAnnot(facet->annot);
3953 xmlFree(facet);
3970 xmlSchemaFacetPtr facet, next;
3972 facet = type->facets;
3973 while (facet != NULL) {
3974 next = facet->next;
3975 xmlSchemaFreeFacet(facet);
3976 facet = next;
6626 * parse a XML schema Facet declaration
6635 xmlSchemaFacetPtr facet;
6642 facet = xmlSchemaNewFacet();
6643 if (facet == NULL) {
6644 xmlSchemaPErrMemory(ctxt, "allocating facet", node);
6647 facet->node = node;
6651 "Facet %s has no value\n", node->name, NULL);
6652 xmlSchemaFreeFacet(facet);
6656 facet->type = XML_SCHEMA_FACET_MININCLUSIVE;
6658 facet->type = XML_SCHEMA_FACET_MINEXCLUSIVE;
6660 facet->type = XML_SCHEMA_FACET_MAXINCLUSIVE;
6662 facet->type = XML_SCHEMA_FACET_MAXEXCLUSIVE;
6664 facet->type = XML_SCHEMA_FACET_TOTALDIGITS;
6666 facet->type = XML_SCHEMA_FACET_FRACTIONDIGITS;
6668 facet->type = XML_SCHEMA_FACET_PATTERN;
6670 facet->type = XML_SCHEMA_FACET_ENUMERATION;
6672 facet->type = XML_SCHEMA_FACET_WHITESPACE;
6674 facet->type = XML_SCHEMA_FACET_LENGTH;
6676 facet->type = XML_SCHEMA_FACET_MAXLENGTH;
6678 facet->type = XML_SCHEMA_FACET_MINLENGTH;
6681 "Unknown facet type %s\n", node->name, NULL);
6682 xmlSchemaFreeFacet(facet);
6686 facet->value = value;
6687 if ((facet->type != XML_SCHEMA_FACET_PATTERN) &&
6688 (facet->type != XML_SCHEMA_FACET_ENUMERATION)) {
6694 facet->fixed = 1;
6700 facet->annot = xmlSchemaParseAnnotation(ctxt, child, 1);
6705 "Facet %s has unexpected child content\n",
6708 return (facet);
11661 xmlSchemaFacetPtr facet, lastfacet = NULL;
11673 * *Single Facet Value*
11687 facet = xmlSchemaParseFacet(ctxt, schema, child);
11688 if (facet != NULL) {
11690 type->facets = facet;
11692 lastfacet->next = facet;
11693 lastfacet = facet;
11704 facet = type->facets;
11709 xmlSchemaPErrMemory(ctxt, "allocating a facet link", NULL);
11713 facetLink->facet = facet;
11720 facet = facet->next;
11721 } while (facet != NULL);
15298 * 1.3.1 DF must be an allowed constraining facet for the {primitive
15303 xmlSchemaFacetPtr facet;
15312 facet = type->facets;
15314 if (xmlSchemaIsBuiltInTypeFacet(primitive, facet->type) == 0) {
15318 type, primitive, facet);
15320 facet = facet->next;
15321 } while (facet != NULL);
15326 * SPEC (1.3.2) "If there is a facet of the same kind in the {facets}
15331 * NOTE (1.3.2) Facet derivation constraints are currently handled in
15379 xmlSchemaFacetPtr facet;
15400 * facet component.
15401 * OPTIMIZE TODO: the S4S already disallows any facet
15405 facet = type->facets;
15407 if (facet->type != XML_SCHEMA_FACET_WHITESPACE) {
15410 type, facet);
15413 facet = facet->next;
15414 } while (facet != NULL);
15490 xmlSchemaFacetPtr facet;
15494 * and enumeration facet components are allowed among the {facets}.
15496 facet = type->facets;
15498 switch (facet->type) {
15513 type, facet);
15521 facet = facet->next;
15522 } while (facet != NULL);
15675 * 3.3.2.4 Only pattern and enumeration facet components are
15679 xmlSchemaFacetPtr facet;
15682 facet = type->facets;
15684 if ((facet->type != XML_SCHEMA_FACET_PATTERN) &&
15685 (facet->type != XML_SCHEMA_FACET_ENUMERATION)) {
15688 type, facet);
15691 facet = facet->next;
15692 } while (facet != NULL);
17172 "The base type's facet is 'fixed', thus the value must not " \
17225 xmlSchemaFacetPtr facet, bfacet,
17253 * when a facet of the same kind occurs in both S and the
17269 facet = cur->facet;
17270 switch (facet->type) {
17272 flength = facet; break;
17274 fminlen = facet; break;
17276 fmininc = facet; break;
17278 fminexc = facet; break;
17280 fmaxlen = facet; break;
17282 fmaxinc = facet; break;
17284 fmaxexc = facet; break;
17286 ftotdig = facet; break;
17288 ffracdig = facet; break;
17294 facet = cur->facet;
17295 switch (facet->type) {
17297 bflength = facet; break;
17299 bfminlen = facet; break;
17301 bfmininc = facet; break;
17303 bfminexc = facet; break;
17305 bfmaxlen = facet; break;
17307 bfmaxinc = facet; break;
17309 bfmaxexc = facet; break;
17311 bftotdig = facet; break;
17313 bffracdig = facet; break;
17687 bfacet = cur->facet;
17696 * Search for a duplicate facet in the current type.
17702 facet = link->facet;
17703 if (facet->type == bfacet->type) {
17704 switch (facet->type) {
17709 if (facet->whitespace < bfacet->whitespace) {
17710 FACET_RESTR_ERR(facet,
17716 (facet->whitespace != bfacet->whitespace)) {
17717 FACET_RESTR_FIXED_ERR(facet)
17729 * If no duplicate was found: add the base types's facet
17737 "deriving facets, creating a facet link", NULL);
17740 link->facet = cur->facet;
17868 * Evaluate the whitespace-facet value.
17880 if (lin->facet->type == XML_SCHEMA_FACET_WHITESPACE) {
17881 switch (lin->facet->whitespace) {
18220 * with a set of facet components"
18619 * @facet: the facet
18630 xmlSchemaCheckFacet(xmlSchemaFacetPtr facet,
18637 if ((facet == NULL) || (typeDecl == NULL))
18648 switch (facet->type) {
18671 * on the facet. In this implementation of XML Schemata the
18672 * type holding a facet, won't be a built-in type.
18699 * facet->node is just the node holding the facet
18701 * of the facet.
18704 ACTXT_CAST pctxt, facet->node, base,
18705 facet->value, &(facet->val), 1, 1, 0);
18711 facet->node, NULL,
18714 "facet '%s' against the base type",
18715 facet->value, xmlSchemaFacetTypeToString(facet->type));
18725 ret, facet->node, WXS_BASIC_CAST facet,
18726 "The value '%s' of the facet does not validate "
18728 facet->value,
18734 } else if (facet->val == NULL) {
18744 facet->regexp = xmlRegexpCompile(facet->value);
18745 if (facet->regexp == NULL) {
18750 ret, facet->node, WXS_BASIC_CAST typeDecl,
18751 "The value '%s' of the facet 'pattern' is not a "
18753 facet->value, NULL);
18763 if (facet->type == XML_SCHEMA_FACET_TOTALDIGITS) {
18766 facet->value, &(facet->val));
18770 facet->value, &(facet->val));
18777 "validating facet value");
18786 ret, facet->node, WXS_BASIC_CAST typeDecl,
18787 "The value '%s' of the facet '%s' is not a valid '%s'",
18788 facet->value,
18789 xmlSchemaFacetTypeToString(facet->type),
18790 (facet->type != XML_SCHEMA_FACET_TOTALDIGITS) ?
18799 if (xmlStrEqual(facet->value, BAD_CAST "preserve")) {
18800 facet->whitespace = XML_SCHEMAS_FACET_PRESERVE;
18801 } else if (xmlStrEqual(facet->value, BAD_CAST "replace")) {
18802 facet->whitespace = XML_SCHEMAS_FACET_REPLACE;
18803 } else if (xmlStrEqual(facet->value, BAD_CAST "collapse")) {
18804 facet->whitespace = XML_SCHEMAS_FACET_COLLAPSE;
18811 ret, facet->node, WXS_BASIC_CAST typeDecl,
18812 "The value '%s' of the facet 'whitespace' is not "
18813 "valid", facet->value, NULL);
18848 xmlSchemaFacetPtr facet = typeDecl->facets;
18859 while (facet != NULL) {
18860 res = xmlSchemaCheckFacet(facet, typeDecl, pctxt, name);
18862 facet = facet->next;
21481 * @type: the facet type
21485 * Returns the char string representation of the facet type if the
21486 * type is a facet and an "Internal Error" string otherwise.
21549 * For list types the facet "whiteSpace" is fixed to "collapse".
24165 xmlSchemaFacetPtr facet;
24216 switch (facetLink->facet->type) {
24224 ret = xmlSchemaValidateLengthFacetWhtsp(facetLink->facet,
24228 ret = xmlSchemaValidateFacetWhtsp(facetLink->facet, ws,
24234 "validating against a atomic type facet");
24239 value, len, type, facetLink->facet, NULL, NULL, NULL);
24258 switch (facetLink->facet->type) {
24262 ret = xmlSchemaValidateListSimpleTypeFacet(facetLink->facet,
24270 "validating against a list type facet");
24275 value, length, type, facetLink->facet, NULL, NULL, NULL);
24288 * Process enumerations. Facet values are in the value space
24297 for (facet = tmpType->facets; facet != NULL; facet = facet->next) {
24298 if (facet->type != XML_SCHEMA_FACET_ENUMERATION)
24301 ret = xmlSchemaAreValuesEqual(facet->val, val);
24306 "validating against an enumeration facet");
24342 facet = NULL;
24347 if (facetLink->facet->type != XML_SCHEMA_FACET_PATTERN)
24354 ret = xmlRegexpExec(facetLink->facet->regexp, value);
24359 "validating against a pattern facet");
24363 * Save the last non-validating facet.
24365 facet = facetLink->facet;
24372 value, 0, type, facet, NULL, NULL, NULL);
24641 * the list type has an enum or pattern facet.