diff --git a/gxml/Attribute.vala b/gxml/Attribute.vala
index f7e5ee4dd7d28b512c4e08403489fcb8d8bb5b5f..655bcc985a50269b8655cdff4470735ecfe11c7b 100644
--- a/gxml/Attribute.vala
+++ b/gxml/Attribute.vala
@@ -22,7 +22,7 @@
using Gee;
/**
- * DOM4 Interface to handle XML tags properties, powered by libxml2 library.
+ * DOM1 Interface to handle XML tags properties, powered by libxml2 library.
*
* Its features relays on {@link GXml.Node} interface inplementation to access
* {@link GXml.Element} properties.
@@ -30,6 +30,7 @@ using Gee;
* Attribute's name could be get from {@link GXml.Node.name} property. Its value
* should be get from {@link GXml.Node.value} property.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomAttr")]
public interface GXml.Attribute : Object, GXml.Node {
public abstract GXml.Namespace? @namespace { owned get; set; }
public abstract string? prefix { owned get; }
diff --git a/gxml/CDATA.vala b/gxml/CDATA.vala
index e555a0d4a18f4293ef320e90550be9f6eb8180b6..2e0c9b1e5cefd13cb1df7cdf2359884b2d3deb58 100644
--- a/gxml/CDATA.vala
+++ b/gxml/CDATA.vala
@@ -23,8 +23,9 @@
using Gee;
/**
- * CDATA sections in XML documents.
+ * DOM1 CDATA sections in XML documents.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "")]
public interface GXml.CDATA : Object, GXml.Node
{
diff --git a/gxml/Character.vala b/gxml/Character.vala
index d0ad24891908c3fd755a7290da1841ce081c1f6a..4d4e7a3b9a30fca60038b5ac79259c2e8d0573f5 100644
--- a/gxml/Character.vala
+++ b/gxml/Character.vala
@@ -7,19 +7,22 @@
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
-
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
-
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*
* Authors:
* Daniel Espinosa
*/
-
+/**
+ * DOM1 interface
+ */
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomCharacterData")]
public interface GXml.Character : Object, GXml.Node
{
public abstract string str { owned get; set; }
diff --git a/gxml/Collections.vala b/gxml/Collections.vala
index d5bedbbd3705d81a0485c6c4ecf361555c7e591d..5f1df31044ad021886e43317f13d0bd996f89858 100644
--- a/gxml/Collections.vala
+++ b/gxml/Collections.vala
@@ -23,27 +23,27 @@
using Gee;
/**
- * A DOM4 interface to keep references to {@link DomElement} children of a {@link element}
+ * A DOM4 interface to keep references to {@link DomElement} children of a {@link parent_element}
*/
public interface GXml.Collection : Object
{
/**
- * A list of child {@link DomElement} objects of {@link element}
+ * A list of child {@link DomElement} objects of {@link parent_element}
*/
public abstract GLib.Queue nodes_index { get; }
/**
- * A {@link GXml.DomCollection} with all child elements in collection.
+ * A {@link GXml.DomElement} with all child elements in collection.
*/
- public abstract GXml.DomCollection element { get; construct set; }
+ public abstract GXml.DomElement parent_element { get; construct set; }
/**
- * Local name of {@link DomElement} objects of {@link element}, which could be
+ * Local name of {@link DomElement} objects of {@link parent_element}, which could be
* contained in this collection.
*
* Used when reading to add elements to collection.
*/
public abstract string items_name { get; }
/**
- * A {@link GLib.Type} of {@link DomElement} child objects of {@link element},
+ * A {@link GLib.Type} of {@link DomElement} child objects of {@link parent_element},
* which could be contained in this collection.
*
* Type should be an {@link GomObject}.
@@ -51,11 +51,11 @@ public interface GXml.Collection : Object
public abstract Type items_type { get; construct set; }
/**
* Search and add references to all {@link GomObject} nodes as child of
- * {@link element} with same, case insensitive, name of {@link items_name}
+ * {@link parent_element} with same, case insensitive, name of {@link items_name}
*/
public abstract void search () throws GLib.Error;
/**
- * Gets a child {@link DomElement} of {@link element} referenced in
+ * Gets a child {@link DomElement} of {@link parent_element} referenced in
* {@link nodes_index}.
*/
public virtual DomElement? get_item (int index) throws GLib.Error {
@@ -65,12 +65,12 @@ public interface GXml.Collection : Object
throw new DomError.INDEX_SIZE_ERROR
(_("Invalid index for elements in array list"));
int i = nodes_index.peek_nth (index);
- if (i < 0 || i >= element.child_nodes.size)
+ if (i < 0 || i >= parent_element.child_nodes.size)
throw new DomError.INDEX_SIZE_ERROR
(_("Invalid index reference for child elements in array list"));
- var e = element.child_nodes.get (i);
+ var e = parent_element.child_nodes.get (i);
if (e != null)
- if (!(e is GXml.DomCollection))
+ if (!(e is GXml.Collection))
throw new DomError.INVALID_NODE_TYPE_ERROR
(_("Referenced object's type is invalid. Should be a GXmlDomElement"));
return (DomElement?) e;
@@ -86,7 +86,7 @@ public interface GXml.Collection : Object
*/
public virtual int length { get { return (int) nodes_index.get_length (); } }
/**
- * Initialize collection to use a given {@link GXml.DomCollection} derived type.
+ * Initialize collection to use a given {@link GXml.Collection} derived type.
* Internally, this method create an instance of given type to initialize
* {@link items_type} and {@link items_name}.
*
@@ -96,8 +96,8 @@ public interface GXml.Collection : Object
public abstract void initialize (GLib.Type t) throws GLib.Error;
/**
* Creates a new instance of {@link items_type}, with same
- * {@link DomNode.owner_document} than {@link element}. New instance
- * is not set as a child of collection's {@link element}; to do so,
+ * {@link DomNode.owner_document} than {@link parent_element}. New instance
+ * is not set as a child of collection's {@link parent_element}; to do so,
* use {@link append}
*
* Returns: a new instance object or null if type is not a {@link DomElement} or no parent has been set
@@ -105,9 +105,9 @@ public interface GXml.Collection : Object
public virtual DomElement? create_item () {
if (items_type.is_a (GLib.Type.INVALID)) return null;
if (!items_type.is_a (typeof (DomElement))) return null;
- if (element == null) return null;
+ if (parent_element == null) return null;
return Object.new (items_type,
- "owner_document", element.owner_document) as DomElement;
+ "owner_document", parent_element.owner_document) as DomElement;
}
/**
* Validate if given node and index, should be added to collection.
@@ -131,7 +131,7 @@ public interface GXml.Collection : Object
public interface GXml.List : Object, Collection, Traversable, Iterable {}
/**
- * Inteface to be implemented by {@link GXml.DomCollection} derived classes
+ * Inteface to be implemented by {@link GXml.Collection} derived classes
* in order to provide a string to be used in {@link GomHashMap} as key.
*
* If {@link GomHashMap} has set its {@link GomHashMap.attribute_key}
@@ -167,7 +167,7 @@ public interface GXml.Map : Object, GXml.Collection, Traversable, It
/**
- * Inteface to be implemented by {@link GXml.DomCollection} derived classes
+ * Inteface to be implemented by {@link GXml.Collection} derived classes
* in order to provide a strings to be used in {@link GomHashPairedMap} as keys.
*/
public interface GXml.MappeableElementPairKey : Object, DomElement {
@@ -215,7 +215,7 @@ public interface GXml.PairedMap : Object, GXml.Collection, Traversable
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
-
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
-
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see .
- *
- * Authors:
- * Daniel Espinosa
- */
-
diff --git a/gxml/Document.vala b/gxml/Document.vala
index c10d1885840739f1f04e6a85a8e9108592eba6c6..be50213206a6a96acb083a68c80ec256c7c949d7 100644
--- a/gxml/Document.vala
+++ b/gxml/Document.vala
@@ -25,16 +25,18 @@ using Gee;
/**
* Errors for documents handling {@link GXml.Document} reading/writing
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomError")]
public errordomain GXml.DocumentError {
INVALID_DOCUMENT_ERROR,
INVALID_FILE
}
/**
- * Interface to handle XML documents.
+ * DOM1 Interface to handle XML documents.
*
* Provides basic interfaces to read and create XML documents.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomDocument")]
public interface GXml.Document : Object, GXml.Node
{
/**
diff --git a/gxml/DocumentType.vala b/gxml/DocumentType.vala
index fd0fa11229e684e6f5fac98c335e2bf04b3427dd..e07e4e259f6e9137ce146a1ccf915c648fc21377 100644
--- a/gxml/DocumentType.vala
+++ b/gxml/DocumentType.vala
@@ -23,6 +23,7 @@
using Gee;
/**
- * Interface to represent Document type definitions.
+ * DOM1 Interface to represent Document type definitions.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomDocumentType")]
public interface GXml.DocumentType : Object, GXml.Node {}
diff --git a/gxml/DomCharacter.vala b/gxml/DomCharacter.vala
index b9226a0847732c9c217f32154a4570fe0fef2b07..79a5bae888631be32dd57f2169e08649043caad5 100644
--- a/gxml/DomCharacter.vala
+++ b/gxml/DomCharacter.vala
@@ -20,6 +20,9 @@
* Daniel Espinosa
*/
+/**
+ * DOM4 character handling interface
+ */
public interface GXml.DomCharacterData : GLib.Object,
GXml.DomNode,
GXml.DomNonDocumentTypeChildNode,
@@ -67,6 +70,9 @@ public interface GXml.DomCharacterData : GLib.Object,
}
}
+/**
+ * DOM4 text node
+ */
public interface GXml.DomText : GXml.DomCharacterData {
public virtual GXml.DomText split_text (int offset) throws GLib.Error {
Init.init ();
@@ -93,10 +99,15 @@ public interface GXml.DomText : GXml.DomCharacterData {
}
}
}
-
+/**
+ * DOM4 Processing Instruction node
+ */
public interface GXml.DomProcessingInstruction : GXml.DomCharacterData {
public abstract string target { owned get; }
}
+/**
+ * DOM4 comment node
+ */
public interface GXml.DomComment : GXml.DomCharacterData {}
diff --git a/gxml/Element.vala b/gxml/Element.vala
index 60474e7851566ae71b66e52a925227c3a3f517aa..c022dc5ebeea20800097d650fe48510f335d0347 100644
--- a/gxml/Element.vala
+++ b/gxml/Element.vala
@@ -22,11 +22,12 @@
using Gee;
/**
- * Interface to access XML document's tags, properties and content.
+ * DOM1 Interface to access XML document's tags, properties and content.
*
* Provides methods to create new XML tags properties and its values, and
* access to tag's contents.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomElement")]
public interface GXml.Element : Object, GXml.Node
{
/**
diff --git a/gxml/GXmlAttribute.vala b/gxml/GXmlAttribute.vala
index bee36e5c81a8a441ffdffca1891567d748528acb..29d955e2df913dbdbf620834651756a08597a761 100644
--- a/gxml/GXmlAttribute.vala
+++ b/gxml/GXmlAttribute.vala
@@ -22,7 +22,7 @@
using Gee;
/**
- * Class implemeting {@link GXml.Attribute} interface, not tied to libxml-2.0 library.
+ * Class implemeting {@link GXml.DomAttr} interface, not tied to libxml-2.0 library.
*/
public class GXml.GAttribute : GXml.GNode, GXml.Attribute, GXml.DomAttr
{
diff --git a/gxml/GXmlCDATA.vala b/gxml/GXmlCDATA.vala
index 653988c7e8a19e3b90b5b791e10ee6d62def3723..e7982e4d0dc6615b8b0e71c126f2dfe5eece7f1b 100644
--- a/gxml/GXmlCDATA.vala
+++ b/gxml/GXmlCDATA.vala
@@ -22,7 +22,7 @@
using Gee;
/**
- * DOM4 Class implemeting {@link GXml.CDATA} interface, powered by libxml2 library.
+ * DOM1 Class implemeting {@link GXml.CDATA} interface, powered by libxml2 library.
*/
public class GXml.GCDATA : GXml.GNode, GXml.CDATA
{
diff --git a/gxml/GomCollections.vala b/gxml/GomCollections.vala
index 30ace7d6bfa22c924b29d017d42b1deb6569fb39..ad885fff4bb895ad754ae904cf54f46ec4054d20 100644
--- a/gxml/GomCollections.vala
+++ b/gxml/GomCollections.vala
@@ -24,10 +24,8 @@ using Gee;
/**
* A DOM4 interface to keep references to {@link DomElement} in a {@link element}
* child nodes. Only {@link GomObject} are supported.
- *
- * @deprecated 0.18
- * @see GXml.Collection
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.Collection")]
public interface GXml.GomCollection : Object
{
/**
@@ -187,6 +185,16 @@ public abstract class GXml.BaseCollection : Object, Traversable, Ite
_element = value;
}
}
+ /**
+ * {@inheritDoc}
+ */
+ public DomElement parent_element {
+ get { return _element as DomElement; }
+ construct set {
+ if (value is GomElement)
+ _element = value as GomElement;
+ }
+ }
/**
* {@inheritDoc}
*/
diff --git a/gxml/Namespace.vala b/gxml/Namespace.vala
index 4bacbfc3866f448016d6ce4c059ab078ea4ce206..e1af7d34ec40f7c20a15953b340421e9dcfe81d9 100644
--- a/gxml/Namespace.vala
+++ b/gxml/Namespace.vala
@@ -23,7 +23,7 @@
using Gee;
/**
- * Interface to handle XML Namespaces.
+ * DOM1 Interface to handle XML Namespaces.
*
* Basic information for a XML document's namespaces and applied to a given
* {@link GXml.Node}.
@@ -31,6 +31,7 @@ using Gee;
* Namespace management is a matter of this or other libraries, implementing
* this interfaces.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "")]
public interface GXml.Namespace : Object
{
/**
diff --git a/gxml/Node.vala b/gxml/Node.vala
index 32daaef9483c136d269e8466c5b52c20698a593e..94fb61544662368e08f6eff36e271075a1ace597 100644
--- a/gxml/Node.vala
+++ b/gxml/Node.vala
@@ -25,6 +25,7 @@ using Gee;
/**
* Base interface providing basic functionalities for DOM1 interfaces.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomNode")]
public interface GXml.Node : Object
{
/**
diff --git a/gxml/NodeType.vala b/gxml/NodeType.vala
index 45d432b257a2f5aaa5188b79757e6a8fa1357d44..08efa50439acdccc2c6f3ffe8085dfbcb41f3358 100644
--- a/gxml/NodeType.vala
+++ b/gxml/NodeType.vala
@@ -25,14 +25,12 @@
// TODO: want a method to convert NodeType to a string
/**
- * Enumerates possible NodeTypes.
+ * DOM1 Enumerates possible NodeTypes.
*
* For more, see: [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-1950641247]]
*/
-public enum GXml.NodeType { // TODO: Rename to DomNodeType
- /* NOTE: bug in vala? if I don't have == 0, I fail when creating
- this class because I can't set default values for NodeType properties
- GLib-GObject-CRITICAL **: g_param_spec_enum: assertion `g_enum_get_value (enum_class, default_value) != NULL' failed */
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomNode.NodeType")]
+public enum GXml.NodeType {
INVALID = 0,
ELEMENT = 1,
ATTRIBUTE,
diff --git a/gxml/Notation.vala b/gxml/Notation.vala
index e8a0b876f2827712ddfa5d98f93c87cd12a16b7f..b5257f077f57f492174795665f2a2364a07ab819 100644
--- a/gxml/Notation.vala
+++ b/gxml/Notation.vala
@@ -23,7 +23,7 @@
using Gee;
/**
- * Interface to handle notation elements
+ * DOM1 Interface to handle notation elements
*
* Used in defining {@link GXml.DocumentType}s to declare the format of
* {@link GXml.Entity} and {@link GXml.ProcessingInstruction}s.
@@ -33,6 +33,7 @@ using Gee;
* ProcessingInstruction targets.
* For more, see: [[http://www.w3.org/TR/DOM-Level-1/level-one-core.html#ID-5431D1B9]]
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "")]
public interface GXml.Notation : Object, GXml.Node
{
public abstract string? public_id { get; }
@@ -42,4 +43,5 @@ public interface GXml.Notation : Object, GXml.Node
/**
* Dummy definition for entity.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "")]
public interface GXml.Entity : Object, GXml.Node {}
diff --git a/gxml/ProcessingInstruction.vala b/gxml/ProcessingInstruction.vala
index 2efa5bbfa92b86b01d1c5ea28459152427152cee..48e74737cc315d42bcdc0eacd693b1737df8925a 100644
--- a/gxml/ProcessingInstruction.vala
+++ b/gxml/ProcessingInstruction.vala
@@ -23,8 +23,9 @@
using Gee;
/**
- * Interface for XML Processing Instruction sections.
+ * DOM1 Interface for XML Processing Instruction sections.
*/
+[Version (deprecated = true, deprecated_since = "0.18", replacement = "GXml.DomProcessingInstruction")]
public interface GXml.ProcessingInstruction : Object, GXml.Node
{
/**