[gxml] * remove superfluous bits



commit 693b1dfb33a47a8ae9e402d47ae301028996f28f
Author: Richard Schwarting <aquarichy gmail com>
Date:   Tue Aug 16 03:11:33 2011 +0200

    * remove superfluous bits

 gxml/Element.vala |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/gxml/Element.vala b/gxml/Element.vala
index 3e634cc..3a3fce8 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -53,6 +53,16 @@ namespace GXml.Dom {
 		// TODO: note that NamedNodeMap is 'live' so changes to the Node should be seen in the NamedNodeMap (already retrieved), no duplicating it: http://www.w3.org/TR/DOM-Level-1/level-one-core.html
 		private HashTable<string,Attr> _attributes = null;
 
+		// private _attr
+		// public override NodeList attribute_list {
+		// 	get {
+		// 		AttrNodeList attrs = new AttrNodeList (this, this.owner_document);
+		// 		return attrs;
+		// 	}
+		// 	internal set {
+		// 	}
+		// }
+
 		/**
 		 * Contains a HashTable of Attr attributes associated with this element.
 		 *
@@ -89,19 +99,15 @@ namespace GXml.Dom {
 			get {
 				Attr attr;
 
-				try {
-					if (this._attributes == null) {
-						this.owner_document.dirty_elements.append (this);
-						this._attributes = new HashTable<string,Attr> (GLib.str_hash, GLib.str_equal);
+				if (this._attributes == null) {
+					this.owner_document.dirty_elements.append (this);
+					this._attributes = new HashTable<string,Attr> (GLib.str_hash, GLib.str_equal);
 						// TODO: make sure other HashTables have appropriate hash, equal functions
-						
-						for (Xml.Attr *prop = base.node->properties; prop != null; prop = prop->next) {
-							attr = new Attr (prop, this.owner_document);
-							this.attributes.replace (prop->name, attr);
-						}
+					
+					for (Xml.Attr *prop = base.node->properties; prop != null; prop = prop->next) {
+						attr = new Attr (prop, this.owner_document);
+						this.attributes.replace (prop->name, attr);
 					}
-				} catch (DomError e) {
-					// TODO: handle this case, results from create_attribute 
 				}
 
 				return this._attributes;



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