Home | History | Annotate | Download | only in libxml2

Lines Matching refs: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
1910 * @dtd: pointer to the DTD
1920 * Note that @tree becomes the ownership of the DTD
1926 xmlDtdPtr dtd, const xmlChar *elem,
1935 if (dtd == NULL) {
1947 if (dtd->doc != NULL)
1948 dict = dtd->doc->dict;
1983 (!xmlValidateAttributeValueInternal(dtd->doc, type, defaultValue))) {
1984 xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_DEFAULT,
1997 if ((dtd->doc != NULL) && (dtd->doc->extSubset == dtd) &&
1998 (dtd->doc->intSubset != NULL) &&
1999 (dtd->doc->intSubset->attributes != NULL)) {
2000 ret = xmlHashLookup3(dtd->doc->intSubset->attributes, name, ns, elem);
2010 table = (xmlAttributeTablePtr) dtd->attributes;
2013 dtd->attributes = (void *) table;
2041 ret->doc = dtd->doc;
2062 * Search the DTD for previous declarations of the ATTLIST
2067 * The attribute is already defined in this DTD.
2069 xmlErrValidWarning(ctxt, (xmlNodePtr) dtd, XML_DTD_ATTRIBUTE_REDEFINED,
2081 elemDef = xmlGetDtdElementDesc2(dtd, elem, 1);
2087 xmlErrValidNode(ctxt, (xmlNodePtr) dtd, XML_DTD_MULTIPLE_ID,
2126 * Link it to the DTD
2128 ret->parent = dtd;
2129 if (dtd->last == NULL) {
2130 dtd->children = dtd->last = (xmlNodePtr) ret;
2132 dtd->last->next = (xmlNodePtr) ret;
2133 ret->prev = dtd->last;
2134 dtd->last = (xmlNodePtr) ret;
2206 * DTD definition
2299 * This will dump the content of the attribute table as an XML DTD definition
2335 * @dtd: pointer to the DTD
2346 xmlAddNotationDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd,
2352 if (dtd == NULL) {
2365 table = (xmlNotationTablePtr) dtd->notations;
2368 if (dtd->doc != NULL)
2369 dict = dtd->doc->dict;
2371 dtd->notations = table = xmlHashCreateDict(0, dict);
2397 * Check the DTD for previous declarations of the ATTLIST
2476 * This will dump the content the notation declaration as an XML DTD definition
2515 * This will dump the content of the notation table as an XML DTD definition
2634 * 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
3007 * Determine whether an attribute is of type Ref. In case we have DTD(s)
3137 * @dtd: a pointer to the DtD to search
3140 * Search the DTD for the description of this element
3146 xmlGetDtdElementDesc(xmlDtdPtr dtd, const xmlChar *name) {
3151 if ((dtd == NULL) || (name == NULL)) return(NULL);
3152 if (dtd->elements == NULL)
3154 table = (xmlElementTablePtr) dtd->elements;
3166 * @dtd: a pointer to the DtD to search
3170 * Search the DTD for the description of this element
3176 xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) {
3181 if (dtd == NULL) return(NULL);
3182 if (dtd->elements == NULL) {
3185 if (dtd->doc != NULL)
3186 dict = dtd->doc->dict;
3193 table = (xmlElementTablePtr) dtd->elements;
3196 dtd->elements = (void *) table;
3203 table = (xmlElementTablePtr) dtd->elements;
3234 * @dtd: a pointer to the DtD to search
3238 * Search the DTD for the description of this element
3244 xmlGetDtdQElementDesc(xmlDtdPtr dtd, const xmlChar *name,
3248 if (dtd == NULL) return(NULL);
3249 if (dtd->elements == NULL) return(NULL);
3250 table = (xmlElementTablePtr) dtd->elements;
3257 * @dtd: a pointer to the DtD to search
3261 * Search the DTD for the description of this attribute on
3268 xmlGetDtdAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name) {
3273 if (dtd == NULL) return(NULL);
3274 if (dtd->attributes == NULL) return(NULL);
3276 table = (xmlAttributeTablePtr) dtd->attributes;
3293 * @dtd: a pointer to the DtD to search
3298 * Search the DTD for the description of this qualified attribute on
3305 xmlGetDtdQAttrDesc(xmlDtdPtr dtd, const xmlChar *elem, const xmlChar *name,
3309 if (dtd == NULL) return(NULL);
3310 if (dtd->attributes == NULL) return(NULL);
3311 table = (xmlAttributeTablePtr) dtd->attributes;
3318 * @dtd: a pointer to the DtD to search
3321 * Search the DTD for the description of this notation
3327 xmlGetDtdNotationDesc(xmlDtdPtr dtd, const xmlChar *name) {
3330 if (dtd == NULL) return(NULL);
3331 if (dtd->notations == NULL) return(NULL);
3332 table = (xmlNotationTablePtr) dtd->notations;
4150 /* the trick is that we parse DtD as their own internal subset */
5455 "Element %s content does not follow the DTD, expecting %s, got %s\n",
5459 "Element content does not follow the DTD, expecting %s, got %s\n",
5465 "Element %s content does not follow the DTD\n",
5469 "Element content does not follow the DTD\n",
5778 "Element %s content does not follow the DTD, Misplaced %s\n",
5846 "Element %s content does not follow the DTD, Text not allowed\n",
5903 "Element %s content does not follow the DTD, Expecting more child\n",
6210 * for their application even if the DTD doesn't
6257 "Element %s namespace name for default namespace does not match the DTD\n",
6273 "Element %s namespace name for %s does not match the DTD\n",
6318 * When doing post validation against a separate DTD, those may
6346 "root and DTD name do not match '%s' and '%s'\n",
6598 * @dtd: a dtd instance
6600 * Try to validate the document against the dtd instance
6602 * Basically it does check all the definitions in the DtD.
6611 xmlValidateDtd(xmlValidCtxtPtr ctxt, xmlDocPtr doc, xmlDtdPtr dtd) {
6616 if (dtd == NULL) return(0);
6620 doc->extSubset = dtd;
6752 xmlDtdPtr dtd;
6761 dtd = doc->intSubset;
6762 if ((dtd != NULL) && (dtd->attributes != NULL)) {
6763 table = (xmlAttributeTablePtr) dtd->attributes;
6766 if ((dtd != NULL) && (dtd->entities != NULL)) {
6767 entities = (xmlEntitiesTablePtr) dtd->entities;
6771 dtd = doc->extSubset;
6772 if ((dtd != NULL) && (dtd->attributes != NULL)) {
6773 table = (xmlAttributeTablePtr) dtd->attributes;
6776 if ((dtd != NULL) && (dtd->entities != NULL)) {
6777 entities = (xmlEntitiesTablePtr) dtd->entities;
6807 "no DTD found!\n", NULL);
6928 * forced by the Dtd. The insertion point is defined using @prev and