[libxml++] Remove trailing blanks



commit 9d16fdc48338a527ddc47d33ead44f2bdb55de6b
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Thu Nov 5 12:44:03 2015 +0100

    Remove trailing blanks

 examples/dom_build/main.cc                  |    6 +++---
 examples/dom_parse_entities/main.cc         |    6 +++---
 examples/dom_parser/main.cc                 |   10 +++++-----
 examples/dom_parser_raw/main.cc             |    8 +++-----
 examples/dom_xinclude/main.cc               |    2 +-
 examples/import_node/example2.xml           |    2 +-
 examples/import_node/main.cc                |   10 +++++-----
 examples/sax_exception/main.cc              |    4 +---
 examples/sax_parser/main.cc                 |    7 ++-----
 examples/sax_parser_build_dom/main.cc       |    4 ++--
 examples/sax_parser_build_dom/svgdocument.h |    4 ++--
 examples/sax_parser_build_dom/svgelement.cc |    8 +++-----
 examples/sax_parser_build_dom/svgelement.h  |   10 ++++------
 examples/sax_parser_build_dom/svggroup.h    |    6 ++----
 examples/sax_parser_build_dom/svgparser.cc  |    6 +++---
 examples/sax_parser_build_dom/svgparser.h   |    6 ++----
 examples/sax_parser_build_dom/svgpath.h     |    8 +++-----
 examples/sax_parser_entities/main.cc        |    4 +---
 examples/sax_parser_entities/myparser.cc    |    6 +-----
 libxml++/attribute.h                        |    2 +-
 libxml++/document.cc                        |   12 ++++++------
 libxml++/document.h                         |    4 ++--
 libxml++/dtd.cc                             |    2 +-
 libxml++/dtd.h                              |    2 +-
 libxml++/exceptions/exception.cc            |    2 +-
 libxml++/exceptions/internal_error.h        |    2 +-
 libxml++/exceptions/parse_error.h           |    2 +-
 libxml++/io/ostreamoutputbuffer.cc          |    2 +-
 libxml++/keepblanks.cc                      |    2 +-
 libxml++/nodes/cdatanode.cc                 |    2 +-
 libxml++/nodes/contentnode.cc               |    4 ++--
 libxml++/nodes/element.cc                   |   10 +++++-----
 libxml++/nodes/entityreference.cc           |    4 ++--
 libxml++/nodes/node.cc                      |   12 ++++++------
 libxml++/nodes/node.h                       |   22 +++++++++++-----------
 libxml++/nodes/processinginstructionnode.cc |    3 +--
 libxml++/nodes/textnode.cc                  |    2 +-
 libxml++/parsers/domparser.cc               |    2 +-
 libxml++/parsers/domparser.h                |   10 +++++-----
 libxml++/parsers/parser.cc                  |    8 ++++----
 libxml++/parsers/parser.h                   |    2 +-
 libxml++/parsers/saxparser.cc               |   10 +++++-----
 libxml++/parsers/saxparser.h                |   14 +++++++-------
 libxml++/parsers/textreader.cc              |   20 ++++++++++----------
 libxml++/relaxngschema.cc                   |    4 ++--
 libxml++/validators/validator.cc            |    2 +-
 libxml++/xsdschema.cc                       |    4 ++--
 47 files changed, 130 insertions(+), 154 deletions(-)
---
diff --git a/examples/dom_build/main.cc b/examples/dom_build/main.cc
index 3674b0e..568d944 100644
--- a/examples/dom_build/main.cc
+++ b/examples/dom_build/main.cc
@@ -43,14 +43,14 @@ main(int /* argc */, char** /* argv */)
 
     //foo is the default namespace prefix.
     auto nodeRoot = document.create_root_node("exampleroot", "http://foo";, "foo"); //Declares the namespace 
and uses its prefix for this node
-    nodeRoot->set_namespace_declaration("http://foobar";, "foobar"); //Also associate this prefix with this 
namespace: 
+    nodeRoot->set_namespace_declaration("http://foobar";, "foobar"); //Also associate this prefix with this 
namespace:
 
     nodeRoot->set_first_child_text("\n");
     auto nodeChild = nodeRoot->add_child_element("examplechild");
 
     //Associate prefix with namespace:
-    nodeChild->set_namespace_declaration("http://bar";, "bar"); 
-     
+    nodeChild->set_namespace_declaration("http://bar";, "bar");
+
     nodeChild->set_namespace("bar"); //So it will be bar::examplechild.
     nodeChild->set_attribute("id", "1", "foo"); //foo is the namespace prefix. You could also just use a 
name of foo:id".
     nodeChild->set_first_child_text("\nSome content\n");
diff --git a/examples/dom_parse_entities/main.cc b/examples/dom_parse_entities/main.cc
index 1b22024..d7a3870 100644
--- a/examples/dom_parse_entities/main.cc
+++ b/examples/dom_parse_entities/main.cc
@@ -28,7 +28,7 @@
 #include <cstdlib>
 
 void print_node(const xmlpp::Node* node, bool substitute_entities, unsigned int indentation = 0)
-{  
+{
   const Glib::ustring indent(indentation, ' ');
   std::cout << std::endl; //Separate nodes by an empty line.
 
@@ -58,7 +58,7 @@ void print_node(const xmlpp::Node* node, bool substitute_entities, unsigned int
   {
     //Recurse through child nodes:
     for(const auto& child : node->get_children())
-    {   
+    {
       print_node(child, substitute_entities, indentation + 2); //recursive
     }
   }
@@ -75,7 +75,7 @@ int main(int argc, char* argv[])
     filepath = argv[1]; //Allow the user to specify a different XML file to parse.
   else
     filepath = "example.xml";
-  
+
   // Parse first without, then with, entity substitution.
   int return_code = EXIT_SUCCESS;
   bool substitute_entities = false;
diff --git a/examples/dom_parser/main.cc b/examples/dom_parser/main.cc
index 26b46d8..389a7ec 100644
--- a/examples/dom_parser/main.cc
+++ b/examples/dom_parser/main.cc
@@ -30,14 +30,14 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0)
 {
   const Glib::ustring indent(indentation, ' ');
   std::cout << std::endl; //Separate nodes by an empty line.
-  
+
   const auto nodeContent = dynamic_cast<const xmlpp::ContentNode*>(node);
   const auto nodeText = dynamic_cast<const xmlpp::TextNode*>(node);
   const auto nodeComment = dynamic_cast<const xmlpp::CommentNode*>(node);
 
   if(nodeText && nodeText->is_white_space()) //Let's ignore the indenting - you don't always want to do this.
     return;
-    
+
   const auto nodename = node->get_name();
 
   if(!nodeText && !nodeComment && !nodename.empty()) //Let's not say "name: text".
@@ -54,7 +54,7 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0)
     std::cout << indent << "Text Node" << std::endl;
   }
 
-  //Treat the various node types differently: 
+  //Treat the various node types differently:
   if(nodeText)
   {
     std::cout << indent << "text = \"" << CatchConvertError(nodeText->get_content()) << "\"" << std::endl;
@@ -97,7 +97,7 @@ void print_node(const xmlpp::Node* node, unsigned int indentation = 0)
       std::cout << "title = " << CatchConvertError(attribute->get_value()) << std::endl;
     }
   }
-  
+
   if(!nodeContent)
   {
     //Recurse through child nodes:
@@ -158,7 +158,7 @@ int main(int argc, char* argv[])
     filepath = argv[argi]; //Allow the user to specify a different XML file to parse.
   else
     filepath = "example.xml";
- 
+
   try
   {
     xmlpp::DomParser parser;
diff --git a/examples/dom_parser_raw/main.cc b/examples/dom_parser_raw/main.cc
index 5051784..496bb30 100644
--- a/examples/dom_parser_raw/main.cc
+++ b/examples/dom_parser_raw/main.cc
@@ -1,5 +1,3 @@
-// -*- C++ -*-
-
 /* main.cc
  *
  * Copyright (C) 2002 The libxml++ development team
@@ -29,7 +27,7 @@
 void print_node(const xmlpp::Node* node, unsigned int indentation = 0)
 {
   std::cout << std::endl; //Separate nodes by an empty line.
-  
+
   std::cout << "Node name = " << node->get_name() << std::endl;
 
   //Recurse through child nodes:
@@ -68,13 +66,13 @@ int main(int argc, char* argv[])
     filepath = argv[1]; //Allow the user to specify a different XML file to parse.
   else
     filepath = "example.xml";
-  
+
   try
   {
     xmlpp::DomParser parser;
     parser.set_validate();
     parser.set_substitute_entities(); //We just want the text to be resolved/unescaped automatically.
-   
+
 
     auto contents = read_from_disk(filepath);
     std::string contents_ucs2;
diff --git a/examples/dom_xinclude/main.cc b/examples/dom_xinclude/main.cc
index 71e538c..fe63c4d 100644
--- a/examples/dom_xinclude/main.cc
+++ b/examples/dom_xinclude/main.cc
@@ -156,7 +156,7 @@ int main(int argc, char* argv[])
     filepath = argv[argi]; //Allow the user to specify a different XML file to parse.
   else
     filepath = "example.xml";
- 
+
   try
   {
     xmlpp::DomParser parser;
diff --git a/examples/import_node/example2.xml b/examples/import_node/example2.xml
index adf538b..b55c068 100644
--- a/examples/import_node/example2.xml
+++ b/examples/import_node/example2.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <root name="example2" type="example">
 <child>added content from other document
-<grandchild>grand child content</grandchild> 
+<grandchild>grand child content</grandchild>
 </child>
 </root>
diff --git a/examples/import_node/main.cc b/examples/import_node/main.cc
index edcbaa0..726d2ec 100644
--- a/examples/import_node/main.cc
+++ b/examples/import_node/main.cc
@@ -14,13 +14,13 @@ int main (int /* argc */, char** /* argv */)
   std::locale::global(std::locale(""));
 
   try
-  { 
+  {
     DomParser example1("example1.xml");
     DomParser example2("example2.xml");
-    
+
     auto doc1 = example1.get_document();
     auto doc2 = example2.get_document();
-    
+
     auto root1 = doc1->get_root_node();
     auto root2 = doc2->get_root_node();
 
@@ -34,11 +34,11 @@ int main (int /* argc */, char** /* argv */)
     // Import an attribute that will replace an existing attribute in the root element.
     auto attribute_to_add = root2->get_attribute("name");
     root1->import_node(attribute_to_add);
-    
+
     // Import an attribute that will be added to the root element.
     attribute_to_add = root2->get_attribute("type");
     root1->import_node(attribute_to_add);
-    
+
     // Find the first text child of the first "child" element in example2.
     auto first_child2 = dynamic_cast<Element*>(child_list2.front());
     if (!first_child2)
diff --git a/examples/sax_exception/main.cc b/examples/sax_exception/main.cc
index f5b2c57..ac4ed55 100644
--- a/examples/sax_exception/main.cc
+++ b/examples/sax_exception/main.cc
@@ -1,5 +1,3 @@
-// -*- C++ -*-
-
 /* main.cc
  *
  * Copyright (C) 2002 The libxml++ development team
@@ -38,7 +36,7 @@ int main(int /* argc */, char** /* argv */)
   std::locale::global(std::locale(""));
 
   MySaxParser parser;
-  
+
   try
   {
     parser.parse_file("example.xml");
diff --git a/examples/sax_parser/main.cc b/examples/sax_parser/main.cc
index b786780..be405a5 100644
--- a/examples/sax_parser/main.cc
+++ b/examples/sax_parser/main.cc
@@ -1,5 +1,3 @@
-// -*- C++ -*-
-
 /* main.cc
  *
  * Copyright (C) 2002 The libxml++ development team
@@ -42,7 +40,7 @@ main(int argc, char* argv[])
     filepath = argv[1]; //Allow the user to specify a different XML file to parse.
   else
     filepath = "example.xml";
-    
+
   // Parse the entire document in one go:
   auto return_code = EXIT_SUCCESS;
   try
@@ -61,7 +59,7 @@ main(int argc, char* argv[])
   try
   {
     std::cout << std::endl << "Incremental SAX Parser:" << std::endl;
-    
+
     std::ifstream is(filepath.c_str());
     if (!is)
       throw xmlpp::exception("Could not open file " + filepath);
@@ -97,4 +95,3 @@ main(int argc, char* argv[])
 
   return return_code;
 }
-
diff --git a/examples/sax_parser_build_dom/main.cc b/examples/sax_parser_build_dom/main.cc
index 132b51d..613d85f 100644
--- a/examples/sax_parser_build_dom/main.cc
+++ b/examples/sax_parser_build_dom/main.cc
@@ -1,6 +1,6 @@
 /* main.cc
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
  *
@@ -72,6 +72,6 @@ main(int argc, char* argv[])
     std::cerr << "libxml++ exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
-  
+
   return EXIT_SUCCESS;
 }
diff --git a/examples/sax_parser_build_dom/svgdocument.h b/examples/sax_parser_build_dom/svgdocument.h
index 6261b6a..9c34391 100644
--- a/examples/sax_parser_build_dom/svgdocument.h
+++ b/examples/sax_parser_build_dom/svgdocument.h
@@ -1,9 +1,9 @@
 /* svgdocument.h
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * License as published by the Free Software Foundation; either
diff --git a/examples/sax_parser_build_dom/svgelement.cc b/examples/sax_parser_build_dom/svgelement.cc
index d2e07ee..8a39ced 100644
--- a/examples/sax_parser_build_dom/svgelement.cc
+++ b/examples/sax_parser_build_dom/svgelement.cc
@@ -1,8 +1,6 @@
-// -*- C++ -*-
-
 /* svgelement.cc
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
  *
@@ -28,7 +26,7 @@ namespace SVG {
 Element::Element(xmlNode* node)
   : xmlpp::Element(node)
 {}
-    
+
 Element::~Element()
 {}
 
@@ -37,7 +35,7 @@ void Element::set_style(const Glib::ustring& style)
 {
   set_attribute("style", style);
 }
-    
+
 const Glib::ustring Element::get_style() const
 {
   return get_attribute("style")->get_value();
diff --git a/examples/sax_parser_build_dom/svgelement.h b/examples/sax_parser_build_dom/svgelement.h
index 1ea8ce1..0440b14 100644
--- a/examples/sax_parser_build_dom/svgelement.h
+++ b/examples/sax_parser_build_dom/svgelement.h
@@ -1,11 +1,9 @@
-// -*- C++ -*-
-
 /* svgelement.h
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * License as published by the Free Software Foundation; either
@@ -40,8 +38,8 @@ public:
   // example custom methods
   void set_style(const Glib::ustring& style);
   const Glib::ustring get_style() const;
-    
-  // TODO: add custom methods 
+
+  // TODO: add custom methods
 
 private:
   // TODO: add custom properties
diff --git a/examples/sax_parser_build_dom/svggroup.h b/examples/sax_parser_build_dom/svggroup.h
index dd288e1..e0c6de8 100644
--- a/examples/sax_parser_build_dom/svggroup.h
+++ b/examples/sax_parser_build_dom/svggroup.h
@@ -1,11 +1,9 @@
-// -*- C++ -*-
-
 /* svggroup.h
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * License as published by the Free Software Foundation; either
diff --git a/examples/sax_parser_build_dom/svgparser.cc b/examples/sax_parser_build_dom/svgparser.cc
index b90592e..7398002 100644
--- a/examples/sax_parser_build_dom/svgparser.cc
+++ b/examples/sax_parser_build_dom/svgparser.cc
@@ -1,6 +1,6 @@
 /* svgparser.cc
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
  *
@@ -46,11 +46,11 @@ void Parser::on_start_element(const Glib::ustring& name,
   //with an instance of a derived node.
   //This is not a recommended technique, and might not
   //work with future versions of libxml++.
-  
+
   // Parse namespace prefix and save for later:
   Glib::ustring elementPrefix;
   Glib::ustring elementName = name;
-  Glib::ustring::size_type idx = name.find(':'); 
+  Glib::ustring::size_type idx = name.find(':');
   if (idx != Glib::ustring::npos) //If the separator was found
   {
     elementPrefix = name.substr(0, idx);
diff --git a/examples/sax_parser_build_dom/svgparser.h b/examples/sax_parser_build_dom/svgparser.h
index b7d99fc..201de74 100644
--- a/examples/sax_parser_build_dom/svgparser.h
+++ b/examples/sax_parser_build_dom/svgparser.h
@@ -1,11 +1,9 @@
-// -*- C++ -*-
-
 /* svgparser.h
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * License as published by the Free Software Foundation; either
diff --git a/examples/sax_parser_build_dom/svgpath.h b/examples/sax_parser_build_dom/svgpath.h
index 990546b..854e13c 100644
--- a/examples/sax_parser_build_dom/svgpath.h
+++ b/examples/sax_parser_build_dom/svgpath.h
@@ -1,11 +1,9 @@
-// -*- C++ -*-
-
 /* svgpath.h
  *
- * By Dan Dennedy <dan dennedy org> 
+ * By Dan Dennedy <dan dennedy org>
  *
  * Copyright (C) 2003 The libxml++ development team
- * 
+ *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
  * License as published by the Free Software Foundation; either
@@ -36,7 +34,7 @@ public:
   Path(xmlNode* node)
     : Element(node)
     {}
-    
+
   const Glib::ustring get_data() const
     {
       return get_attribute("d")->get_value();
diff --git a/examples/sax_parser_entities/main.cc b/examples/sax_parser_entities/main.cc
index 1466c8d..fd19391 100644
--- a/examples/sax_parser_entities/main.cc
+++ b/examples/sax_parser_entities/main.cc
@@ -1,5 +1,3 @@
-// -*- C++ -*-
-
 /* main.cc
  *
  * Copyright (C) 2002 The libxml++ development team
@@ -53,7 +51,7 @@ main(int argc, char* argv[])
     std::cerr << "libxml++ exception: " << ex.what() << std::endl;
     return EXIT_FAILURE;
   }
-  
+
   return EXIT_SUCCESS;
 }
 
diff --git a/examples/sax_parser_entities/myparser.cc b/examples/sax_parser_entities/myparser.cc
index c891fcf..4ea7145 100644
--- a/examples/sax_parser_entities/myparser.cc
+++ b/examples/sax_parser_entities/myparser.cc
@@ -1,5 +1,3 @@
-// -*- C++ -*-
-
 /* myparser.cc
  *
  * Copyright (C) 2002 The libxml++ development team
@@ -87,7 +85,7 @@ void MySaxParser::on_fatal_error(const Glib::ustring& text)
 _xmlEntity* MySaxParser::on_get_entity(const Glib::ustring& name)
 {
   std::cout << "on_get_entity(): " << name << std::endl;
-  
+
   //Call the base class:
   return SaxParser::on_get_entity(name);
 }
@@ -99,5 +97,3 @@ void MySaxParser::on_entity_declaration(const Glib::ustring& name, xmlpp::XmlEnt
   //Call the base class:
   SaxParser::on_entity_declaration(name, type, publicId, systemId, content);
 }
-
-
diff --git a/libxml++/attribute.h b/libxml++/attribute.h
index 8458f22..8ac9155 100644
--- a/libxml++/attribute.h
+++ b/libxml++/attribute.h
@@ -23,7 +23,7 @@ class Attribute : public Node
 public:
   explicit Attribute(_xmlNode* node);
   ~Attribute() override;
-  
+
   /** Get the value of this attribute.
    * @returns The attribute's value.
    */
diff --git a/libxml++/document.cc b/libxml++/document.cc
index c6e4339..d441b1d 100644
--- a/libxml++/document.cc
+++ b/libxml++/document.cc
@@ -31,7 +31,7 @@ void find_wrappers(xmlNode* node, NodeMap& node_map)
 {
   if (!node)
     return;
-    
+
   //If an entity declaration contains an entity reference, there can be cyclic
   //references between entity declarations and entity references. (It's not
   //a tree.) We must avoid an infinite recursion.
@@ -69,9 +69,9 @@ void find_wrappers(xmlNode* node, NodeMap& node_map)
     return;
 
   //Walk the attributes list.
-  //Note that some "derived" structs have a different layout, so 
+  //Note that some "derived" structs have a different layout, so
   //_xmlNode::properties would be a nonsense value, leading to crashes
-  //(and shown as valgrind warnings), so we return above, to avoid 
+  //(and shown as valgrind warnings), so we return above, to avoid
   //checking it here.
   for (auto attr = node->properties; attr; attr = attr->next)
     find_wrappers(reinterpret_cast<xmlNode*>(attr), node_map);
@@ -83,7 +83,7 @@ void remove_found_wrappers(xmlNode* node, NodeMap& node_map)
 {
   if (!node)
     return;
-    
+
   if (node->type != XML_ENTITY_REF_NODE)
   {
     // Walk the children list.
@@ -293,7 +293,7 @@ Element* Document::create_root_node_by_import(const Node* node,
 CommentNode* Document::add_comment(const Glib::ustring& content)
 {
   auto child = xmlNewComment((const xmlChar*)content.c_str());
- 
+
   // Use the result, because child can be freed when merging text nodes:
   auto node = xmlAddChild((xmlNode*)impl_, child);
   if (!node)
@@ -404,7 +404,7 @@ void Document::do_write_to_stream(std::ostream& output, const Glib::ustring& enc
   xmlResetLastError();
   const int result = xmlSaveFormatFileTo(buffer.cobj(), impl_,
     get_encoding_or_utf8(encoding), format ? 1 : 0);
-  
+
   if(result == -1)
   {
     throw exception("do_write_to_stream() failed.\n" + format_xml_error());
diff --git a/libxml++/document.h b/libxml++/document.h
index ea81b3f..23b9d8d 100644
--- a/libxml++/document.h
+++ b/libxml++/document.h
@@ -76,14 +76,14 @@ public:
    * @throws xmlpp::internal_error If memory allocation fails.
    */
   explicit Document(const Glib::ustring& version = "1.0");
-  
+
   /** Create a new C++ wrapper for an xmlDoc struct.
    * The created xmlpp::Document takes ownership of the xmlDoc.
    * When the Document is deleted, so is the xmlDoc and all its nodes.
    * @param doc A pointer to an xmlDoc struct. Must not be <tt>nullptr</tt>.
    */
   explicit Document(_xmlDoc* doc);
-    
+
   ~Document() override;
 
   /** @return The encoding used in the source from which the document has been loaded.
diff --git a/libxml++/dtd.cc b/libxml++/dtd.cc
index ff2663e..8a6d601 100644
--- a/libxml++/dtd.cc
+++ b/libxml++/dtd.cc
@@ -12,7 +12,7 @@
 
 namespace xmlpp
 {
-  
+
 struct Dtd::Impl
 {
   Impl() : dtd(nullptr), is_dtd_owner(false) {}
diff --git a/libxml++/dtd.h b/libxml++/dtd.h
index 16e50cf..d3f9030 100644
--- a/libxml++/dtd.h
+++ b/libxml++/dtd.h
@@ -114,7 +114,7 @@ public:
   Glib::ustring get_name() const;
   Glib::ustring get_external_id() const;
   Glib::ustring get_system_id() const;
-  
+
   /** Access the underlying libxml implementation.
    */
   _xmlDtd* cobj();
diff --git a/libxml++/exceptions/exception.cc b/libxml++/exceptions/exception.cc
index e7fbf51..99fcfc7 100644
--- a/libxml++/exceptions/exception.cc
+++ b/libxml++/exceptions/exception.cc
@@ -5,7 +5,7 @@
 #include <vector>
 
 namespace xmlpp {
-  
+
 exception::exception(const Glib::ustring& message)
 : message_(message)
 {
diff --git a/libxml++/exceptions/internal_error.h b/libxml++/exceptions/internal_error.h
index 07912cb..d60b054 100644
--- a/libxml++/exceptions/internal_error.h
+++ b/libxml++/exceptions/internal_error.h
@@ -23,7 +23,7 @@
 #include <libxml++/exceptions/exception.h>
 
 namespace xmlpp {
-  
+
 class internal_error : public exception
 {
 public:
diff --git a/libxml++/exceptions/parse_error.h b/libxml++/exceptions/parse_error.h
index 724f931..1abb091 100644
--- a/libxml++/exceptions/parse_error.h
+++ b/libxml++/exceptions/parse_error.h
@@ -26,7 +26,7 @@ namespace xmlpp
 {
 
 /** This exception will be thrown when the parser encounters an error in the XML document.
- */  
+ */
 class parse_error : public exception
 {
 public:
diff --git a/libxml++/io/ostreamoutputbuffer.cc b/libxml++/io/ostreamoutputbuffer.cc
index b23a8b6..f8b7a7f 100644
--- a/libxml++/io/ostreamoutputbuffer.cc
+++ b/libxml++/io/ostreamoutputbuffer.cc
@@ -21,7 +21,7 @@ namespace xmlpp
   OStreamOutputBuffer::~OStreamOutputBuffer()
   {
   }
-  
+
   bool OStreamOutputBuffer::do_write(
       const char * buffer,
       int len)
diff --git a/libxml++/keepblanks.cc b/libxml++/keepblanks.cc
index a91f2a6..b49b3cf 100644
--- a/libxml++/keepblanks.cc
+++ b/libxml++/keepblanks.cc
@@ -15,7 +15,7 @@ namespace xmlpp
 #if _MSC_VER == 1200 // detect MSVC 6.0
       const bool KeepBlanks::Default = true;
 #endif
-         
+
   KeepBlanks::KeepBlanks(bool value)
   {
     oldIndentTreeOutput_ = xmlIndentTreeOutput;
diff --git a/libxml++/nodes/cdatanode.cc b/libxml++/nodes/cdatanode.cc
index 167d5af..12a0e84 100644
--- a/libxml++/nodes/cdatanode.cc
+++ b/libxml++/nodes/cdatanode.cc
@@ -10,7 +10,7 @@
 
 namespace xmlpp
 {
-  
+
 CdataNode::CdataNode(xmlNode* node)
 : ContentNode(node)
 {}
diff --git a/libxml++/nodes/contentnode.cc b/libxml++/nodes/contentnode.cc
index 7153c3c..7a0ff57 100644
--- a/libxml++/nodes/contentnode.cc
+++ b/libxml++/nodes/contentnode.cc
@@ -11,7 +11,7 @@
 
 namespace xmlpp
 {
-  
+
 ContentNode::ContentNode(xmlNode* node)
 : Node(node)
 {}
@@ -34,7 +34,7 @@ void ContentNode::set_content(const Glib::ustring& content)
    if(cobj()->type == XML_ELEMENT_NODE)
    {
      throw internal_error("can't set content for this node type");
-   }   
+   }
 
    xmlNodeSetContent(cobj(), (xmlChar*)content.c_str());
 }
diff --git a/libxml++/nodes/element.cc b/libxml++/nodes/element.cc
index c03dee6..d3d3dd8 100644
--- a/libxml++/nodes/element.cc
+++ b/libxml++/nodes/element.cc
@@ -151,7 +151,7 @@ Element* Element::add_child_element(const Glib::ustring& name,
   return add_child_element_common(name, child, node);
 }
 
-Element* Element::add_child_element(xmlpp::Node* previous_sibling, 
+Element* Element::add_child_element(xmlpp::Node* previous_sibling,
   const Glib::ustring& name, const Glib::ustring& ns_prefix)
 {
   if (!previous_sibling)
@@ -162,7 +162,7 @@ Element* Element::add_child_element(xmlpp::Node* previous_sibling,
   return add_child_element_common(name, child, node);
 }
 
-Element* Element::add_child_element_before(xmlpp::Node* next_sibling, 
+Element* Element::add_child_element_before(xmlpp::Node* next_sibling,
   const Glib::ustring& name, const Glib::ustring& ns_prefix)
 {
   if (!next_sibling)
@@ -381,20 +381,20 @@ void Element::set_namespace_declaration(const Glib::ustring& ns_uri, const Glib:
 Glib::ustring Element::get_namespace_uri_for_prefix(const Glib::ustring& ns_prefix) const
 {
   Glib::ustring result;
-  
+
   //Find the namespace:
   const auto ns = xmlSearchNs( cobj()->doc, const_cast<xmlNode*>(cobj()), (xmlChar*)ns_prefix.c_str() );
   //Get the namespace URI associated with this prefix:
   if (ns && ns->href)
     result = (const char*)ns->href;
-  
+
   return result;
 }
 
 CommentNode* Element::add_child_comment(const Glib::ustring& content)
 {
   auto child = xmlNewComment((const xmlChar*)content.c_str());
- 
+
   // Use the result, because child can be freed when merging text nodes:
   auto node = xmlAddChild(cobj(), child);
   if (!node)
diff --git a/libxml++/nodes/entityreference.cc b/libxml++/nodes/entityreference.cc
index 3c35405..3f83c01 100644
--- a/libxml++/nodes/entityreference.cc
+++ b/libxml++/nodes/entityreference.cc
@@ -10,7 +10,7 @@
 
 namespace xmlpp
 {
-  
+
 EntityReference::EntityReference(xmlNode* node)
 : Node(node)
 {}
@@ -31,7 +31,7 @@ Glib::ustring EntityReference::get_resolved_text() const
       if(pch)
         result = (const char*)pch;
   }
-      
+
   return result;
 }
 
diff --git a/libxml++/nodes/node.cc b/libxml++/nodes/node.cc
index 71eab85..46d202e 100644
--- a/libxml++/nodes/node.cc
+++ b/libxml++/nodes/node.cc
@@ -111,9 +111,9 @@ Tvector find_common(const Glib::ustring& xpath,
         std::cerr << "Node::find(): Ignoring an xmlNs object." << std::endl;
         continue;
       }
-      
+
       //TODO: Check for other cnode->type values?
-  
+
       nodes.push_back(_convert_node(cnode));
     }
   }
@@ -284,7 +284,7 @@ Node* Node::get_first_child(const Glib::ustring& name)
       return _convert_node(child);
   }
   while((child = child->next));
-   
+
   return nullptr;
 }
 
@@ -610,7 +610,7 @@ void Node::free_wrappers(xmlNode* node)
 {
   if(!node)
     return;
-    
+
   //If an entity declaration contains an entity reference, there can be cyclic
   //references between entity declarations and entity references. (It's not
   //a tree.) We must avoid an infinite recursion.
@@ -648,9 +648,9 @@ void Node::free_wrappers(xmlNode* node)
   }
 
   //Walk the attributes list.
-  //Note that some "derived" struct have a different layout, so 
+  //Note that some "derived" struct have a different layout, so
   //_xmlNode::properties would be a nonsense value, leading to crashes,
-  //(and shown as valgrind warnings), so we return above, to avoid 
+  //(and shown as valgrind warnings), so we return above, to avoid
   //checking it here.
   for(auto attr = node->properties; attr; attr = attr->next)
     free_wrappers(reinterpret_cast<xmlNode*>(attr));
diff --git a/libxml++/nodes/node.h b/libxml++/nodes/node.h
index 577505d..8e56348 100644
--- a/libxml++/nodes/node.h
+++ b/libxml++/nodes/node.h
@@ -98,36 +98,36 @@ public:
    * @returns The line number.
    */
   int get_line() const;
-  
+
   /** Get the parent element for this node.
    * @returns The parent node, or <tt>nullptr</tt> if the node has no parent element.
    */
-  const Element* get_parent() const;  
+  const Element* get_parent() const;
 
   /** Get the parent element for this node.
    * @returns The parent node, or <tt>nullptr</tt> if the node has no parent element.
    */
-  Element* get_parent();  
+  Element* get_parent();
 
   /** Get the next sibling for this node.
    * @returns The next sibling, or <tt>nullptr</tt> if the node has no next sibling.
    */
-  const Node* get_next_sibling() const;  
+  const Node* get_next_sibling() const;
 
   /** Get the next sibling for this node.
    * @returns The next sibling, or <tt>nullptr</tt> if the node has no next sibling.
    */
-  Node* get_next_sibling();  
+  Node* get_next_sibling();
 
   /** Get the previous sibling for this node .
    * @returns The previous sibling, or <tt>nullptr</tt> if the node has no previous sibling.
    */
-  const Node* get_previous_sibling() const;  
+  const Node* get_previous_sibling() const;
 
   /** Get the previous sibling for this node.
    * @returns The previous sibling, or <tt>nullptr</tt> if the node has no previous sibling.
    */
-  Node* get_previous_sibling();  
+  Node* get_previous_sibling();
 
   /** Get the first child of this node.
    * You may optionally get the first child node which has a certain name.
@@ -186,7 +186,7 @@ public:
    */
   Node* import_node(const Node* node, bool recursive = true);
 
-  
+
   /** Get the XPath of this node.
    * @result The XPath of the node.
    */
@@ -328,15 +328,15 @@ public:
    * @param node A pointer to an xmlNode or a "derived" struct, such as xmlDoc, xmlAttr, etc.
    */
   static void create_wrapper(_xmlNode* node);
-  
-  /** Delete the C++ instance for a given libxml C struct instance, and also 
+
+  /** Delete the C++ instance for a given libxml C struct instance, and also
    * recursively destroy the C++ instances for any children.
    *
    * This is only for use by the libxml++ implementation.
    * @param node A pointer to an xmlNode or a "derived" struct, such as xmlDoc, xmlAttr, etc.
    */
   static void free_wrappers(_xmlNode* node);
-  
+
 private:
   _xmlNode* impl_;
 };
diff --git a/libxml++/nodes/processinginstructionnode.cc b/libxml++/nodes/processinginstructionnode.cc
index 9c3d394..8c033bb 100644
--- a/libxml++/nodes/processinginstructionnode.cc
+++ b/libxml++/nodes/processinginstructionnode.cc
@@ -10,7 +10,7 @@
 
 namespace xmlpp
 {
-  
+
 ProcessingInstructionNode::ProcessingInstructionNode(xmlNode* node)
 : ContentNode(node)
 {}
@@ -19,4 +19,3 @@ ProcessingInstructionNode::~ProcessingInstructionNode()
 {}
 
 } //namespace xmlpp
-
diff --git a/libxml++/nodes/textnode.cc b/libxml++/nodes/textnode.cc
index d76a062..f686fb2 100644
--- a/libxml++/nodes/textnode.cc
+++ b/libxml++/nodes/textnode.cc
@@ -10,7 +10,7 @@
 
 namespace xmlpp
 {
-  
+
 TextNode::TextNode(xmlNode* node)
 : ContentNode(node)
 {}
diff --git a/libxml++/parsers/domparser.cc b/libxml++/parsers/domparser.cc
index 8ca3e7f..329bae5 100644
--- a/libxml++/parsers/domparser.cc
+++ b/libxml++/parsers/domparser.cc
@@ -34,7 +34,7 @@ DomParser::DomParser(const std::string& filename, bool validate)
 }
 
 DomParser::~DomParser()
-{ 
+{
   release_underlying();
 }
 
diff --git a/libxml++/parsers/domparser.h b/libxml++/parsers/domparser.h
index 63010cc..a608739 100644
--- a/libxml++/parsers/domparser.h
+++ b/libxml++/parsers/domparser.h
@@ -25,7 +25,7 @@ public:
 
   /** Instantiate the parser and parse a document immediately.
    * @param filename The path to the file.
-   * @param validate Whether the parser should validate the XML.             
+   * @param validate Whether the parser should validate the XML.
    * @throws xmlpp::internal_error
    * @throws xmlpp::parse_error
    * @throws xmlpp::validity_error
@@ -52,7 +52,7 @@ public:
    * @throws xmlpp::validity_error
    */
   void parse_memory(const Glib::ustring& contents) override;
-  
+
   /** Parse an XML document from raw memory.
    * If the parser already contains a document, that document and all its nodes
    * are deleted.
@@ -77,7 +77,7 @@ public:
   /** Test whether a document has been parsed.
    */
   operator bool() const;
-  
+
   /** Get the parsed document.
    * @returns A pointer to the parsed document, or <tt>nullptr</tt>.
    */
@@ -87,12 +87,12 @@ public:
    * @returns A pointer to the parsed document, or <tt>nullptr</tt>.
    */
   const Document* get_document() const;
-  
+
 protected:
   void parse_context();
 
   void release_underlying() override;
-  
+
   Document* doc_;
 };
 
diff --git a/libxml++/parsers/parser.cc b/libxml++/parsers/parser.cc
index 503987a..d4ecdc6 100644
--- a/libxml++/parsers/parser.cc
+++ b/libxml++/parsers/parser.cc
@@ -158,7 +158,7 @@ void Parser::release_underlying()
   if(context_)
   {
     context_->_private = nullptr; //Not really necessary.
-    
+
     if( context_->myDoc != nullptr )
     {
       xmlFreeDoc(context_->myDoc);
@@ -231,7 +231,7 @@ void Parser::check_for_error_and_warning_messages()
   else if (parser_msg)
     exception_.reset(new parse_error(msg));
 }
-  
+
 //static
 void Parser::callback_parser_error(void* ctx, const char* msg, ...)
 {
@@ -273,7 +273,7 @@ void Parser::callback_error_or_warning(MsgType msg_type, void* ctx,
                                        const char* msg, va_list var_args)
 {
   //See xmlHTMLValidityError() in xmllint.c in libxml for more about this:
-  
+
   auto context = (xmlParserCtxtPtr)ctx;
   if(context)
   {
@@ -354,7 +354,7 @@ void Parser::handle_exception()
 void Parser::check_for_exception()
 {
   check_for_error_and_warning_messages();
-  
+
   if (exception_)
   {
     std::unique_ptr<exception> tmp(std::move(exception_));
diff --git a/libxml++/parsers/parser.h b/libxml++/parsers/parser.h
index 71e65a2..a101d60 100644
--- a/libxml++/parsers/parser.h
+++ b/libxml++/parsers/parser.h
@@ -150,7 +150,7 @@ public:
    * @param bytes_count The number of bytes in the @a contents array.
    */
   virtual void parse_memory_raw(const unsigned char* contents, size_type bytes_count) = 0;
-  
+
   /** Parse an XML document from a string.
    * @throw exception
    * @param contents The XML document as a string.
diff --git a/libxml++/parsers/saxparser.cc b/libxml++/parsers/saxparser.cc
index 473f90d..4ce408b 100644
--- a/libxml++/parsers/saxparser.cc
+++ b/libxml++/parsers/saxparser.cc
@@ -94,7 +94,7 @@ xmlEntityPtr SaxParser::on_get_entity(const Glib::ustring& name)
 void SaxParser::on_entity_declaration(const Glib::ustring& name, XmlEntityType type, const Glib::ustring& 
publicId, const Glib::ustring& systemId, const Glib::ustring& content)
 {
   entity_resolver_doc_->set_entity_declaration(name, type, publicId, systemId, content);
-}  
+}
 
 void SaxParser::on_start_document()
 {
@@ -159,7 +159,7 @@ void SaxParser::parse()
 
   xmlResetLastError();
   initialize_context();
-  
+
   const int parseError = xmlParseDocument(context_);
 
   context_->sax = old_sax;
@@ -203,7 +203,7 @@ void SaxParser::parse_memory_raw(const unsigned char* contents, size_type bytes_
   context_ = xmlCreateMemoryParserCtxt((const char*)contents, bytes_count);
   parse();
 }
-  
+
 void SaxParser::parse_memory(const Glib::ustring& contents)
 {
   parse_memory_raw((const unsigned char*)contents.c_str(), contents.bytes());
@@ -306,7 +306,7 @@ void SaxParser::parse_chunk_raw(const unsigned char* contents, size_type bytes_c
   }
   else
     xmlCtxtResetLastError(context_);
-  
+
   int parseError = XML_ERR_OK;
   if (!exception_)
     parseError = xmlParseChunk(context_, (const char*)contents, bytes_count, 0 /* don't terminate */);
@@ -609,7 +609,7 @@ void SaxParserCallback::internal_subset(void* context, const xmlChar* name,
 {
   auto the_context = static_cast<_xmlParserCtxt*>(context);
   auto parser = static_cast<SaxParser*>(the_context->_private);
-  
+
   try
   {
     const auto pid = publicId ? Glib::ustring((const char*) publicId) : "";
diff --git a/libxml++/parsers/saxparser.h b/libxml++/parsers/saxparser.h
index cba267b..0fe462d 100644
--- a/libxml++/parsers/saxparser.h
+++ b/libxml++/parsers/saxparser.h
@@ -53,7 +53,7 @@ public:
 
   /** This functor is a helper to find an attribute by name in an
    * AttributeList using the standard algorithm std::find_if
-   * 
+   *
    * Example:@n
    * <code>
    *   Glib::ustring name = "foo";@n
@@ -74,8 +74,8 @@ public:
       return attribute.name == name;
     }
   };
-  
-  /** 
+
+  /**
    * @param use_get_entity Set this to true if you will override on_get_entity().
    * In theory, if you do not override on_get_entity() the parser should behave exactly the same
    * whether you use true or false here. But the default implementation of on_get_entity(), needed
@@ -117,7 +117,7 @@ public:
    * @throws xmlpp::validity_error
    */
   void parse_stream(std::istream& in) override;
-  
+
   /** Parse a chunk of data.
    *
    * This lets you pass a document in small chunks, e.g. from a network
@@ -164,7 +164,7 @@ public:
   void finish_chunk_parsing();
 
 protected:
-        
+
   virtual void on_start_document();
   virtual void on_end_document();
   virtual void on_start_element(const Glib::ustring& name, const AttributeList& attributes);
@@ -215,10 +215,10 @@ protected:
 
   void release_underlying() override;
   void initialize_context() override;
-  
+
 private:
   void parse();
-  
+
   std::unique_ptr<_xmlSAXHandler> sax_handler_;
 
   // A separate xmlpp::Document that is just used for entity resolution,
diff --git a/libxml++/parsers/textreader.cc b/libxml++/parsers/textreader.cc
index 223dd9a..01ff921 100644
--- a/libxml++/parsers/textreader.cc
+++ b/libxml++/parsers/textreader.cc
@@ -8,7 +8,7 @@
 
 namespace xmlpp
 {
-  
+
 class TextReader::PropertyReader
 {
 public:
@@ -34,10 +34,10 @@ TextReader::TextReader(
 }
 
 TextReader::TextReader(
-       const unsigned char* data, 
+       const unsigned char* data,
        size_type size,
        const Glib::ustring& uri)
-       : propertyreader(new PropertyReader(*this)), 
+       : propertyreader(new PropertyReader(*this)),
          impl_( xmlReaderForMemory ((const char*)data, size, uri.c_str(), nullptr, 0) ),
     severity_( 0 )
 {
@@ -299,7 +299,7 @@ Node* TextReader::get_current_node()
     Node::create_wrapper(node);
     return static_cast<Node*>(node->_private);
   }
-    
+
   check_for_exceptions();
   return nullptr;
 }
@@ -327,7 +327,7 @@ Node* TextReader::expand()
     Node::create_wrapper(node);
     return static_cast<Node*>(node->_private);
   }
-    
+
   check_for_exceptions();
   return nullptr;
 }
@@ -347,7 +347,7 @@ bool TextReader::is_valid() const
 void TextReader::setup_exceptions()
 {
   xmlTextReaderErrorFunc func = nullptr;
-  void* arg = nullptr; 
+  void* arg = nullptr;
 
   // We respect any other error handlers already setup:
   xmlTextReaderGetErrorHandler(impl_, &func, &arg);
@@ -369,7 +369,7 @@ void TextReader::check_for_exceptions() const
 {
   if( severity_ == 0 )
     return;
-    
+
   auto ths = const_cast<TextReader*>(this);
 
   int severity = severity_;
@@ -393,7 +393,7 @@ bool TextReader::PropertyReader::Bool(int value)
 {
   if(value == -1)
     owner_.check_for_exceptions();
-    
+
   return value > 0;
 }
 
@@ -406,10 +406,10 @@ char TextReader::PropertyReader::Char(int value)
 Glib::ustring TextReader::PropertyReader::String(xmlChar* value, bool free)
 {
   owner_.check_for_exceptions();
-  
+
   if (!value)
     return Glib::ustring();
-    
+
   const Glib::ustring result = (char *)value;
 
   if(free)
diff --git a/libxml++/relaxngschema.cc b/libxml++/relaxngschema.cc
index 02a2f16..36a65b9 100644
--- a/libxml++/relaxngschema.cc
+++ b/libxml++/relaxngschema.cc
@@ -49,7 +49,7 @@ struct RelaxNGSchema::Impl
   _xmlRelaxNG* schema;
 };
 
-  
+
 RelaxNGSchema::RelaxNGSchema()
 : pimpl_(new Impl)
 {
@@ -104,7 +104,7 @@ void RelaxNGSchema::parse_context(_xmlRelaxNGParserCtxt* context)
 
   if (!context)
     throw parse_error("RelaxNGSchema::parse_context(): Could not create parser context.\n" + 
format_xml_error());
-  
+
   RelaxNGSchemaParserContextHolder holder(context);
 
   pimpl_->schema = xmlRelaxNGParse(context);
diff --git a/libxml++/validators/validator.cc b/libxml++/validators/validator.cc
index 69d0276..e91a2f6 100644
--- a/libxml++/validators/validator.cc
+++ b/libxml++/validators/validator.cc
@@ -159,7 +159,7 @@ void Validator::handle_exception()
 void Validator::check_for_exception()
 {
   check_for_validity_messages();
-  
+
   if (exception_)
   {
     std::unique_ptr<exception> tmp(std::move(exception_));
diff --git a/libxml++/xsdschema.cc b/libxml++/xsdschema.cc
index 1bcd943..2357e87 100644
--- a/libxml++/xsdschema.cc
+++ b/libxml++/xsdschema.cc
@@ -48,7 +48,7 @@ struct XsdSchema::Impl
   _xmlDoc* document;
 };
 
-  
+
 XsdSchema::XsdSchema()
 : pimpl_(new Impl)
 {
@@ -111,7 +111,7 @@ void XsdSchema::parse_context(_xmlSchemaParserCtxt* context)
 {
   if (!context)
     throw parse_error("XsdSchema::parse_context(): Could not create parser context.\n" + format_xml_error());
-  
+
   XsdSchemaParserContextHolder holder(context);
 
   pimpl_->schema = xmlSchemaParse(context);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]