Home | History | Annotate | Download | only in libxml2

Lines Matching defs:schema

2  * schematron.c : implementation of the Schematron schema validity checking
130 const xmlChar *name; /* schema name */
163 xmlSchematronPtr schema;
192 xmlSchematronPtr schema;
293 * @ctxt: the schema parsing context
331 xmlSchematronPErrMemory(ctxt, "allocating schema test", node);
378 * @ctxt: the schema parsing context
379 * @schema: a schema structure
389 xmlSchematronAddRule(xmlSchematronParserCtxtPtr ctxt, xmlSchematronPtr schema,
396 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) ||
414 xmlSchematronPErrMemory(ctxt, "allocating schema rule", node);
423 if (schema->rules == NULL) {
424 schema->rules = ret;
426 xmlSchematronRulePtr prev = schema->rules;
472 * @ctxt: the schema parsing context
473 * @schema: a schema structure
483 xmlSchematronPtr schema, xmlNodePtr node, xmlChar *name)
487 if ((ctxt == NULL) || (schema == NULL) || (node == NULL) || (name == NULL))
492 xmlSchematronPErrMemory(ctxt, "allocating schema pattern", node);
498 if (schema->patterns == NULL) {
499 schema->patterns = ret;
501 xmlSchematronPatternPtr prev = schema->patterns;
531 * @ctxt: a schema validation context
544 xmlSchematronPErrMemory(ctxt, "allocating schema", NULL);
556 * @schema: a schema structure
561 xmlSchematronFree(xmlSchematronPtr schema)
563 if (schema == NULL)
566 if ((schema->doc != NULL) && (!(schema->preserve)))
567 xmlFreeDoc(schema->doc);
569 if (schema->namespaces != NULL)
570 xmlFree((char **) schema->namespaces);
572 xmlSchematronFreeRules(schema->rules);
573 xmlSchematronFreePatterns(schema->patterns);
574 xmlDictFree(schema->dict);
575 xmlFree(schema);
580 * @URL: the location of the schema
599 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
610 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
641 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
651 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
680 xmlSchematronPErrMemory(NULL, "allocating schema parser context",
691 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
702 * @ctxt: the schema parser context
704 * Free the resources associated to the schema parser context
725 * @ctxt: the schema parser context
766 * @ctxt: the schema parser context
795 * @ctxt: the schema parser context
841 * @ctxt: a schema validation context
876 ruleptr = xmlSchematronAddRule(ctxt, ctxt->schema, pattern,
951 * @ctxt: a schema validation context
970 pattern = xmlSchematronAddPattern(ctxt, ctxt->schema, pat, id);
1000 * @ctxt: a schema validation context
1066 * @ctxt: a schema validation context
1068 * parse a schema definition resource and build an internal
1133 "The schema has no document element.\n", NULL, NULL);
1140 if (!IS_SCHEMATRON(root, "schema")) {
1150 ctxt->schema = ret;
1153 * scan the schema elements
1495 * @schema: a precompiled XML Schematrons
1498 * Create an XML Schematrons validation context based on the given schema.
1503 xmlSchematronNewValidCtxt(xmlSchematronPtr schema, int options)
1516 ret->schema = schema;
1520 xmlSchematronPErrMemory(NULL, "allocating schema parser XPath context",
1525 for (i = 0;i < schema->nbNamespaces;i++) {
1526 if ((schema->namespaces[2 * i] == NULL) ||
1527 (schema->namespaces[2 * i + 1] == NULL))
1529 xmlXPathRegisterNs(ret->xctxt, schema->namespaces[2 * i + 1],
1530 schema->namespaces[2 * i]);
1537 * @ctxt: the schema validation context
1539 * Free the resources associated to the schema validation context
1590 * @ctxt: the schema validation context
1655 * @ctxt: the schema validation context
1671 if ((ctxt == NULL) || (ctxt->schema == NULL) ||
1672 (ctxt->schema->rules == NULL) || (instance == NULL))
1689 rule = ctxt->schema->rules;
1707 pattern = ctxt->schema->patterns;
1748 xmlSchematronPtr schema = NULL;
1754 schema = xmlSchematronParse(pctxt);
1755 if (schema == NULL) {
1765 if ((schema != NULL) && (instance != NULL)) {
1766 vctxt = xmlSchematronNewValidCtxt(schema);
1774 xmlSchematronFree(schema);