• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/libxml2-26/libxml2/

Lines Matching refs:attr

509 	    xmlGenericError(xmlGenericErrorContext, "?attr? ");
1872 xmlFreeAttribute(xmlAttributePtr attr) {
1875 if (attr == NULL) return;
1876 if (attr->doc != NULL)
1877 dict = attr->doc->dict;
1880 xmlUnlinkNode((xmlNodePtr) attr);
1881 if (attr->tree != NULL)
1882 xmlFreeEnumeration(attr->tree);
1884 if ((attr->elem != NULL) && (!xmlDictOwns(dict, attr->elem)))
1885 xmlFree((xmlChar *) attr->elem);
1886 if ((attr->name != NULL) && (!xmlDictOwns(dict, attr->name)))
1887 xmlFree((xmlChar *) attr->name);
1888 if ((attr->prefix != NULL) && (!xmlDictOwns(dict, attr->prefix)))
1889 xmlFree((xmlChar *) attr->prefix);
1890 if ((attr->defaultValue != NULL) &&
1891 (!xmlDictOwns(dict, attr->defaultValue)))
1892 xmlFree((xmlChar *) attr->defaultValue);
1894 if (attr->elem != NULL)
1895 xmlFree((xmlChar *) attr->elem);
1896 if (attr->name != NULL)
1897 xmlFree((xmlChar *) attr->name);
1898 if (attr->defaultValue != NULL)
1899 xmlFree((xmlChar *) attr->defaultValue);
1900 if (attr->prefix != NULL)
1901 xmlFree((xmlChar *) attr->prefix);
1903 xmlFree(attr);
2153 * @attr: An attribute
2160 xmlCopyAttribute(xmlAttributePtr attr) {
2170 cur->atype = attr->atype;
2171 cur->def = attr->def;
2172 cur->tree = xmlCopyEnumeration(attr->tree);
2173 if (attr->elem != NULL)
2174 cur->elem = xmlStrdup(attr->elem);
2175 if (attr->name != NULL)
2176 cur->name = xmlStrdup(attr->name);
2177 if (attr->prefix != NULL)
2178 cur->prefix = xmlStrdup(attr->prefix);
2179 if (attr->defaultValue != NULL)
2180 cur->defaultValue = xmlStrdup(attr->defaultValue);
2203 * @attr: An attribute declaration
2209 xmlDumpAttributeDecl(xmlBufferPtr buf, xmlAttributePtr attr) {
2210 if ((buf == NULL) || (attr == NULL))
2213 xmlBufferWriteCHAR(buf, attr->elem);
2215 if (attr->prefix != NULL) {
2216 xmlBufferWriteCHAR(buf, attr->prefix);
2219 xmlBufferWriteCHAR(buf, attr->name);
2220 switch (attr->atype) {
2247 xmlDumpEnumeration(buf, attr->tree);
2251 xmlDumpEnumeration(buf, attr->tree);
2258 switch (attr->def) {
2275 if (attr->defaultValue != NULL) {
2277 xmlBufferWriteQuotedString(buf, attr->defaultValue);
2284 * @attr: An attribute declaration
2290 xmlDumpAttributeDeclScan(xmlAttributePtr attr, xmlBufferPtr buf) {
2291 xmlDumpAttributeDecl(buf, attr);
2570 * @attr: the attribute holding the ID
2578 xmlAttrPtr attr) {
2588 if (attr == NULL) {
2618 * Operating in streaming mode, attr is gonna disapear
2621 ret->name = xmlDictLookup(doc->dict, attr->name, -1);
2623 ret->name = xmlStrdup(attr->name);
2624 ret->attr = NULL;
2626 ret->attr = attr;
2629 ret->lineno = xmlGetLineNo(attr->parent);
2637 xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
2645 if (attr != NULL)
2646 attr->atype = XML_ATTRIBUTE_ID;
2665 * @attr: the attribute
2675 xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
2676 if ((attr == NULL) || (attr->name == NULL)) return(0);
2677 if ((attr->ns != NULL) && (attr->ns->prefix != NULL) &&
2678 (!strcmp((char *) attr->name, "id")) &&
2679 (!strcmp((char *) attr->ns->prefix, "xml")))
2686 if ((xmlStrEqual(BAD_CAST "id", attr->name)) ||
2687 ((xmlStrEqual(BAD_CAST "name", attr->name)) &&
2703 fullattrname = (attr->ns != NULL && attr->ns->prefix != NULL) ?
2704 xmlBuildQName(attr->name, attr->ns->prefix, fattr, 50) :
2705 (xmlChar *)attr->name;
2715 if ((fullattrname != fattr) && (fullattrname != attr->name))
2729 * @attr: the attribute
2736 xmlRemoveID(xmlDocPtr doc, xmlAttrPtr attr) {
2742 if (attr == NULL) return(-1);
2747 if (attr == NULL)
2749 ID = xmlNodeListGetString(doc, attr->children, 1);
2753 if (id == NULL || id->attr != attr) {
2759 attr->atype = 0;
2792 if (id->attr == NULL) {
2799 return(id->attr);
2862 xmlAttrPtr attr0 = ((xmlRefPtr)data)->attr;
2892 * @attr: the attribute holding the Ref
2900 xmlAttrPtr attr) {
2911 if (attr == NULL) {
2940 * Operating in streaming mode, attr is gonna disapear
2942 ret->name = xmlStrdup(attr->name);
2943 ret->attr = NULL;
2946 ret->attr = attr;
2948 ret->lineno = xmlGetLineNo(attr->parent);
3005 * @attr: the attribute
3014 xmlIsRef(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
3015 if (attr == NULL)
3018 doc = attr->doc;
3031 attrDecl = xmlGetDtdAttrDesc(doc->intSubset, elem->name, attr->name);
3034 elem->name, attr->name);
3047 * @attr: the attribute
3054 xmlRemoveRef(xmlDocPtr doc, xmlAttrPtr attr) {
3061 if (attr == NULL) return(-1);
3066 if (attr == NULL)
3068 ID = xmlNodeListGetString(doc, attr->children, 1);
3078 * have the same key as the supplied attr. Our list of references
3088 target.ap = attr;
3090 /* Remove the supplied attr from our list */
4092 xmlValidateAttributeIdCallback(xmlAttributePtr attr, int *count,
4094 if (attr->atype == XML_ATTRIBUTE_ID) (*count)++;
4101 * @attr: an attribute definition
4117 xmlAttributePtr attr) {
4121 if(attr == NULL) return(1);
4125 if (attr->defaultValue != NULL) {
4126 val = xmlValidateAttributeValueInternal(doc, attr->atype,
4127 attr->defaultValue);
4129 xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ATTRIBUTE_DEFAULT,
4131 attr->name, attr->elem, NULL);
4137 if ((attr->atype == XML_ATTRIBUTE_ID)&&
4138 (attr->def != XML_ATTRIBUTE_IMPLIED) &&
4139 (attr->def != XML_ATTRIBUTE_REQUIRED)) {
4140 xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ID_FIXED,
4142 attr->name, attr->elem, NULL);
4147 if (attr->atype == XML_ATTRIBUTE_ID) {
4152 attr->elem);
4165 xmlHashScan3(table, NULL, NULL, attr->elem, (xmlHashScanner)
4171 xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
4173 attr->elem, nbId, attr->name);
4176 elem = xmlGetDtdElementDesc(doc->extSubset, attr->elem);
4181 xmlErrValidNodeNr(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
4183 attr->elem, extId, attr->name);
4185 xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ID_SUBSET,
4187 attr->elem, attr->name, NULL);
4193 if ((attr->defaultValue != NULL) && (attr->tree != NULL)) {
4194 xmlEnumerationPtr tree = attr->tree;
4196 if (xmlStrEqual(tree->name, attr->defaultValue)) break;
4200 xmlErrValidNode(ctxt, (xmlNodePtr) attr, XML_DTD_ATTRIBUTE_VALUE,
4202 attr->defaultValue, attr->name, attr->elem);
4328 * @attr: an attribute instance
4350 xmlNodePtr elem, xmlAttrPtr attr, const xmlChar *value)
4358 if ((attr == NULL) || (attr->name == NULL)) return(0);
4367 if (attr->ns != NULL) {
4369 attr->name, attr->ns->prefix);
4372 attr->name, attr->ns->prefix);
4374 attrDecl = xmlGetDtdAttrDesc(doc->intSubset, fullname, attr->name);
4377 fullname, attr->name);
4383 if (attr->ns != NULL) {
4385 attr->name, attr->ns->prefix);
4388 attr->name, attr->ns->prefix);
4391 elem->name, attr->name);
4394 elem->name, attr->name);
4403 attr->name, elem->name, NULL);
4406 attr->atype = attrDecl->atype;
4412 attr->name, elem->name, NULL);
4421 attr->name, elem->name, attrDecl->defaultValue);
4428 if (xmlAddID(ctxt, doc, value, attr) == NULL)
4434 if (xmlAddRef(ctxt, doc, value, attr) == NULL)
4451 value, attr->name, elem->name);
4463 value, attr->name, elem->name);
4478 value, attr->name, elem->name);
4488 attr->name, elem->name, attrDecl->defaultValue);
4493 ret &= xmlValidateAttributeValue2(ctxt, doc, attr->name,
5945 xmlAttributePtr attr;
6159 attr = elemDecl->attributes;
6160 while (attr != NULL) {
6161 if (attr->def == XML_ATTRIBUTE_REQUIRED) {
6164 if ((attr->prefix == NULL) &&
6165 (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) {
6174 } else if (xmlStrEqual(attr->prefix, BAD_CAST "xmlns")) {
6179 if (xmlStrEqual(attr->name, ns->prefix))
6188 if (xmlStrEqual(attrib->name, attr->name)) {
6189 if (attr->prefix != NULL) {
6203 attr->prefix)) {
6222 if (attr->prefix == NULL) {
6225 elem->name, attr->name, NULL);
6230 elem->name, attr->prefix,attr->name);
6236 elem->name, attr->prefix, attr->name);
6240 elem->name, attr->prefix, attr->name);
6242 } else if (attr->def == XML_ATTRIBUTE_FIXED) {
6248 if ((attr->prefix == NULL) &&
6249 (xmlStrEqual(attr->name, BAD_CAST "xmlns"))) {
6255 if (!xmlStrEqual(attr->defaultValue, ns->href)) {
6266 } else if (xmlStrEqual(attr->prefix, BAD_CAST "xmlns")) {
6271 if (xmlStrEqual(attr->name, ns->prefix)) {
6272 if (!xmlStrEqual(attr->defaultValue, ns->href)) {
6285 attr = attr->nexth;
6371 xmlAttrPtr attr;
6398 attr = elem->properties;
6399 while (attr != NULL) {
6400 value = xmlNodeListGetString(doc, attr->children, 0);
6401 ret &= xmlValidateOneAttribute(ctxt, doc, elem, attr, value);
6404 attr= attr->next;
6437 xmlAttrPtr attr;
6441 if ((ref->attr == NULL) && (ref->name == NULL))
6443 attr = ref->attr;
6444 if (attr == NULL) {
6471 } else if (attr->atype == XML_ATTRIBUTE_IDREF) {
6474 xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
6476 attr->name, name, NULL);
6479 } else if (attr->atype == XML_ATTRIBUTE_IDREFS) {
6496 xmlErrValidNode(ctxt, attr->parent, XML_DTD_UNKNOWN_ID,
6498 attr->name, str, NULL);