• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gnulib-local/lib/libxml/

Lines Matching defs:grammar

108     xmlRelaxNGGrammarPtr parent;        /* the parent grammar if any */
109 xmlRelaxNGGrammarPtr children; /* the children grammar if any */
110 xmlRelaxNGGrammarPtr next; /* the next grammar if any */
134 XML_RELAXNG_PARENTREF, /* reference to a def in the parent grammar */
211 xmlRelaxNGGrammarPtr grammar; /* the current grammar */
212 xmlRelaxNGGrammarPtr parentgrammar; /* the parent grammar */
659 static void xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar);
831 * Allocate a new RelaxNG grammar.
852 * @grammar: a grammar structure
854 * Deallocate a RelaxNG grammar structure.
857 xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar)
859 if (grammar == NULL)
862 if (grammar->children != NULL) {
863 xmlRelaxNGFreeGrammar(grammar->children);
865 if (grammar->next != NULL) {
866 xmlRelaxNGFreeGrammar(grammar->next);
868 if (grammar->refs != NULL) {
869 xmlHashFree(grammar->refs, NULL);
871 if (grammar->defs != NULL) {
872 xmlHashFree(grammar->defs, NULL);
875 xmlFree(grammar);
1557 (inc->doc->children->name, BAD_CAST "grammar")) {
1685 * Check that the top element is a grammar
1694 if (!IS_RELAXNG(root, "grammar")) {
1696 "xmlRelaxNG: included document %s root is not a grammar\n",
1713 "xmlRelaxNG: include %s has a start but not the included grammar\n",
1732 "xmlRelaxNG: include %s has a define %s but not the included grammar\n",
2204 return (xmlCharStrdup("No top grammar defined\n"));
4501 * Integrate the content of an include node in the current grammar
4524 if (!xmlStrEqual(root->name, BAD_CAST "grammar")) {
4526 "Include document root is not a grammar\n", NULL, NULL);
4590 if (ctxt->grammar->defs == NULL)
4591 ctxt->grammar->defs = xmlHashCreate(10);
4592 if (ctxt->grammar->defs == NULL) {
4597 tmp = xmlHashAddEntry(ctxt->grammar->defs, name, def);
4601 prev = xmlHashLookup(ctxt->grammar->defs, name);
4823 if (ctxt->grammar->refs == NULL)
4824 ctxt->grammar->refs = xmlHashCreate(10);
4825 if (ctxt->grammar->refs == NULL) {
4832 tmp = xmlHashAddEntry(ctxt->grammar->refs, def->name, def);
4837 xmlHashLookup(ctxt->grammar->refs, def->name);
4885 } else if (IS_RELAXNG(node, "grammar")) {
4886 xmlRelaxNGGrammarPtr grammar, old;
4891 "Found <grammar> pattern\n");
4895 old = ctxt->grammar;
4897 grammar = xmlRelaxNGParseGrammar(ctxt, node->children);
4899 ctxt->grammar = old;
4902 if (grammar != NULL) {
4903 grammar->next = old->next;
4904 old->next = grammar;
4908 if (grammar != NULL)
4909 def = grammar->start;
4915 "Use of parentRef without a parent grammar\n", NULL,
5489 if (ctxt->grammar->start != NULL) {
5490 last = ctxt->grammar->start;
5495 ctxt->grammar->start = def;
5509 * @nodes: grammar children nodes
5511 * parse the content of a RelaxNG grammar node.
5523 "grammar has no children\n", NULL, NULL);
5546 "grammar has unexpected child %s\n", nodes->name,
5562 * element of a given grammar using the same name.
5569 xmlRelaxNGGrammarPtr grammar;
5572 grammar = ctxt->grammar;
5573 if (grammar == NULL) {
5575 "Internal error: no grammar in CheckReference %s\n",
5585 if (grammar->defs != NULL) {
5586 def = xmlHashLookup(grammar->defs, name);
5612 * element of a given grammar using the same name.
5728 * @grammar: the grammar
5731 * element of a given grammar.
5735 xmlRelaxNGGrammarPtr grammar)
5743 starts = grammar->start;
5807 cur->content = grammar->start;
5808 grammar->start = cur;
5833 * @nodes: grammar children nodes
5906 * @nodes: grammar children nodes
6197 * of grammar/define
6434 * @nodes: grammar children nodes
6436 * parse a Relax-NG <grammar> node
6447 xmlGenericError(xmlGenericErrorContext, "Parsing a new grammar\n");
6455 * Link the new grammar in the tree
6457 ret->parent = ctxt->grammar;
6458 if (ctxt->grammar != NULL) {
6459 tmp = ctxt->grammar->children;
6461 ctxt->grammar->children = ret;
6469 old = ctxt->grammar;
6470 ctxt->grammar = ret;
6472 ctxt->grammar = ret;
6473 if (ctxt->grammar == NULL) {
6475 "Failed to parse <grammar> content\n", NULL, NULL);
6476 } else if (ctxt->grammar->start == NULL) {
6478 "Element <grammar> has no <start>\n", NULL, NULL);
6491 * link together defines and refs in this grammar
6498 ctxt->grammar = old;
6529 if (IS_RELAXNG(node, "grammar")) {
6539 * Link the new grammar in the tree
6541 ret->parent = ctxt->grammar;
6542 if (ctxt->grammar != NULL) {
6543 tmp = ctxt->grammar->children;
6545 ctxt->grammar->children = ret;
6552 old = ctxt->grammar;
6553 ctxt->grammar = ret;
6556 ctxt->grammar = old;
7682 * @grammar: a grammar structure
7683 * @top: is this a top grammar
7688 xmlRelaxNGDumpGrammar(FILE * output, xmlRelaxNGGrammarPtr grammar, int top)
7690 if (grammar == NULL)
7693 fprintf(output, "<grammar");
7696 switch (grammar->combine) {
7709 if (grammar->start == NULL) {
7710 fprintf(output, " <!-- grammar had no start -->");
7713 xmlRelaxNGDumpDefine(output, grammar->start);
7717 fprintf(output, "</grammar>\n");
7745 fprintf(output, "RelaxNG has no top grammar\n");
8165 xmlRelaxNGGrammarPtr grammar;
8174 grammar = schema->topgrammar;
8175 if ((grammar == NULL) || (grammar->start == NULL)) {
8179 define = grammar->start;
10552 xmlRelaxNGGrammarPtr grammar;
10561 grammar = schema->topgrammar;
10562 if (grammar == NULL) {
10568 ret = xmlRelaxNGValidateDefinition(ctxt, grammar->start);