Edinburgh Speech Tools  2.1-release
dtd.c
Go to the documentation of this file.
1 /*************************************************************************/
2 /* */
3 /* Copyright (c) 1997-98 Richard Tobin, Language Technology Group, HCRC, */
4 /* University of Edinburgh. */
5 /* */
6 /* THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, */
7 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
8 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
9 /* IN NO EVENT SHALL THE AUTHOR OR THE UNIVERSITY OF EDINBURGH BE LIABLE */
10 /* FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF */
11 /* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION */
12 /* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
13 /* */
14 /*************************************************************************/
15 #include <string.h>
16 
17 #ifdef FOR_LT
18 
19 #include "lt-memory.h"
20 #include "nsllib.h"
21 
22 #define Malloc salloc
23 #define Realloc srealloc
24 #define Free sfree
25 
26 #else
27 
28 #include "system.h"
29 
30 #endif
31 
32 #include "charset.h"
33 #include "string16.h"
34 #include "dtd.h"
35 #include "url.h"
36 
38  "#required",
39  "bogus1",
40  "#implied",
41  "bogus2",
42  "none",
43  "#fixed",
44 };
45 
47  "mixed",
48  "any",
49  "bogus1",
50  "bogus2",
51  "empty",
52  "element"
53 };
54 
56  "cdata",
57  "bogus1",
58  "bogus2",
59  "nmtoken",
60  "bogus3",
61  "entity",
62  "idref",
63  "bogus4",
64  "bogus5",
65  "nmtokens",
66  "bogus6",
67  "entities",
68  "idrefs",
69  "id",
70  "notation",
71  "enumeration"
72 };
73 
75  "unspecified", "no", "yes"
76 };
77 
78 static Char *Strndup(const Char *old, int len)
79 {
80  Char *new = Malloc((len+1) * sizeof(Char));
81 
82  if(!new)
83  return 0;
84 
85  memcpy(new, old, len * sizeof(Char));
86  new[len] = 0;
87 
88  return new;
89 }
90 
91 /* DTDs */
92 
93 Dtd NewDtd(void)
94 {
95  Dtd d;
96 
97  if(!(d = Malloc(sizeof(*d))))
98  return 0;
99 
100  d->name = 0;
101  d->internal_part = 0;
102  d->external_part = 0;
103  d->entities = 0;
104  d->parameter_entities = 0;
105  d->predefined_entities = 0;
106 #ifdef FOR_LT
107  d->doctype = 0;
108 #else
109  d->elements = 0;
110 #endif
111  d->notations = 0;
112 
113  return d;
114 }
115 
116 /* Free a DTD and everything in it */
117 
118 void FreeDtd(Dtd dtd)
119 {
120  Entity ent, ent1;
121 #ifndef FOR_LT
122  ElementDefinition elem, elem1;
123 #endif
124  NotationDefinition not, not1;
125 
126  if(!dtd)
127  return;
128 
129  /* Free the name */
130 
131  Free((Char *)dtd->name); /* cast is to get rid of const */
132 
133  /* Free the entities */
134 
135  FreeEntity(dtd->internal_part);
136  FreeEntity(dtd->external_part);
137 
138  for(ent = dtd->entities; ent; ent = ent1)
139  {
140  ent1 = ent->next; /* get it before we free ent! */
141  FreeEntity(ent);
142  }
143 
144  for(ent = dtd->parameter_entities; ent; ent = ent1)
145  {
146  ent1 = ent->next;
147  FreeEntity(ent);
148  }
149 
150  /* The predefined entities are shared, so we don't free them */
151 
152 #ifndef FOR_LT
153  /* Free the elements (kept elsewhere in NSL) */
154 
155  for(elem = dtd->elements; elem; elem = elem1)
156  {
157  elem1 = elem->next;
158  FreeElementDefinition(elem); /* Frees the attributes too */
159  }
160 #endif
161 
162  /* Free the notations */
163 
164  for(not = dtd->notations; not; not = not1)
165  {
166  not1 = not->next;
168  }
169 
170  /* Free the dtd itself */
171 
172  Free(dtd);
173 }
174 
175 /* Entities */
176 
177 /*
178  * Make a new entity. The name is copied, none of the other
179  * arguments are, but they are freed when the entity is freed!
180  */
181 
182 Entity NewExternalEntityN(const Char *name, int namelen, const char8 *publicid,
183  const char8 *systemid, NotationDefinition notation,
184  Entity parent)
185 {
186  Entity e;
187 
188  if(!(e = Malloc(sizeof(*e))))
189  return 0;
190  if(name && !(name = Strndup(name, namelen))) {
191  Free(e);
192  return 0;
193  }
194 
195  e->type = ET_external;
196  e->name = name;
197  e->base_url = 0;
198  e->encoding = CE_unknown;
199  e->next = 0;
200  e->parent = parent;
201 
202  e->publicid = publicid;
203  e->systemid = systemid;
204  e->notation = notation;
205 
206  e->version_decl = 0;
207  e->encoding_decl = CE_unknown;
208  e->standalone_decl = SDD_unspecified;
209  e->ddb_filename = 0;
210 
211  e->url = 0;
212 
213  return (Entity)e;
214 }
215 
216 Entity NewInternalEntityN(const Char *name, int namelen,
217  const Char *text, Entity parent,
218  int line_offset, int line1_char_offset,
219  int matches_parent_text)
220 {
221  Entity e;
222 
223  if(!(e = Malloc(sizeof(*e))))
224  return 0;
225 
226  if(name) {
227  if(!(name = Strndup(name, namelen))) {
228  Free(e);
229  return 0;
230  }
231  }
232 
233  e->type = ET_internal;
234  e->name = name;
235  e->base_url = 0;
236  e->encoding = InternalCharacterEncoding;
237  e->next = 0;
238  e->parent = parent;
239 
240  e->text = text;
241  e->line_offset = line_offset;
242  e->line1_char_offset = line1_char_offset;
243  e->matches_parent_text = matches_parent_text;
244 
245  e->url = 0;
246 
247  return (Entity)e;
248 }
249 
250 void FreeEntity(Entity e)
251 {
252  if(!e)
253  return;
254 
255  Free((void *)e->name); /* The casts are to get rid of the const */
256  Free((void *)e->base_url);
257  Free((void *)e->url);
258 
259  switch(e->type)
260  {
261  case ET_internal:
262  Free((void *)e->text);
263  break;
264  case ET_external:
265  Free((void *)e->systemid);
266  Free((void *)e->publicid);
267  Free((void *)e->version_decl);
268  Free((void *)e->ddb_filename);
269  break;
270  }
271 
272  Free(e);
273 }
274 
275 const char8 *EntityURL(Entity e)
276 {
277  /* Have we already determined the URL? */
278 
279  if(e->url)
280  return e->url;
281 
282  if(e->type == ET_internal)
283  {
284  if(e->parent)
285  {
286  const char8 *url = EntityURL(e->parent);
287  if(url)
288  e->url = strdup8(url);
289  }
290  }
291  else
292  e->url = url_merge(e->systemid,
293  e->parent ? EntityBaseURL(e->parent) : 0,
294  0, 0, 0, 0);
295 
296  return e->url;
297 }
298 
299 /* Returns the URL of the entity if it has one, otherwise the system ID.
300  It will certainly have a URL if it was successfully opened by EntityOpen.
301  Intended for error messages, so never returns NULL. */
302 
303 const char8 *EntityDescription(Entity e)
304 {
305  if(e->url)
306  return e->url;
307 
308  if(e->type == ET_external)
309  return e->systemid;
310 
311  if(e->parent)
312  return EntityDescription(e->parent);
313 
314  return "<unknown>";
315 }
316 
317 void EntitySetBaseURL(Entity e, const char8 *url)
318 {
319  e->base_url = url;
320 }
321 
322 const char8 *EntityBaseURL(Entity e)
323 {
324  if(e->base_url)
325  return e->base_url;
326 
327  if(e->type == ET_internal)
328  {
329  if(e->parent)
330  return EntityBaseURL(e->parent);
331  else
332  return 0;
333  }
334 
335  return EntityURL(e);
336 }
337 
338 Entity DefineEntity(Dtd dtd, Entity e, int pe)
339 {
340  if(pe)
341  {
342  e->next = dtd->parameter_entities;
343  dtd->parameter_entities = e;
344  }
345  else
346  {
347  e->next = dtd->entities;
348  dtd->entities = e;
349  }
350 
351  return e;
352 }
353 
354 Entity FindEntityN(Dtd dtd, const Char *name, int namelen, int pe)
355 {
356  Entity e;
357 
358  if(!pe)
359  for(e = dtd->predefined_entities; e; e = e->next)
360  if(Strncmp(name, e->name, namelen) == 0 && e->name[namelen] == 0)
361  return e;
362 
363 
364  for(e = pe ? dtd->parameter_entities : dtd->entities; e; e=e->next)
365  if(Strncmp(name, e->name, namelen) == 0 && e->name[namelen] == 0)
366  return e;
367 
368  return 0;
369 }
370 
371 /* Elements */
372 
373 /*
374  * Define a new element. The name is copied, the content model is not,
375  * but it is freed when the element definition is freed!
376  */
377 
378 ElementDefinition DefineElementN(Dtd dtd, const Char *name, int namelen,
379  ContentType type, Char *content)
380 {
381 #ifdef FOR_LT
382  static struct element_definition e;
383  RHTEntry *entry;
384  struct element_content *c;
385 
386  if (!(entry = DeclareElement(dtd->doctype, name, namelen, 0,
387  (ctVals)type))) {
388  return NULL;
389  };
390 
391  e.doctype = dtd->doctype;
392  e.name = (Char *)dtd->doctype->elements+entry->keyptr;
393  e.elsum = (NSL_ElementSummary_I *)(dtd->doctype->permanentBase+entry->eval);
394 
395  if(type == CT_element || type == CT_mixed)
396  {
397  if(!(c = Malloc(sizeof(*c))))
398  return 0;
399  c->elsum = e.elsum;
400  c->content = content;
401  c->next = e.doctype->element_content;
402  e.doctype->element_content = c;
403  }
404 
405  return &e;
406 #else
407  ElementDefinition e;
408 
409  if(!(e = Malloc(sizeof(*e))) )
410  return 0;
411 
412  if(!(name = Strndup(name, namelen))) {
413  Free(e);
414  return 0;
415  }
416 
417  e->tentative = 0;
418  e->name = name;
419  e->namelen = namelen;
420  e->type = type;
421  e->content = content;
422  e->attributes = 0;
423  e->next = dtd->elements;
424  dtd->elements = e;
425 
426  return e;
427 #endif
428 }
429 
430 ElementDefinition TentativelyDefineElementN(Dtd dtd,
431  const Char *name, int namelen)
432 {
433 #ifdef FOR_LT
434  static struct element_definition e;
435  RHTEntry *entry;
436 
437  if (!(entry = DeclareElement(dtd->doctype, name, namelen, 0, (ctVals)CT_any))) {
438  return NULL;
439  };
440  e.doctype = dtd->doctype;
441  e.name = (Char *)dtd->doctype->elements+entry->keyptr;
442  e.elsum = (NSL_ElementSummary_I *)(dtd->doctype->permanentBase+entry->eval);
443  /* XXX use the omitStart field to note that it's tentative. */
444  e.elsum->omitStart |= 2;
445  return &e;
446 #else
447  ElementDefinition e;
448 
449  if(!(e = Malloc(sizeof(*e))) )
450  return 0;
451 
452  if(!(name = Strndup(name, namelen))) {
453  Free(e);
454  return 0;
455  }
456 
457  e->tentative = 1;
458  e->name = name;
459  e->namelen = namelen;
460  e->type = CT_any;
461  e->content = 0;
462  e->attributes = 0;
463  e->next = dtd->elements;
464  dtd->elements = e;
465 
466  return e;
467 #endif
468 }
469 
470 ElementDefinition RedefineElement(ElementDefinition e, ContentType type,
471  Char *content)
472 {
473 #ifdef FOR_LT
474  struct element_content *c;
475 
476  e->elsum->contentType = type;
477  e->elsum->omitStart &= ~2;
478  if(type == CT_element)
479  {
480  if(!(c = Malloc(sizeof(*c))))
481  return 0;
482  c->elsum = e->elsum;
483  c->content = content;
484  c->next = e->doctype->element_content;
485  e->doctype->element_content = c;
486  }
487 #else
488  e->tentative = 0;
489  e->type = type;
490  e->content = content;
491 #endif
492  return e;
493 }
494 
495 ElementDefinition FindElementN(Dtd dtd, const Char *name, int namelen)
496 {
497 #ifdef FOR_LT
498  /* Derived from FindElementAndName */
499 
500  static struct element_definition e;
501  RHTEntry *entry;
502  NSL_ElementSummary_I *elsum;
503 
504  if(!dtd->doctype)
505  return 0;
506 
507  entry = rsearch(name, namelen, dtd->doctype->elements);
508  if(!entry)
509  return 0;
510 
511  elsum = (NSL_ElementSummary_I *)(dtd->doctype->permanentBase+entry->eval);
512 
513  e.doctype = dtd->doctype;
514  e.name = (Char *)dtd->doctype->elements+entry->keyptr;
515 #if 0
516  /* We don't use this so don't waste time on it XXX */
517  e.namelen = Strlen(e.name);
518 #endif
519  e.elsum = elsum;
520  e.tentative = ((e.elsum->omitStart & 2) != 0);
521 
522  return &e;
523 #else
524  ElementDefinition e, *p;
525 
526  for(p = &dtd->elements, e = *p; e; p = &e->next, e = *p)
527  if(namelen == e->namelen && *name == *e->name &&
528  memcmp(name, e->name, namelen*sizeof(Char)) == 0)
529  {
530  *p = e->next;
531  e->next = dtd->elements;
532  dtd->elements = e;
533  return e;
534  }
535 
536  return 0;
537 #endif
538 }
539 
540 /* Free an element definition and its attribute definitions */
541 
542 void FreeElementDefinition(ElementDefinition e)
543 {
544 #ifndef FOR_LT
545  AttributeDefinition a, a1;
546 #endif
547 
548  if(!e)
549  return;
550 
551  /* Free the element name */
552 
553  Free((void *)e->name);
554 
555 #ifndef FOR_LT
556  /* Free the content model (kept elsewhere in NSL) */
557 
558  Free(e->content);
559 
560  /* Free the attributes (kept elsewhere in NSL) */
561 
562  for(a = e->attributes; a; a = a1)
563  {
564  a1 = a->next;
566  }
567 
568  /* Free the ElementDefinition itself */
569 #endif
570 
571  Free(e);
572 }
573 
574 /* Attributes */
575 
576 /*
577  * Define a new attribute. The name is copied, the allowed values and
578  * default are not, but they are freed when the attribute definition is freed!
579  */
580 
581 AttributeDefinition
582  DefineAttributeN(ElementDefinition element, const Char *name, int namelen,
583  AttributeType type, Char **allowed_values,
584  DefaultType default_type, const Char *default_value)
585 {
586 #ifdef FOR_LT
587  int nav = 0;
588  Char *av = allowed_values ? allowed_values[0] : 0;
589  Char **avp;
590  NSL_Doctype_I *doctype = element->doctype;
591 
592  if(!doctype)
593  return 0;
594 
595  if(allowed_values)
596  {
597  for(avp = allowed_values; *avp; avp++)
598  nav++;
599  Free(allowed_values);
600  }
601 
602  if (!(name = DeclareAttr(doctype, name, namelen,
603  (NSL_Attr_Declared_Value)type,
604  av, nav,
605  (NSL_ADefType)default_type, default_value,
606  &element->elsum, element->name))) {
607  return 0;
608  };
609 
610  return (AttributeDefinition)FindAttrSpec(element->elsum,
611  doctype,
612  name);
613 #else
614  AttributeDefinition a;
615 
616  if(!(a = Malloc(sizeof(*a))) )
617  return 0;
618 
619  if(!(name = Strndup(name, namelen))) {
620  Free(a);
621  return 0;
622  }
623 
624  a->name = name;
625  a->namelen = namelen;
626  a->type = type;
627  a->allowed_values = allowed_values;
628  a->default_type = default_type;
629  a->default_value = default_value;
630  a->next = element->attributes;
631  element->attributes = a;
632 
633  return a;
634 #endif
635 }
636 
637 AttributeDefinition FindAttributeN(ElementDefinition element,
638  const Char *name, int namelen)
639 {
640 #ifdef FOR_LT
641  if(!element->doctype)
642  return 0;
643 
644  if(!(name = AttrUniqueName(element->doctype, name, namelen)))
645  return 0;
646  return (AttributeDefinition)FindAttrSpec(element->elsum,
647  element->doctype,
648  name);
649 #else
650  AttributeDefinition a;
651 
652  for(a = element->attributes; a; a = a->next)
653  if(namelen == a->namelen &&
654  memcmp(name, a->name, namelen * sizeof(Char)) == 0)
655  return a;
656 
657  return 0;
658 #endif
659 }
660 
661 AttributeDefinition NextAttributeDefinition(ElementDefinition element,
662  AttributeDefinition previous)
663 {
664 #ifdef FOR_LT
665  return 0; /* not implemented */
666 #else
667  if(previous)
668  return previous->next;
669  else
670  return element->attributes;
671 #endif
672 }
673 
674 /* Free an attribute definition */
675 
676 void FreeAttributeDefinition(AttributeDefinition a)
677 {
678 #ifndef FOR_LT
679  /* We don't keep anything in the NSL case */
680 
681  if(!a)
682  return;
683 
684  /* Free the name */
685 
686  Free((void *)a->name);
687 
688  /* Free the allowed values - we rely on them being allocated as in
689  xmlparser.c: the Char * pointers point into one single block. */
690 
691  if(a->allowed_values)
692  Free(a->allowed_values[0]);
693  Free(a->allowed_values);
694 
695  /* Free the default value */
696 
697  Free((void *)a->default_value);
698 
699  /* Free the attribute definition itself */
700 
701  Free(a);
702 #endif
703 }
704 
705 /* Notations */
706 
707 /*
708  * Define a new notation. The name is copied, the system and public ids are
709  * not, but they are freed when the notation definition is freed!
710  */
711 
712 NotationDefinition DefineNotationN(Dtd dtd, const Char *name, int namelen,
713  const char8 *publicid, const char8 *systemid)
714 {
715  NotationDefinition n;
716 
717  if(!(n = Malloc(sizeof(*n))) )
718  return 0;
719 
720  if(!(name = Strndup(name, namelen))) {
721  Free(n);
722  return 0;
723  }
724 
725  n->name = name;
726  n->tentative = 1;
727  n->systemid = systemid;
728  n->publicid = publicid;
729  n->next = dtd->notations;
730  dtd->notations = n;
731 
732  return n;
733 }
734 
735 NotationDefinition TentativelyDefineNotationN(Dtd dtd,
736  const Char *name, int namelen)
737 {
738  NotationDefinition n;
739 
740  if(!(n = Malloc(sizeof(*n))) )
741  return 0;
742 
743  if(!(name = Strndup(name, namelen))) {
744  Free(n);
745  return 0;
746  }
747 
748  n->name = name;
749  n->tentative = 1;
750  n->systemid = 0;
751  n->publicid = 0;
752  n->next = dtd->notations;
753  dtd->notations = n;
754 
755  return n;
756 }
757 
758 NotationDefinition RedefineNotation(NotationDefinition n,
759  const char8 *publicid, const char8 *systemid)
760 {
761  n->tentative = 0;
762  n->systemid = systemid;
763  n->publicid = publicid;
764 
765  return n;
766 }
767 
768 NotationDefinition FindNotationN(Dtd dtd, const Char *name, int namelen)
769 {
770  NotationDefinition n;
771 
772  for(n = dtd->notations; n; n = n->next)
773  if(Strncmp(name, n->name, namelen) == 0 && n->name[namelen] == 0)
774  return n;
775 
776  return 0;
777 }
778 
779 void FreeNotationDefinition(NotationDefinition n)
780 {
781  if(!n)
782  return;
783 
784  /* Free the name */
785 
786  Free((void *)n->name);
787 
788  /* Free the ids */
789 
790  Free((void *)n->systemid);
791  Free((void *)n->publicid);
792 
793  /* Free the notation definition itself */
794 
795  Free(n);
796 }
Entity NewInternalEntityN(const Char *name, int namelen, const Char *text, Entity parent, int line_offset, int line1_char_offset, int matches_parent_text)
Definition: dtd.c:216
const char8 * StandaloneDeclarationName[SDD_enum_count]
Definition: dtd.c:74
Entity FindEntityN(Dtd dtd, const Char *name, int namelen, int pe)
Definition: dtd.c:354
const Char * name
Definition: dtd.h:112
void FreeAttributeDefinition(AttributeDefinition a)
Definition: dtd.c:676
ContentType type
Definition: dtd.h:119
void FreeNotationDefinition(NotationDefinition n)
Definition: dtd.c:779
void FreeElementDefinition(ElementDefinition e)
Definition: dtd.c:542
NotationDefinition FindNotationN(Dtd dtd, const Char *name, int namelen)
Definition: dtd.c:768
default_type
Definition: dtd.h:128
ElementDefinition FindElementN(Dtd dtd, const Char *name, int namelen)
Definition: dtd.c:495
const char8 * EntityBaseURL(Entity e)
Definition: dtd.c:322
void EntitySetBaseURL(Entity e, const char8 *url)
Definition: dtd.c:317
Definition: dtd.h:40
STD_API char8 *EXPRT url_merge(const char8 *url, const char8 *base, char8 **scheme, char8 **host, int *port, char8 **path)
Definition: url.c:188
void FreeDtd(Dtd dtd)
Definition: dtd.c:118
enum attribute_type AttributeType
Definition: dtd.h:143
void Free(void *mem)
Definition: system.c:35
Definition: dtd.h:105
STD_API CharacterEncoding InternalCharacterEncoding
Definition: charset.c:231
ElementDefinition TentativelyDefineElementN(Dtd dtd, const Char *name, int namelen)
Definition: dtd.c:430
AttributeDefinition FindAttributeN(ElementDefinition element, const Char *name, int namelen)
Definition: dtd.c:637
enum content_type ContentType
Definition: dtd.h:107
Char * content
Definition: dtd.h:120
AttributeDefinition DefineAttributeN(ElementDefinition element, const Char *name, int namelen, AttributeType type, Char **allowed_values, DefaultType default_type, const Char *default_value)
Definition: dtd.c:582
struct element_definition * next
Definition: dtd.h:122
enum default_type DefaultType
Definition: dtd.h:133
const char8 * AttributeTypeName[AT_enum_count]
Definition: dtd.c:55
const char8 * DefaultTypeName[DT_enum_count]
Definition: dtd.c:37
NULL
Definition: EST_WFST.cc:55
Entity NewExternalEntityN(const Char *name, int namelen, const char8 *publicid, const char8 *systemid, NotationDefinition notation, Entity parent)
Definition: dtd.c:182
#define Strlen
Definition: string16.h:98
NotationDefinition RedefineNotation(NotationDefinition n, const char8 *publicid, const char8 *systemid)
Definition: dtd.c:758
const char8 * EntityURL(Entity e)
Definition: dtd.c:275
Definition: dtd.h:105
NotationDefinition DefineNotationN(Dtd dtd, const Char *name, int namelen, const char8 *publicid, const char8 *systemid)
Definition: dtd.c:712
Dtd NewDtd(void)
Definition: dtd.c:93
Entity DefineEntity(Dtd dtd, Entity e, int pe)
Definition: dtd.c:338
#define Strncmp
Definition: string16.h:100
NotationDefinition TentativelyDefineNotationN(Dtd dtd, const Char *name, int namelen)
Definition: dtd.c:735
const char8 * EntityDescription(Entity e)
Definition: dtd.c:303
char char8
Definition: charset.h:31
void FreeEntity(Entity e)
Definition: dtd.c:250
STD_API char8 * strdup8(const char8 *s)
Definition: string16.c:77
void * Malloc(int bytes)
Definition: system.c:19
EST_Item * parent(const EST_Item *n)
return parent of n
ElementDefinition DefineElementN(Dtd dtd, const Char *name, int namelen, ContentType type, Char *content)
Definition: dtd.c:378
AttributeDefinition NextAttributeDefinition(ElementDefinition element, AttributeDefinition previous)
Definition: dtd.c:661
const char8 * ContentTypeName[CT_enum_count]
Definition: dtd.c:46
ElementDefinition RedefineElement(ElementDefinition e, ContentType type, Char *content)
Definition: dtd.c:470