OLD | NEW |
1 /* | 1 /* |
2 * tree.c : implementation of access function for an XML tree. | 2 * tree.c : implementation of access function for an XML tree. |
3 * | 3 * |
4 * References: | 4 * References: |
5 * XHTML 1.0 W3C REC: http://www.w3.org/TR/2002/REC-xhtml1-20020801/ | 5 * XHTML 1.0 W3C REC: http://www.w3.org/TR/2002/REC-xhtml1-20020801/ |
6 * | 6 * |
7 * See Copyright for the status of this software. | 7 * See Copyright for the status of this software. |
8 * | 8 * |
9 * daniel@veillard.com | 9 * daniel@veillard.com |
10 * | 10 * |
(...skipping 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 * Create a new REFERENCE_REF node | 1586 * Create a new REFERENCE_REF node |
1587 */ | 1587 */ |
1588 node = xmlNewReference(doc, val); | 1588 node = xmlNewReference(doc, val); |
1589 if (node == NULL) { | 1589 if (node == NULL) { |
1590 if (val != NULL) xmlFree(val); | 1590 if (val != NULL) xmlFree(val); |
1591 goto out; | 1591 goto out; |
1592 } | 1592 } |
1593 else if ((ent != NULL) && (ent->children == NULL)) { | 1593 else if ((ent != NULL) && (ent->children == NULL)) { |
1594 xmlNodePtr temp; | 1594 xmlNodePtr temp; |
1595 | 1595 |
| 1596 ent->children = (xmlNodePtr) -1; |
1596 ent->children = xmlStringGetNodeList(doc, | 1597 ent->children = xmlStringGetNodeList(doc, |
1597 (const xmlChar*)node->content); | 1598 (const xmlChar*)node->content); |
1598 ent->owner = 1; | 1599 ent->owner = 1; |
1599 temp = ent->children; | 1600 temp = ent->children; |
1600 while (temp) { | 1601 while (temp) { |
1601 temp->parent = (xmlNodePtr)ent; | 1602 temp->parent = (xmlNodePtr)ent; |
1602 temp = temp->next; | 1603 temp = temp->next; |
1603 } | 1604 } |
1604 } | 1605 } |
1605 if (last == NULL) { | 1606 if (last == NULL) { |
(...skipping 8506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10112 } | 10113 } |
10113 default: | 10114 default: |
10114 break; | 10115 break; |
10115 } | 10116 } |
10116 } | 10117 } |
10117 return (0); | 10118 return (0); |
10118 } | 10119 } |
10119 | 10120 |
10120 #define bottom_tree | 10121 #define bottom_tree |
10121 #include "elfgcchack.h" | 10122 #include "elfgcchack.h" |
OLD | NEW |