Home | History | Annotate | Download | only in libxml2

Lines Matching defs:dtd

2  * valid.c : part of the code use to do the DTD handling and the validity
29 static xmlElementPtr xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name,
535 xmlGenericError(xmlGenericErrorContext, "?dtd? ");
1156 * This will dump the content of the element table as an XML DTD definition
1341 * Registration of DTD declarations *
1371 * @dtd: pointer to the DTD
1382 xmlDtdPtr dtd, const xmlChar *name,
1390 if (dtd == NULL) {
1447 table = (xmlElementTablePtr) dtd->elements;
1451 if (dtd->doc != NULL)
1452 dict = dtd->doc->dict;
1454 dtd->elements = (void *) table;
1470 if ((dtd->doc != NULL) && (dtd->doc->intSubset != NULL)) {
1471 ret = xmlHashLookup2(dtd->doc->intSubset->elements, name, ns);
1475 xmlHashRemoveEntry2(dtd->doc->intSubset->elements, name, ns, NULL);
1489 * The element is already defined in this DTD.
1491 xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ELEM_REDEFINED,
1540 * The element is already defined in this DTD.
1542 xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ELEM_REDEFINED,
1574 ret->content = xmlCopyDocElementContent(dtd->doc, content);
1578 * Link it to the DTD
1580 ret->parent = dtd;
1581 ret->doc = dtd->doc;
1582 if (dtd->last == NULL) {
1583 dtd->children = dtd->last = (xmlNodePtr) ret;
1585 dtd->last->next = (xmlNodePtr) ret;
1586 ret->prev = dtd->last;
1587 dtd->last = (xmlNodePtr) ret;
1662 * DTD definition
1734 * This will dump the content of the element table as an XML DTD definition
1911 * @dtd: pointer to the DTD
1921 * Note that @tree becomes the ownership of the DTD
1927 xmlDtdPtr dtd, const xmlChar *elem,
1936 if (dtd == NULL) {
1948 if (dtd->doc != NULL)
1949 dict = dtd->doc->dict;
1984 (!xmlValidateAttributeValueInternal(dtd->doc, type, defaultValue))) {
1985 xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_DEFAULT,
1998 if ((dtd->doc != NULL) && (dtd->doc->extSubset == dtd) &&
1999 (dtd->doc->intSubset != NULL) &&
2000 (dtd->doc->intSubset->attributes != NULL)) {
2001 ret = xmlHashLookup3(dtd->doc->intSubset->attributes, name, ns, elem);
2011 table = (xmlAttributeTablePtr) dtd->attributes;
2014 dtd->attributes = (void *) table;
2042 ret->doc = dtd->doc;
2063 * Search the DTD for previous declarations of the ATTLIST
2068 * The attribute is already defined in this DTD.
2070 xmlErrValidWarning(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_REDEFINED,
2082 elemDef = xmlGetDtdElementDesc2(dtd, elem, 1);
2088 xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_MULTIPLE_ID,
2127 * Link it to the DTD
2129 ret->parent = dtd;
2130 if (dtd->last == NULL) {
2131 dtd->children = dtd->last = (xmlNodePtr) ret;
2133 dtd->last->next = (xmlNodePtr) ret;
2134 ret->prev = dtd->last;
2135 dtd->last = (xmlNodePtr) ret;
2207 * DTD definition
2300 * This will dump the content of the attribute table as an XML DTD definition
2336 * @dtd: pointer to the DTD
2347 xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd,
2353 if (dtd == NULL) {
2366 table = (xmlNotationTablePtr) dtd->notations;
2369 if (dtd->doc != NULL)
2370 dict = dtd->doc->dict;
2372 dtd->notations = table = xmlHashCreateDict(0, dict);
2398 * Check the DTD for previous declarations of the ATTLIST
2477 * This will dump the content the notation declaration as an XML DTD definition
2516 * This will dump the content of the notation table as an XML DTD definition
2635 * The id is already defined in this DTD.
2667 * Determine whether an attribute is of type ID. In case we have DTD(s)
2668 * then this is done if DTD loading has been requested. In the case
3008 * Determine whether an attribute is of type Ref. In case we have DTD(s)
3138 * @dtd: a pointer to the DtD to search
3141 * Search the DTD for the description of this element
3147 xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) {
3152 if ((dtd == NULL) || (name == NULL)) return(NULL);
3153 if (dtd->elements == NULL)
3155 table = (xmlElementTablePtr) dtd->elements;
3167 * @dtd: a pointer to the DtD to search
3171 * Search the DTD for the description of this element
3177 xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
3182 if (dtd == NULL) return(NULL);
3183 if (dtd->elements == NULL) {
3186 if (dtd->doc != NULL)
3187 dict = dtd->doc->dict;
3194 table = (xmlElementTablePtr) dtd->elements;
3197 dtd->elements = (void *) table;
3204 table = (xmlElementTablePtr) dtd->elements;
3235 * @dtd: a pointer to the DtD to search
3239 * Search the DTD for the description of this element
3245 xmlGetDtdQElementDesc(xmlDtdPtr dtd, const xmlChar *name,
3249 if (dtd == NULL) return(NULL);
3250 if (dtd->elements == NULL) return(NULL);
3251 table = (xmlElementTablePtr) dtd->elements;
3258 * @dtd: a pointer to the DtD to search
3262 * Search the DTD for the description of this attribute on
3269 xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name) {
3274 if (dtd == NULL) return(NULL);
3275 if (dtd->attributes == NULL) return(NULL);
3277 table = (xmlAttributeTablePtr) dtd->attributes;
3294 * @dtd: a pointer to the DtD to search
3299 * Search the DTD for the description of this qualified attribute on
3306 xmlGetDtdQAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name,
3310 if (dtd == NULL) return(NULL);
3311 if (dtd->attributes == NULL) return(NULL);
3312 table = (xmlAttributeTablePtr) dtd->attributes;
3319 * @dtd: a pointer to the DtD to search
3322 * Search the DTD for the description of this notation
3328 xmlGetDtdNotationDesc(xmlDtdPtr dtd, const xmlChar *name) {
3331 if (dtd == NULL) return(NULL);
3332 if (dtd->notations == NULL) return(NULL);
3333 table = (xmlNotationTablePtr) dtd->notations;
4151 /* the trick is that we parse DtD as their own internal subset */
5456 "Element %s content does not follow the DTD, expecting %s, got %s\n",
5460 "Element content does not follow the DTD, expecting %s, got %s\n",
5466 "Element %s content does not follow the DTD\n",
5470 "Element content does not follow the DTD\n",
5780 "Element %s content does not follow the DTD, Misplaced %s\n",
5848 "Element %s content does not follow the DTD, Text not allowed\n",
5905 "Element %s content does not follow the DTD, Expecting more child\n",
6212 * for their application even if the DTD doesn't
6259 "Element %s namespace name for default namespace does not match the DTD\n",
6275 "Element %s namespace name for %s does not match the DTD\n",
6320 * When doing post validation against a separate DTD, those may
6348 "root and DTD name do not match '%s' and '%s'\n",
6601 * @dtd: a dtd instance
6603 * Try to validate the document against the dtd instance
6605 * Basically it does check all the definitions in the DtD.
6614 xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) {
6619 if (dtd == NULL) return(0);
6623 doc->extSubset = dtd;
6755 xmlDtdPtr dtd;
6764 dtd = doc->intSubset;
6765 if ((dtd != NULL) && (dtd->attributes != NULL)) {
6766 table = (xmlAttributeTablePtr) dtd->attributes;
6769 if ((dtd != NULL) && (dtd->entities != NULL)) {
6770 entities = (xmlEntitiesTablePtr) dtd->entities;
6774 dtd = doc->extSubset;
6775 if ((dtd != NULL) && (dtd->attributes != NULL)) {
6776 table = (xmlAttributeTablePtr) dtd->attributes;
6779 if ((dtd != NULL) && (dtd->entities != NULL)) {
6780 entities = (xmlEntitiesTablePtr) dtd->entities;
6810 "no DTD found!\n", NULL);
6931 * forced by the Dtd. The insertion point is defined using @prev and