[gxml] * fix namespace usage: definitions are actually attributes
- From: Richard Hans Schwarting <rschwart src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] * fix namespace usage: definitions are actually attributes
- Date: Tue, 16 Aug 2011 01:16:11 +0000 (UTC)
commit 13c2565b40c14108dda50435f2eb687fbcf16ac5
Author: Richard Schwarting <aquarichy gmail com>
Date: Tue Aug 16 03:10:08 2011 +0200
* fix namespace usage: definitions are actually attributes
gxml/BackedNode.vala | 25 +++++++++++++++++++------
1 files changed, 19 insertions(+), 6 deletions(-)
---
diff --git a/gxml/BackedNode.vala b/gxml/BackedNode.vala
index e8db4dd..554f804 100644
--- a/gxml/BackedNode.vala
+++ b/gxml/BackedNode.vala
@@ -28,18 +28,31 @@ namespace GXml.Dom {
/* Public properties */
+ private NamespaceAttrNodeList _namespace_definitions = null;
+ /**
+ * { inheritDoc}
+ */
+ public override NodeList? namespace_definitions {
+ get {
+ if (_namespace_definitions == null) {
+ this._namespace_definitions = new NamespaceAttrNodeList (this, this.owner_document);
+ }
+ return this._namespace_definitions;
+ }
+ internal set {
+ }
+ }
+
/**
* { inheritDoc}
*/
public override string? namespace_uri {
get {
- // TODO: there can be multiple NSes on a node, using ->next, right now we just return the first. What should we do?!?!
- if (this.node->ns_def == null) {
+ if (this.node->ns == null) {
return null;
} else {
- return this.node->ns_def->href;
+ return this.node->ns->href;
}
- // TODO: figure out when node->ns is used, as opposed to ns_def
}
internal set {
}
@@ -49,10 +62,10 @@ namespace GXml.Dom {
*/
public override string? prefix {
get {
- if (this.node->ns_def == null) {
+ if (this.node->ns == null) {
return null;
} else {
- return this.node->ns_def->prefix;
+ return this.node->ns->prefix;
}
}
internal set {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]