+ body_ptr->children = 0;
+ xmlFreeNode(envelope_ptr);
+ }
+ if (stylesheet)
+ {
+ char *content = odr_malloc(o, strlen(stylesheet) + 40);
+
+ xmlNodePtr pi, ptr = xmlDocGetRootElement(doc);
+ sprintf(content, "type=\"text/xsl\" href=\"%s\"", stylesheet);
+ pi = xmlNewPI(BAD_CAST "xml-stylesheet",
+ BAD_CAST content);
+ xmlAddPrevSibling(ptr, pi);