diff --git a/ChangeLog b/ChangeLog index 04ebba70..14583991 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 16 16:36:08 CET 2002 Daniel Veillard + + * tree.c: update xmlNodeSetContent() and xmlNodeSetContentLen() + to allow updating an attribute content + Tue Jan 15 18:09:23 CET 2002 Daniel Veillard * libxml.h: try to avoid problems when compiling on Windows diff --git a/doc/DOM.html b/doc/DOM.html index e29bc76d..b4e12db3 100644 --- a/doc/DOM.html +++ b/doc/DOM.html @@ -3,11 +3,11 @@ DOM Principles @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/FAQ.html b/doc/FAQ.html index 3f0ab9a0..5f2e10a1 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -3,11 +3,11 @@ FAQ @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index fc0245fb..15bde460 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -3,11 +3,11 @@ XML @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/XSLT.html b/doc/XSLT.html index 33a404b2..5d95663b 100644 --- a/doc/XSLT.html +++ b/doc/XSLT.html @@ -3,11 +3,11 @@ XSLT @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/architecture.html b/doc/architecture.html index 47403c7a..d7fd2718 100644 --- a/doc/architecture.html +++ b/doc/architecture.html @@ -3,11 +3,11 @@ libxml architecture @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/bugs.html b/doc/bugs.html index d9bb0af9..ea8caac8 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -3,11 +3,11 @@ Reporting bugs and getting help @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/catalog.html b/doc/catalog.html index 15751292..69dbbc77 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -3,11 +3,11 @@ Catalog support @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/contribs.html b/doc/contribs.html index c2efa130..8c6f1beb 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -3,11 +3,11 @@ Contributions @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/docs.html b/doc/docs.html index d60570e1..89a2e9ce 100644 --- a/doc/docs.html +++ b/doc/docs.html @@ -3,11 +3,11 @@ Documentation @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/downloads.html b/doc/downloads.html index 24a02e19..c2da1713 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -3,11 +3,11 @@ Downloads @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/encoding.html b/doc/encoding.html index 96c72526..3422ceb9 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -3,11 +3,11 @@ Encodings support @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/entities.html b/doc/entities.html index 60a4e045..91e10b88 100644 --- a/doc/entities.html +++ b/doc/entities.html @@ -3,11 +3,11 @@ Entities or no entities @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/example.html b/doc/example.html index 95f27650..83c651b7 100644 --- a/doc/example.html +++ b/doc/example.html @@ -3,11 +3,11 @@ A real example @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/help.html b/doc/help.html index 808c1b0e..87ff2dd2 100644 --- a/doc/help.html +++ b/doc/help.html @@ -3,11 +3,11 @@ How to help @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/index.html b/doc/index.html index 58fd8d0d..9491ca5e 100644 --- a/doc/index.html +++ b/doc/index.html @@ -3,11 +3,11 @@ The XML C library for Gnome @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/interface.html b/doc/interface.html index 98f244f0..67f80578 100644 --- a/doc/interface.html +++ b/doc/interface.html @@ -3,11 +3,11 @@ The SAX interface @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/intro.html b/doc/intro.html index 6a7264f6..4e06d48c 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -3,11 +3,11 @@ Introduction @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/library.html b/doc/library.html index 3bbd8b6d..1cb95e92 100644 --- a/doc/library.html +++ b/doc/library.html @@ -3,11 +3,11 @@ The parser interfaces @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/namespaces.html b/doc/namespaces.html index 3ca58817..43563961 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -3,11 +3,11 @@ Namespaces @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/news.html b/doc/news.html index 0dab21bb..0a1919f1 100644 --- a/doc/news.html +++ b/doc/news.html @@ -3,11 +3,11 @@ News @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/site.xsl b/doc/site.xsl index 3d99ffb3..78bb2d52 100644 --- a/doc/site.xsl +++ b/doc/site.xsl @@ -107,7 +107,7 @@ - The table of content --> -
      +
      • Home
      • @@ -128,7 +128,7 @@
      -
        +
        • Mail archive
        • XSLT libxslt
        • DOM gdome2
        • @@ -186,11 +186,11 @@ --> diff --git a/doc/threads.html b/doc/threads.html index 21d91f0a..9ff51ac6 100644 --- a/doc/threads.html +++ b/doc/threads.html @@ -3,11 +3,11 @@ Thread safety @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/tree.html b/doc/tree.html index 5dc73bd0..3c376d38 100644 --- a/doc/tree.html +++ b/doc/tree.html @@ -3,11 +3,11 @@ The tree output @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/upgrade.html b/doc/upgrade.html index 612d4861..83a43180 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -3,11 +3,11 @@ Upgrading 1.x code @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/xmldtd.html b/doc/xmldtd.html index 5fa33812..4f8aeca2 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -3,11 +3,11 @@ Validation & DTDs @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/xmlio.html b/doc/xmlio.html index e5d04b2e..601a0709 100644 --- a/doc/xmlio.html +++ b/doc/xmlio.html @@ -3,11 +3,11 @@ I/O Interfaces @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/doc/xmlmem.html b/doc/xmlmem.html index 6382d7a0..289ee440 100644 --- a/doc/xmlmem.html +++ b/doc/xmlmem.html @@ -3,11 +3,11 @@ Memory Management @@ -26,7 +26,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Main Menu
    +
  • Home
  • Introduction
  • FAQ
  • @@ -60,7 +60,7 @@ A:link, A:visited, A:active { text-decoration: underline }
-
Related links
    +
  • Mail archive
  • XSLT libxslt
  • DOM gdome2
  • diff --git a/tree.c b/tree.c index 4ae0a1e1..2b145582 100644 --- a/tree.c +++ b/tree.c @@ -3715,12 +3715,11 @@ xmlNodeSetContent(xmlNodePtr cur, const xmlChar *content) { switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE: + case XML_ATTRIBUTE_NODE: if (cur->children != NULL) xmlFreeNodeList(cur->children); cur->children = xmlStringGetNodeList(cur->doc, content); UPDATE_LAST_CHILD_AND_PARENT(cur) break; - case XML_ATTRIBUTE_NODE: - break; case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: @@ -3795,12 +3794,11 @@ xmlNodeSetContentLen(xmlNodePtr cur, const xmlChar *content, int len) { switch (cur->type) { case XML_DOCUMENT_FRAG_NODE: case XML_ELEMENT_NODE: + case XML_ATTRIBUTE_NODE: if (cur->children != NULL) xmlFreeNodeList(cur->children); cur->children = xmlStringLenGetNodeList(cur->doc, content, len); UPDATE_LAST_CHILD_AND_PARENT(cur) break; - case XML_ATTRIBUTE_NODE: - break; case XML_TEXT_NODE: case XML_CDATA_SECTION_NODE: case XML_ENTITY_REF_NODE: @@ -5701,23 +5699,17 @@ xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level, return; } if (cur->type == XML_PI_NODE) { + xmlBufferWriteChar(buf, "name); if (cur->content != NULL) { - xmlBufferWriteChar(buf, "name); - if (cur->content != NULL) { - xmlBufferWriteChar(buf, " "); + xmlBufferWriteChar(buf, " "); #ifndef XML_USE_BUFFER_CONTENT - xmlBufferWriteCHAR(buf, cur->content); + xmlBufferWriteCHAR(buf, cur->content); #else - xmlBufferWriteCHAR(buf, xmlBufferContent(cur->content)); + xmlBufferWriteCHAR(buf, xmlBufferContent(cur->content)); #endif - } - xmlBufferWriteChar(buf, "?>"); - } else { - xmlBufferWriteChar(buf, "name); - xmlBufferWriteChar(buf, "?>"); } + xmlBufferWriteChar(buf, "?>"); return; } if (cur->type == XML_COMMENT_NODE) {