Lines Matching defs:schema
210 xmlRelaxNGPtr schema; /* The schema in use */
355 xmlRelaxNGPtr schema; /* The schema in use */
403 xmlRelaxNGPtr schema; /* the schema */
416 xmlRelaxNGPtr schema; /* the schema */
662 static void xmlRelaxNGFreeInnerSchema(xmlRelaxNGPtr schema);
686 if (docu->schema != NULL)
687 xmlRelaxNGFreeInnerSchema(docu->schema);
725 if (incl->schema != NULL)
726 xmlRelaxNGFree(incl->schema);
773 * @schema: a schema structure
775 * Deallocate a RelaxNG schema structure.
778 xmlRelaxNGFreeInnerSchema(xmlRelaxNGPtr schema)
780 if (schema == NULL)
783 if (schema->doc != NULL)
784 xmlFreeDoc(schema->doc);
785 if (schema->defTab != NULL) {
788 for (i = 0; i < schema->defNr; i++)
789 xmlRelaxNGFreeDefine(schema->defTab[i]);
790 xmlFree(schema->defTab);
793 xmlFree(schema);
798 * @schema: a schema structure
803 xmlRelaxNGFree(xmlRelaxNGPtr schema)
805 if (schema == NULL)
808 if (schema->topgrammar != NULL)
809 xmlRelaxNGFreeGrammar(schema->topgrammar);
810 if (schema->doc != NULL)
811 xmlFreeDoc(schema->doc);
812 if (schema->documents != NULL)
813 xmlRelaxNGFreeDocumentList(schema->documents);
814 if (schema->includes != NULL)
815 xmlRelaxNGFreeIncludeList(schema->includes);
816 if (schema->defTab != NULL) {
819 for (i = 0; i < schema->defNr; i++)
820 xmlRelaxNGFreeDefine(schema->defTab[i]);
821 xmlFree(schema->defTab);
824 xmlFree(schema);
4681 docu->schema = xmlRelaxNGParseDocument(ctxt, root);
4683 if ((docu->schema != NULL) &&
4684 (docu->schema->topgrammar != NULL)) {
4685 docu->content = docu->schema->topgrammar->start;
6505 * @node: the root node of the RelaxNG schema
6516 xmlRelaxNGPtr schema = NULL;
6523 schema = xmlRelaxNGNewRelaxNG(ctxt);
6524 if (schema == NULL)
6530 schema->topgrammar = xmlRelaxNGParseGrammar(ctxt, node->children);
6534 schema->topgrammar = ret = xmlRelaxNGNewGrammar(ctxt);
6535 if (schema->topgrammar == NULL) {
6536 return (schema);
6559 if (schema->topgrammar->start != NULL) {
6560 xmlRelaxNGCheckCycles(ctxt, schema->topgrammar->start, 0);
6562 xmlRelaxNGSimplify(ctxt, schema->topgrammar->start, NULL);
6563 while ((schema->topgrammar->start != NULL) &&
6564 (schema->topgrammar->start->type == XML_RELAXNG_NOOP) &&
6565 (schema->topgrammar->start->next != NULL))
6566 schema->topgrammar->start =
6567 schema->topgrammar->start->content;
6568 xmlRelaxNGCheckRules(ctxt, schema->topgrammar->start,
6573 if (schema == NULL)
6578 return (schema);
6589 * @URL: the location of the schema
6686 * @ctxt: the schema parser context
6688 * Free the resources associated to the schema parser context
7332 * parse a schema definition resource and build an internal
7449 * Transfer the pointer for cleanup at the schema level.
7723 * @schema: a schema structure
7728 xmlRelaxNGDump(FILE * output, xmlRelaxNGPtr schema)
7732 if (schema == NULL) {
7737 if (schema->doc == NULL) {
7739 } else if (schema->doc->URL != NULL) {
7740 fprintf(output, "%s\n", schema->doc->URL);
7744 if (schema->topgrammar == NULL) {
7748 xmlRelaxNGDumpGrammar(output, schema->topgrammar, 1);
7754 * @schema: a schema structure
7759 xmlRelaxNGDumpTree(FILE * output, xmlRelaxNGPtr schema)
7763 if (schema == NULL) {
7767 if (schema->doc == NULL) {
7770 xmlDocDump(output, schema->doc);
8164 xmlRelaxNGPtr schema;
8169 schema = ctxt->schema;
8170 if (schema == NULL) {
8174 grammar = schema->topgrammar;
8366 * @ctxt: a schema validation context
8396 * @ctxt: a schema validation context
10552 xmlRelaxNGPtr schema;
10557 if ((ctxt == NULL) || (ctxt->schema == NULL) || (doc == NULL))
10561 schema = ctxt->schema;
10562 grammar = schema->topgrammar;
10641 * @schema: a precompiled XML RelaxNGs
10643 * Create an XML RelaxNGs validation context based on the given schema
10648 xmlRelaxNGNewValidCtxt(xmlRelaxNGPtr schema)
10658 ret->schema = schema;
10665 if (schema != NULL)
10666 ret->idref = schema->idref;
10676 * @ctxt: the schema validation context
10678 * Free the resources associated to the schema validation context