Index: lemon/lemon_writer.h
===================================================================
--- lemon/lemon_writer.h	(revision 1875)
+++ lemon/lemon_writer.h	(revision 1901)
@@ -47,19 +47,19 @@
     
     template <typename Item>
-    class ItemIdWriter {
+    class ItemLabelWriter {
     public:
 
-      bool isIdWriter() { return true; }
-
-      void writeId(std::ostream&, const Item&) {}
+      bool isLabelWriter() { return true; }
+
+      void writeLabel(std::ostream&, const Item&) {}
       
-      template <class _ItemIdWriter>
+      template <class _ItemLabelWriter>
       struct Constraints {
 	void constraints() {
-	  bool b = writer.isIdWriter();
+	  bool b = writer.isLabelWriter();
 	  ignore_unused_variable_warning(b);
-	  writer.writeId(os, item);
+	  writer.writeLabel(os, item);
 	}
-	_ItemIdWriter& writer;
+	_ItemLabelWriter& writer;
 	std::ostream& os;
 	const Item& item;
@@ -226,29 +226,29 @@
 
     template <typename _Item>
-    class IdWriterBase {
+    class LabelWriterBase {
     public:
       typedef _Item Item;
-      virtual ~IdWriterBase() {}
+      virtual ~LabelWriterBase() {}
       virtual void write(std::ostream&, const Item&) const = 0;
-      virtual bool isIdWriter() const = 0;
-    };
-
-    template <typename _Item, typename _BoxedIdWriter>
-    class IdWriter : public IdWriterBase<_Item> {
+      virtual bool isLabelWriter() const = 0;
+    };
+
+    template <typename _Item, typename _BoxedLabelWriter>
+    class LabelWriter : public LabelWriterBase<_Item> {
     public:
       typedef _Item Item;
-      typedef _BoxedIdWriter BoxedIdWriter;
-
-      const BoxedIdWriter& idWriter;
-
-      IdWriter(const BoxedIdWriter& _idWriter) 
-	: idWriter(_idWriter) {}
+      typedef _BoxedLabelWriter BoxedLabelWriter;
+
+      const BoxedLabelWriter& labelWriter;
+
+      LabelWriter(const BoxedLabelWriter& _labelWriter) 
+	: labelWriter(_labelWriter) {}
 
       virtual void write(std::ostream& os, const Item& item) const {
-	idWriter.writeId(os, item);
-      }
-
-      virtual bool isIdWriter() const {
-	return idWriter.isIdWriter();
+	labelWriter.writeLabel(os, item);
+      }
+
+      virtual bool isLabelWriter() const {
+	return labelWriter.isLabelWriter();
       }
     };
@@ -375,6 +375,6 @@
   ///
   /// The lemon format can store multiple graph nodesets with several maps.
-  /// The nodeset section's header line is \c \@nodeset \c nodeset_id, but the
-  /// \c nodeset_id may be empty.
+  /// The nodeset section's header line is \c \@nodeset \c nodeset_name, but 
+  /// the \c nodeset_name may be empty.
   ///
   /// The first line of the section contains the names of the maps separated
@@ -382,9 +382,9 @@
   /// contains the mapped values for each map.
   ///
-  /// If the nodeset contains an \c "id" named map then it will be regarded
-  /// as id map. This map should contain only unique values and when the 
-  /// \c writeId() member will be called with a node it will write it's id.
-  /// Otherwise if the \c _forceIdMap constructor parameter is true then
-  /// the id map will be the id in the graph.
+  /// If the nodeset contains an \c "label" named map then it will be regarded
+  /// as label map. This map should contain only unique values and when the 
+  /// \c writeLabel() member will be called with a node it will write it's 
+  /// label. Otherwise if the \c _forceLabelMap constructor parameter is true 
+  /// then the label map will be the id in the graph.
   ///
   /// \relates LemonWriter
@@ -401,12 +401,12 @@
     ///
     /// Constructor for NodeSetWriter. It creates the NodeSetWriter and
-    /// attach it into the given LemonWriter. If the \c _forceIdMap
-    /// parameter is true then the writer will write own id map when
-    /// the user does not give "id" named map.
+    /// attach it into the given LemonWriter. If the \c _forceLabelMap
+    /// parameter is true then the writer will write own label map when
+    /// the user does not give "label" named map.
     NodeSetWriter(LemonWriter& _writer, const Graph& _graph, 
-		  const std::string& _id = std::string(), 
-		  bool _forceIdMap = true) 
-      : Parent(_writer), idMap(0), forceIdMap(_forceIdMap), 
-	graph(_graph), id(_id) {}
+		  const std::string& _name = std::string(), 
+		  bool _forceLabelMap = true) 
+      : Parent(_writer), labelMap(0), forceLabelMap(_forceLabelMap), 
+	graph(_graph), name(_name) {}
 
     /// \brief Destructor.
@@ -455,5 +455,5 @@
     /// It gives back the header of the section.
     virtual std::string header() {
-      return "@nodeset " + id;
+      return "@nodeset " + name;
     }
 
@@ -463,12 +463,12 @@
     virtual void write(std::ostream& os) {
       for (int i = 0; i < (int)writers.size(); ++i) {
-	if (writers[i].first == "id") {
-	  idMap = writers[i].second;
-	  forceIdMap = false;
+	if (writers[i].first == "label" || (writers[i].first == "id" && labelMap == 0)) {
+	  labelMap = writers[i].second;
+	  forceLabelMap = false;
 	  break;
 	}
       }
-      if (forceIdMap) {
-	os << "id\t";
+      if (forceLabelMap) {
+	os << "label\t";
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
@@ -477,5 +477,5 @@
       os << std::endl;
       for (typename Graph::NodeIt it(graph); it != INVALID; ++it) {
-	if (forceIdMap) {
+	if (forceLabelMap) {
 	  os << graph.id(it) << '\t';
 	}
@@ -490,24 +490,24 @@
   public:
 
-    /// \brief Returns true if the nodeset can write the ids of the nodes.
-    ///
-    /// Returns true if the nodeset can write the ids of the nodes.
-    /// It is possible only if an "id" named map was written or the 
-    /// \c _forceIdMap constructor parameter was true.
-    bool isIdWriter() const {
-      return idMap != 0 || forceIdMap;
-    }
-
-    /// \brief Write the id of the given node.
-    ///
-    /// It writes the id of the given node. If there was written an "id"
+    /// \brief Returns true if the nodeset can write the labels of the nodes.
+    ///
+    /// Returns true if the nodeset can write the labels of the nodes.
+    /// It is possible only if an "label" named map was written or the 
+    /// \c _forceLabelMap constructor parameter was true.
+    bool isLabelWriter() const {
+      return labelMap != 0 || forceLabelMap;
+    }
+
+    /// \brief Write the label of the given node.
+    ///
+    /// It writes the label of the given node. If there was written an "label"
     /// named map then it will write the map value belongs to the node.
-    /// Otherwise if the \c forceId parameter was true it will write
-    /// its id in the graph. 
-    void writeId(std::ostream& os, const Node& item) const {
-      if (forceIdMap) {
+    /// Otherwise if the \c forceLabel parameter was true it will write
+    /// its label in the graph. 
+    void writeLabel(std::ostream& os, const Node& item) const {
+      if (forceLabelMap) {
 	os << graph.id(item);
       } else {
-	idMap->write(os, item);
+	labelMap->write(os, item);
       }
     }
@@ -519,9 +519,9 @@
     MapWriters writers;
 
-    _writer_bits::MapWriterBase<Node>* idMap;
-    bool forceIdMap;
+    _writer_bits::MapWriterBase<Node>* labelMap;
+    bool forceLabelMap;
    
     const Graph& graph;   
-    std::string id;
+    std::string name;
 
   };
@@ -531,20 +531,20 @@
   ///
   /// The lemon format can store multiple graph edgesets with several maps. 
-  /// The edgeset section's header line is \c \@edgeset \c edgeset_id, but the
-  /// \c edgeset_id may be empty.
+  /// The edgeset section's header line is \c \@edgeset \c edgeset_name, but 
+  /// the \c edgeset_name may be empty.
   ///
   /// The first line of the section contains the names of the maps separated
   /// with white spaces. Each next lines describes a edge in the edgeset. The
-  /// line contains the source and the target nodes' id and the mapped 
+  /// line contains the source and the target nodes' label and the mapped 
   /// values for each map.
   ///
-  /// If the edgeset contains an \c "id" named map then it will be regarded
-  /// as id map. This map should contain only unique values and when the 
-  /// \c writeId() member will be called with an edge it will write it's id.
-  /// Otherwise if the \c _forceIdMap constructor parameter is true then
-  /// the id map will be the id in the graph.
-  ///
-  /// The edgeset writer needs a node id writer to identify which nodes
-  /// have to be connected. If a NodeSetWriter can write the nodes' id,
+  /// If the edgeset contains an \c "label" named map then it will be regarded
+  /// as label map. This map should contain only unique values and when the 
+  /// \c writeLabel() member will be called with an edge it will write it's 
+  /// label. Otherwise if the \c _forceLabelMap constructor parameter is true 
+  /// then the label map will be the id in the graph.
+  ///
+  /// The edgeset writer needs a node label writer to identify which nodes
+  /// have to be connected. If a NodeSetWriter can write the nodes' label,
   /// it will be able to use with this class.
   ///
@@ -563,18 +563,18 @@
     ///
     /// Constructor for EdgeSetWriter. It creates the EdgeSetWriter and
-    /// attach it into the given LemonWriter. It will write node ids by
-    /// the \c _nodeIdWriter. If the \c _forceIdMap parameter is true 
-    /// then the writer will write own id map if the user does not give 
-    /// "id" named map.
-    template <typename NodeIdWriter>
+    /// attach it into the given LemonWriter. It will write node labels by
+    /// the \c _nodeLabelWriter. If the \c _forceLabelMap parameter is true 
+    /// then the writer will write own label map if the user does not give 
+    /// "label" named map.
+    template <typename NodeLabelWriter>
     EdgeSetWriter(LemonWriter& _writer, const Graph& _graph, 
-		  const NodeIdWriter& _nodeIdWriter, 
-		  const std::string& _id = std::string(),
-		  bool _forceIdMap = true)
-      : Parent(_writer), idMap(0), forceIdMap(_forceIdMap),
-	graph(_graph), id(_id) {
-      checkConcept<_writer_bits::ItemIdWriter<Node>, NodeIdWriter>();
-      nodeIdWriter.reset(new _writer_bits::
-			 IdWriter<Node, NodeIdWriter>(_nodeIdWriter));
+		  const NodeLabelWriter& _nodeLabelWriter, 
+		  const std::string& _name = std::string(),
+		  bool _forceLabelMap = true)
+      : Parent(_writer), labelMap(0), forceLabelMap(_forceLabelMap),
+	graph(_graph), name(_name) {
+      checkConcept<_writer_bits::ItemLabelWriter<Node>, NodeLabelWriter>();
+      nodeLabelWriter.reset(new _writer_bits::
+			 LabelWriter<Node, NodeLabelWriter>(_nodeLabelWriter));
     } 
 
@@ -624,5 +624,5 @@
     /// It gives back the header of the section.
     virtual std::string header() {
-      return "@edgeset " + id;
+      return "@edgeset " + name;
     }
 
@@ -631,17 +631,17 @@
     /// Write the content of the section.
     virtual void write(std::ostream& os) {
-      if (!nodeIdWriter->isIdWriter()) {
-	throw DataFormatError("Cannot find nodeset or ID map");
+      if (!nodeLabelWriter->isLabelWriter()) {
+	throw DataFormatError("Cannot find nodeset or label map");
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
-	if (writers[i].first == "id") {
-	  idMap = writers[i].second;
-	  forceIdMap = false;
+	if (writers[i].first == "label" || (writers[i].first == "id" && labelMap == 0)) {
+	  labelMap = writers[i].second;
+	  forceLabelMap = false;
 	  break;
 	}
       }
       os << "\t\t";
-      if (forceIdMap) {
-	os << "id\t";
+      if (forceLabelMap) {
+	os << "label\t";
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
@@ -650,9 +650,9 @@
       os << std::endl;
       for (typename Graph::EdgeIt it(graph); it != INVALID; ++it) {
-	nodeIdWriter->write(os, graph.source(it));
+	nodeLabelWriter->write(os, graph.source(it));
 	os << '\t';
-	nodeIdWriter->write(os, graph.target(it));
+	nodeLabelWriter->write(os, graph.target(it));
 	os << '\t';
-	if (forceIdMap) {
+	if (forceLabelMap) {
 	  os << graph.id(it) << '\t';
 	}
@@ -667,24 +667,24 @@
   public:
 
-    /// \brief Returns true if the edgeset can write the ids of the edges.
-    ///
-    /// Returns true if the edgeset can write the ids of the edges.
-    /// It is possible only if an "id" named map was written or the 
-    /// \c _forceIdMap constructor parameter was true.
-    bool isIdWriter() const {
-      return forceIdMap || idMap != 0;
-    }
-
-    /// \brief Write the id of the given edge.
-    ///
-    /// It writes the id of the given edge. If there was written an "id"
+    /// \brief Returns true if the edgeset can write the labels of the edges.
+    ///
+    /// Returns true if the edgeset can write the labels of the edges.
+    /// It is possible only if an "label" named map was written or the 
+    /// \c _forceLabelMap constructor parameter was true.
+    bool isLabelWriter() const {
+      return forceLabelMap || labelMap != 0;
+    }
+
+    /// \brief Write the label of the given edge.
+    ///
+    /// It writes the label of the given edge. If there was written an "label"
     /// named map then it will write the map value belongs to the edge.
-    /// Otherwise if the \c forceId parameter was true it will write
-    /// its id in the graph. 
-    void writeId(std::ostream& os, const Edge& item) const {
-      if (forceIdMap) {
+    /// Otherwise if the \c forceLabel parameter was true it will write
+    /// its label in the graph. 
+    void writeLabel(std::ostream& os, const Edge& item) const {
+      if (forceLabelMap) {
 	os << graph.id(item);
       } else {
-	idMap->write(os, item);
+	labelMap->write(os, item);
       }
     } 
@@ -696,11 +696,11 @@
     MapWriters writers;
 
-    _writer_bits::MapWriterBase<Edge>* idMap;
-    bool forceIdMap;
+    _writer_bits::MapWriterBase<Edge>* labelMap;
+    bool forceLabelMap;
    
     const Graph& graph;   
-    std::string id;
-
-    std::auto_ptr<_writer_bits::IdWriterBase<Node> > nodeIdWriter;
+    std::string name;
+
+    std::auto_ptr<_writer_bits::LabelWriterBase<Node> > nodeLabelWriter;
   };
 
@@ -710,9 +710,9 @@
   /// The lemon format can store multiple undirected edgesets with several 
   /// maps. The undirected edgeset section's header line is \c \@undiredgeset 
-  /// \c undiredgeset_id, but the \c undiredgeset_id may be empty.
+  /// \c undiredgeset_name, but the \c undiredgeset_name may be empty.
   ///
   /// The first line of the section contains the names of the maps separated
   /// with white spaces. Each next lines describes an undirected edge in the 
-  /// edgeset. The line contains the two connected nodes' id and the mapped 
+  /// edgeset. The line contains the two connected nodes' label and the mapped 
   /// values for each undirected map.
   ///
@@ -723,13 +723,13 @@
   /// difference.
   ///
-  /// If the edgeset contains an \c "id" named map then it will be regarded
-  /// as id map. This map should contain only unique values and when the 
-  /// \c writeId() member will be called with an undirected edge it will 
-  /// write it's id. Otherwise if the \c _forceIdMap constructor parameter
-  /// is true then the id map will be the id in the graph.
-  ///
-  /// The undirected edgeset writer needs a node id writer to identify 
+  /// If the edgeset contains an \c "label" named map then it will be regarded
+  /// as label map. This map should contain only unique values and when the 
+  /// \c writeLabel() member will be called with an undirected edge it will 
+  /// write it's label. Otherwise if the \c _forceLabelMap constructor 
+  /// parameter is true then the label map will be the id in the graph.
+  ///
+  /// The undirected edgeset writer needs a node label writer to identify 
   /// which nodes have to be connected. If a NodeSetWriter can write the 
-  /// nodes' id, it will be able to use with this class.
+  /// nodes' label, it will be able to use with this class.
   ///
   /// \relates LemonWriter
@@ -748,18 +748,18 @@
     ///
     /// Constructor for UndirEdgeSetWriter. It creates the UndirEdgeSetWriter
-    /// and attach it into the given LemonWriter. It will write node ids by
-    /// the \c _nodeIdWriter. If the \c _forceIdMap parameter is true 
-    /// then the writer will write own id map if the user does not give 
-    /// "id" named map.
-    template <typename NodeIdWriter>
+    /// and attach it into the given LemonWriter. It will write node labels by
+    /// the \c _nodeLabelWriter. If the \c _forceLabelMap parameter is true 
+    /// then the writer will write own label map if the user does not give 
+    /// "label" named map.
+    template <typename NodeLabelWriter>
     UndirEdgeSetWriter(LemonWriter& _writer, const Graph& _graph, 
-		       const NodeIdWriter& _nodeIdWriter, 
-		       const std::string& _id = std::string(),
-		       bool _forceIdMap = true)
-      : Parent(_writer), idMap(0), forceIdMap(_forceIdMap),
-	graph(_graph), id(_id) {
-      checkConcept<_writer_bits::ItemIdWriter<Node>, NodeIdWriter>();
-      nodeIdWriter.reset(new _writer_bits::
-			 IdWriter<Node, NodeIdWriter>(_nodeIdWriter));
+		       const NodeLabelWriter& _nodeLabelWriter, 
+		       const std::string& _name = std::string(),
+		       bool _forceLabelMap = true)
+      : Parent(_writer), labelMap(0), forceLabelMap(_forceLabelMap),
+	graph(_graph), name(_name) {
+      checkConcept<_writer_bits::ItemLabelWriter<Node>, NodeLabelWriter>();
+      nodeLabelWriter.reset(new _writer_bits::
+			 LabelWriter<Node, NodeLabelWriter>(_nodeLabelWriter));
     } 
 
@@ -833,5 +833,5 @@
     /// It gives back the header of the section.
     virtual std::string header() {
-      return "@undiredgeset " + id;
+      return "@undiredgeset " + name;
     }
 
@@ -840,17 +840,17 @@
     /// Write the content of the section.
     virtual void write(std::ostream& os) {
-      if (!nodeIdWriter->isIdWriter()) {
-	throw DataFormatError("Cannot find nodeset or ID map");
+      if (!nodeLabelWriter->isLabelWriter()) {
+	throw DataFormatError("Cannot find nodeset or label map");
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
-	if (writers[i].first == "id") {
-	  idMap = writers[i].second;
-	  forceIdMap = false;
+	if (writers[i].first == "label") {
+	  labelMap = writers[i].second;
+	  forceLabelMap = false;
 	  break;
 	}
       }
       os << "\t\t";
-      if (forceIdMap) {
-	os << "id\t";
+      if (forceLabelMap) {
+	os << "label\t";
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
@@ -859,9 +859,9 @@
       os << std::endl;
       for (typename Graph::UndirEdgeIt it(graph); it != INVALID; ++it) {
-	nodeIdWriter->write(os, graph.source(it));
+	nodeLabelWriter->write(os, graph.source(it));
 	os << '\t';
-	nodeIdWriter->write(os, graph.target(it));
+	nodeLabelWriter->write(os, graph.target(it));
 	os << '\t';
-	if (forceIdMap) {
+	if (forceLabelMap) {
 	  os << graph.id(it) << '\t';
 	}
@@ -876,36 +876,36 @@
   public:
 
-    /// \brief Returns true if the undirected edgeset can write the ids of 
+    /// \brief Returns true if the undirected edgeset can write the labels of 
     /// the edges.
     ///
-    /// Returns true if the undirected edgeset can write the ids of the 
-    /// undirected edges. It is possible only if an "id" named map was 
-    /// written or the \c _forceIdMap constructor parameter was true.
-    bool isIdWriter() const {
-      return forceIdMap || idMap != 0;
-    }
-
-    /// \brief Write the id of the given undirected edge.
-    ///
-    /// It writes the id of the given undirected edge. If there was written 
-    /// an "id" named map then it will write the map value belongs to the 
-    /// undirected edge. Otherwise if the \c forceId parameter was true it 
+    /// Returns true if the undirected edgeset can write the labels of the 
+    /// undirected edges. It is possible only if an "label" named map was 
+    /// written or the \c _forceLabelMap constructor parameter was true.
+    bool isLabelWriter() const {
+      return forceLabelMap || labelMap != 0;
+    }
+
+    /// \brief Write the label of the given undirected edge.
+    ///
+    /// It writes the label of the given undirected edge. If there was written 
+    /// an "label" named map then it will write the map value belongs to the 
+    /// undirected edge. Otherwise if the \c forceLabel parameter was true it 
     /// will write its id in the graph. 
-    void writeId(std::ostream& os, const UndirEdge& item) const {
-      if (forceIdMap) {
+    void writeLabel(std::ostream& os, const UndirEdge& item) const {
+      if (forceLabelMap) {
 	os << graph.id(item);
       } else {
-	idMap->write(os, item);
+	labelMap->write(os, item);
       }
     } 
 
-    /// \brief Write the id of the given edge.
-    ///
-    /// It writes the id of the given edge. If there was written 
-    /// an "id" named map then it will write the map value belongs to the 
-    /// edge. Otherwise if the \c forceId parameter was true it 
+    /// \brief Write the label of the given edge.
+    ///
+    /// It writes the label of the given edge. If there was written 
+    /// an "label" named map then it will write the map value belongs to the 
+    /// edge. Otherwise if the \c forceLabel parameter was true it 
     /// will write its id in the graph. If the edge is forward map
     /// then its prefix character is \c '+' elsewhere \c '-'.
-    void writeId(std::ostream& os, const Edge& item) const {
+    void writeLabel(std::ostream& os, const Edge& item) const {
       if (graph.direction(item)) {
 	os << "+ ";
@@ -913,8 +913,8 @@
 	os << "- ";
       }
-      if (forceIdMap) {
+      if (forceLabelMap) {
 	os << graph.id(item);
       } else {
-	idMap->write(os, item);
+	labelMap->write(os, item);
       }
     } 
@@ -926,21 +926,21 @@
     MapWriters writers;
 
-    _writer_bits::MapWriterBase<UndirEdge>* idMap;
-    bool forceIdMap;
+    _writer_bits::MapWriterBase<UndirEdge>* labelMap;
+    bool forceLabelMap;
    
     const Graph& graph;   
-    std::string id;
-
-    std::auto_ptr<_writer_bits::IdWriterBase<Node> > nodeIdWriter;
+    std::string name;
+
+    std::auto_ptr<_writer_bits::LabelWriterBase<Node> > nodeLabelWriter;
   };
 
   /// \ingroup io_group
-  /// \brief SectionWriter for writing labeled nodes.
-  ///
-  /// The nodes section's header line is \c \@nodes \c nodes_id, but the
-  /// \c nodes_id may be empty.
-  ///
-  /// Each line in the section contains the label of the node and 
-  /// then the node id. 
+  /// \brief SectionWriter for writing named nodes.
+  ///
+  /// The nodes section's header line is \c \@nodes \c nodes_name, but the
+  /// \c nodes_name may be empty.
+  ///
+  /// Each line in the section contains the name of the node and 
+  /// then the node label. 
   ///
   /// \relates LemonWriter
@@ -955,12 +955,13 @@
     ///
     /// Constructor for NodeWriter. It creates the NodeWriter and
-    /// attach it into the given LemonWriter. The given \c _IdWriter
-    /// will write the nodes' id what can be a nodeset writer.
-    template <typename _IdWriter>
-    NodeWriter(LemonWriter& _writer, const _IdWriter& _idWriter, 
-	       const std::string& _id = std::string()) 
-      : Parent(_writer), id(_id) {
-      checkConcept<_writer_bits::ItemIdWriter<Node>, _IdWriter>();
-      idWriter.reset(new _writer_bits::IdWriter<Node, _IdWriter>(_idWriter));
+    /// attach it into the given LemonWriter. The given \c _LabelWriter
+    /// will write the nodes' label what can be a nodeset writer.
+    template <typename _LabelWriter>
+    NodeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter, 
+	       const std::string& _name = std::string()) 
+      : Parent(_writer), name(_name) {
+      checkConcept<_writer_bits::ItemLabelWriter<Node>, _LabelWriter>();
+      labelWriter.reset(new _writer_bits::LabelWriter<Node, _LabelWriter>
+                        (_labelWriter));
     }
 
@@ -986,10 +987,9 @@
   protected:
 
-    /// \brief Header checking function.
-    ///
-    /// It gives back true when the header line start with \c \@nodes,
-    /// and the header line's id and the writer's id are the same.
+    /// \brief The header of the section.
+    ///
+    /// It gives back the header of the section.
     virtual std::string header() {
-      return "@nodes " + id;
+      return "@nodes " + name;
     }
 
@@ -998,10 +998,10 @@
     /// Write the content of the section.
     virtual void write(std::ostream& os) {
-      if (!idWriter->isIdWriter()) {
-	throw DataFormatError("Cannot find nodeset or ID map");
+      if (!labelWriter->isLabelWriter()) {
+	throw DataFormatError("Cannot find nodeset or label map");
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
 	os << writers[i].first << ' ';
-	idWriter->write(os, *(writers[i].second));
+	labelWriter->write(os, *(writers[i].second));
 	os << std::endl;
       }
@@ -1010,19 +1010,19 @@
   private:
 
-    std::string id;
+    std::string name;
 
     typedef std::vector<std::pair<std::string, const Node*> > NodeWriters;
     NodeWriters writers;
-    std::auto_ptr<_writer_bits::IdWriterBase<Node> > idWriter;
+    std::auto_ptr<_writer_bits::LabelWriterBase<Node> > labelWriter;
   };
 
   /// \ingroup io_group
-  /// \brief SectionWriter for writing labeled edges.
-  ///
-  /// The edges section's header line is \c \@edges \c edges_id, but the
-  /// \c edges_id may be empty.
-  ///
-  /// Each line in the section contains the label of the edge and 
-  /// then the edge id. 
+  /// \brief SectionWriter for writing named edges.
+  ///
+  /// The edges section's header line is \c \@edges \c edges_name, but the
+  /// \c edges_name may be empty.
+  ///
+  /// Each line in the section contains the name of the edge and 
+  /// then the edge label. 
   ///
   /// \relates LemonWriter
@@ -1037,12 +1037,12 @@
     ///
     /// Constructor for EdgeWriter. It creates the EdgeWriter and
-    /// attach it into the given LemonWriter. The given \c _IdWriter
-    /// will write the edges' id what can be a edgeset writer.
-    template <typename _IdWriter>
-    EdgeWriter(LemonWriter& _writer, const _IdWriter& _idWriter, 
-	       const std::string& _id = std::string()) 
-      : Parent(_writer), id(_id) {
-      checkConcept<_writer_bits::ItemIdWriter<Edge>, _IdWriter>();
-      idWriter.reset(new _writer_bits::IdWriter<Edge, _IdWriter>(_idWriter));
+    /// attach it into the given LemonWriter. The given \c _LabelWriter
+    /// will write the edges' label what can be a edgeset writer.
+    template <typename _LabelWriter>
+    EdgeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter, 
+	       const std::string& _name = std::string()) 
+      : Parent(_writer), name(_name) {
+      checkConcept<_writer_bits::ItemLabelWriter<Edge>, _LabelWriter>();
+      labelWriter.reset(new _writer_bits::LabelWriter<Edge, _LabelWriter>(_labelWriter));
     }
 
@@ -1066,10 +1066,9 @@
   protected:
 
-    /// \brief Header checking function.
-    ///
-    /// It gives back true when the header line start with \c \@edges,
-    /// and the header line's id and the writer's id are the same.
+    /// \brief The header of the section.
+    ///
+    /// It gives back the header of the section.
     virtual std::string header() {
-      return "@edges " + id;
+      return "@edges " + name;
     }
 
@@ -1078,10 +1077,10 @@
     /// Write the content of the section.
     virtual void write(std::ostream& os) {
-      if (!idWriter->isIdWriter()) {
-	throw DataFormatError("Cannot find edgeset or ID map");
+      if (!labelWriter->isLabelWriter()) {
+	throw DataFormatError("Cannot find edgeset or label map");
       }
       for (int i = 0; i < (int)writers.size(); ++i) {
 	os << writers[i].first << ' ';
-	idWriter->write(os, *(writers[i].second));
+	labelWriter->write(os, *(writers[i].second));
 	os << std::endl;
       }
@@ -1090,20 +1089,20 @@
   private:
 
-    std::string id;
+    std::string name;
 
     typedef std::vector<std::pair<std::string, const Edge*> > EdgeWriters;
     EdgeWriters writers;
 
-    std::auto_ptr<_writer_bits::IdWriterBase<Edge> > idWriter;
+    std::auto_ptr<_writer_bits::LabelWriterBase<Edge> > labelWriter;
   };
 
   /// \ingroup io_group
-  /// \brief SectionWriter for writing labeled undirected edges.
+  /// \brief SectionWriter for writing named undirected edges.
   ///
   /// The undirected edges section's header line is \c \@undiredges 
-  /// \c undiredges_id, but the \c undiredges_id may be empty.
-  ///
-  /// Each line in the section contains the label of the undirected edge and 
-  /// then the undirected edge id. 
+  /// \c undiredges_name, but the \c undiredges_name may be empty.
+  ///
+  /// Each line in the section contains the name of the undirected edge and 
+  /// then the undirected edge label. 
   ///
   /// \relates LemonWriter
@@ -1120,17 +1119,17 @@
     ///
     /// Constructor for UndirEdgeWriter. It creates the UndirEdgeWriter and
-    /// attach it into the given LemonWriter. The given \c _IdWriter
-    /// will write the undirected edges' id what can be an undirected 
+    /// attach it into the given LemonWriter. The given \c _LabelWriter
+    /// will write the undirected edges' label what can be an undirected 
     /// edgeset writer.
-    template <typename _IdWriter>
-    UndirEdgeWriter(LemonWriter& _writer, const _IdWriter& _idWriter, 
-	       const std::string& _id = std::string()) 
-      : Parent(_writer), id(_id) {
-      checkConcept<_writer_bits::ItemIdWriter<Edge>, _IdWriter>();
-      checkConcept<_writer_bits::ItemIdWriter<UndirEdge>, _IdWriter>();
-      undirEdgeIdWriter.reset(new _writer_bits::
-			      IdWriter<UndirEdge, _IdWriter>(_idWriter));
-      edgeIdWriter.reset(new _writer_bits::
-			 IdWriter<Edge, _IdWriter>(_idWriter));
+    template <typename _LabelWriter>
+    UndirEdgeWriter(LemonWriter& _writer, const _LabelWriter& _labelWriter, 
+	       const std::string& _name = std::string()) 
+      : Parent(_writer), name(_name) {
+      checkConcept<_writer_bits::ItemLabelWriter<Edge>, _LabelWriter>();
+      checkConcept<_writer_bits::ItemLabelWriter<UndirEdge>, _LabelWriter>();
+      undirEdgeLabelWriter.reset(new _writer_bits::
+			      LabelWriter<UndirEdge, _LabelWriter>(_labelWriter));
+      edgeLabelWriter.reset(new _writer_bits::
+			 LabelWriter<Edge, _LabelWriter>(_labelWriter));
     }
 
@@ -1161,10 +1160,9 @@
   protected:
 
-    /// \brief Header checking function.
-    ///
-    /// It gives back true when the header line start with \c \@undiredges,
-    /// and the header line's id and the writer's id are the same.
+    /// \brief The header of the section.
+    ///
+    /// It gives back the header of the section.
     virtual std::string header() {
-      return "@undiredges " + id;
+      return "@undiredges " + name;
     }
 
@@ -1173,18 +1171,18 @@
     /// Write the content of the section.
     virtual void write(std::ostream& os) {
-      if (!edgeIdWriter->isIdWriter()) {
-	throw DataFormatError("Cannot find undirected edgeset or ID map");
-      }
-      if (!undirEdgeIdWriter->isIdWriter()) {
-	throw DataFormatError("Cannot find undirected edgeset or ID map");
+      if (!edgeLabelWriter->isLabelWriter()) {
+	throw DataFormatError("Cannot find undirected edgeset or label map");
+      }
+      if (!undirEdgeLabelWriter->isLabelWriter()) {
+	throw DataFormatError("Cannot find undirected edgeset or label map");
       }
       for (int i = 0; i < (int)undirEdgeWriters.size(); ++i) {
 	os << undirEdgeWriters[i].first << ' ';
-	undirEdgeIdWriter->write(os, *(undirEdgeWriters[i].second));
+	undirEdgeLabelWriter->write(os, *(undirEdgeWriters[i].second));
 	os << std::endl;
       }
       for (int i = 0; i < (int)edgeWriters.size(); ++i) {
 	os << edgeWriters[i].first << ' ';
-	edgeIdWriter->write(os, *(edgeWriters[i].second));
+	edgeLabelWriter->write(os, *(edgeWriters[i].second));
 	os << std::endl;
       }
@@ -1193,14 +1191,14 @@
   private:
 
-    std::string id;
+    std::string name;
 
     typedef std::vector<std::pair<std::string, 
 				  const UndirEdge*> > UndirEdgeWriters;
     UndirEdgeWriters undirEdgeWriters;
-    std::auto_ptr<_writer_bits::IdWriterBase<UndirEdge> > undirEdgeIdWriter;
+    std::auto_ptr<_writer_bits::LabelWriterBase<UndirEdge> > undirEdgeLabelWriter;
 
     typedef std::vector<std::pair<std::string, const Edge*> > EdgeWriters;
     EdgeWriters edgeWriters;
-    std::auto_ptr<_writer_bits::IdWriterBase<Edge> > edgeIdWriter;
+    std::auto_ptr<_writer_bits::LabelWriterBase<Edge> > edgeLabelWriter;
 
   };
@@ -1210,6 +1208,6 @@
   ///
   /// The lemon format can store multiple attribute set. Each set has
-  /// the header line \c \@attributes \c attributeset_id, but the 
-  /// attributeset_id may be empty.
+  /// the header line \c \@attributes \c attributes_name, but the 
+  /// attributeset_name may be empty.
   ///
   /// The attributeset section contains several lines. Each of them starts
@@ -1227,6 +1225,6 @@
     /// attach it into the given LemonWriter.
     AttributeWriter(LemonWriter& _writer, 
-		    const std::string& _id = std::string()) 
-      : Parent(_writer), id(_id) {}
+		    const std::string& _name = std::string()) 
+      : Parent(_writer), name(_name) {}
 
     /// \brief Destructor.
@@ -1249,8 +1247,8 @@
     /// Add an attribute writer command for the writer.
     template <typename Value>
-    AttributeWriter& writeAttribute(const std::string& id, 
+    AttributeWriter& writeAttribute(const std::string& name, 
 				    const Value& value) {
       return 
-	writeAttribute<typename Traits::template Writer<Value> >(id, value);
+	writeAttribute<typename Traits::template Writer<Value> >(name, value);
     }
 
@@ -1274,5 +1272,5 @@
     /// It gives back the header of the section.
     std::string header() {
-      return "@attributes " + id;
+      return "@attributes " + name;
     }
 
@@ -1290,5 +1288,5 @@
 
   private:
-    std::string id;
+    std::string name;
 
     typedef std::vector<std::pair<std::string, 
