diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-09 15:41:26 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-09 15:41:26 +0100 |
commit | 98fc0ed106efe44be6d8483af3d8d66321fa4190 (patch) | |
tree | 130a1648bd2bc242255e9b71566d1803a8385a5f /src | |
parent | 192794c711571f1689a62d56342c1c9ef1ccc805 (diff) |
changed XML prolog handling.
Diffstat (limited to 'src')
-rw-r--r-- | src/core/XML.cpp | 1 | ||||
-rw-r--r-- | src/core/XML.hpp | 10 | ||||
-rw-r--r-- | src/plugins/html/DemoOutput.cpp | 5 |
3 files changed, 6 insertions, 10 deletions
diff --git a/src/core/XML.cpp b/src/core/XML.cpp index affa75f..9cfb5dc 100644 --- a/src/core/XML.cpp +++ b/src/core/XML.cpp @@ -6,7 +6,6 @@ namespace xml { void Node::serialize(std::ostream &out, const std::string &doctype) { - out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; if (doctype != "") { out << doctype << "\n"; } diff --git a/src/core/XML.hpp b/src/core/XML.hpp index 25c8dae..e55ecba 100644 --- a/src/core/XML.hpp +++ b/src/core/XML.hpp @@ -68,17 +68,17 @@ public: : Managed(mgr), parent(acquire(parent)){}; /** - * This method writes an XML prolog and the XML representing the current + * This method writes an XML doctype and the XML representing the current * node, including all children, to the given output stream. * @param out is the output stream the serialized data shall be * written to. - * @param doctype enables you to add a prefix after the XML prolog - * specifying the doctype. + * @param doctype enables you to add a prefix specifying the doctype. */ - void serialize(std::ostream &out, const std::string &doctype = ""); + void serialize(std::ostream &out, + const std::string &doctype = "<?xml version=\"1.0\"?>"); /** * This method just writes the XML representation of this node to the - * output stream, without the XML prolog. + * output stream. * * @param out the output stream the serialized data shall be written * to. diff --git a/src/plugins/html/DemoOutput.cpp b/src/plugins/html/DemoOutput.cpp index 5413b1f..296a493 100644 --- a/src/plugins/html/DemoOutput.cpp +++ b/src/plugins/html/DemoOutput.cpp @@ -78,10 +78,7 @@ void DemoHTMLTransformer::writeHTML(Handle<model::Document> doc, body->addChild(book); // After the content has been transformed, we serialize it. - html->serialize( - out, - "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n" - "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"); + html->serialize(out, "<!DOCTYPE html>"); } /** |