DOM::Document res = style.apply(doc.document(), dirtyId);
assert(res);
style.save(doc.document(), stdout);
- style.save(res, stdout);
+ //style.save(res, stdout);
if (result)
{
cout << "REPLACING A FRAGMENT OF THE DOCUMENT" << endl;
if (result.get_documentElement().getAttribute("xref") == root.getAttribute("xref"))
{
cout << "REPLACING ROOT" << endl;
+ result.replaceChild(result.importNode(root, true), result.get_documentElement());
+#if 0
// the following remove should not be necessary
// according to the spec replaceChild should work just fine
result.removeChild(result.get_documentElement());
result.appendChild(result.importNode(root, true));
+#endif
}
else
try
if (GUI_load_document(gdome_cast_doc(static_cast<GdomeNode*>(result))) < 0)
cerr << "c'e' stato un errore" << endl;
}
+ style.save(result, stdout);
doc.clearDirty();
}