[gxml] GomText: and related renamed to Text
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] GomText: and related renamed to Text
- Date: Fri, 5 Jul 2019 20:23:19 +0000 (UTC)
commit d8207dd12e8d13c3e8cdb3418eaf9375d30d6e73
Author: Daniel Espinosa <esodan gmail com>
Date: Fri Jul 5 14:52:29 2019 -0500
GomText: and related renamed to Text
GomProcessingInstruction and GomComment, renamed
to ProcessingInstruction and Comment.
gxml/Document.vala | 6 +++---
gxml/{GomText.vala => Text.vala} | 14 +++++++-------
gxml/meson.build | 2 +-
test/DocumentTest.vala | 4 ++--
4 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/gxml/Document.vala b/gxml/Document.vala
index a59c34a..b3c9f2a 100644
--- a/gxml/Document.vala
+++ b/gxml/Document.vala
@@ -220,13 +220,13 @@ public class GXml.Document : GXml.Node,
return new DocumentFragment (this);
}
public DomText create_text_node (string data) throws GLib.Error {
- return new GomText (this, data);
+ return new GXml.Text (this, data);
}
public DomComment GXml.DomDocument.create_comment (string data) throws GLib.Error {
- return new GomComment (this, data);
+ return new GXml.Comment (this, data);
}
public DomProcessingInstruction create_processing_instruction (string target, string data) throws
GLib.Error {
- return new GomProcessingInstruction (this, target, data);
+ return new GXml.ProcessingInstruction (this, target, data);
}
public DomNode import_node (DomNode node, bool deep = false) throws GLib.Error {
diff --git a/gxml/GomText.vala b/gxml/Text.vala
similarity index 90%
rename from gxml/GomText.vala
rename to gxml/Text.vala
index 959fc8f..234403f 100644
--- a/gxml/GomText.vala
+++ b/gxml/Text.vala
@@ -28,7 +28,7 @@ using GXml;
* This object avoids pre and post XML parsing, by using a one step parsing
* to translate text XML tree to an GObject based tree.
*/
-public class GXml.GomCharacterData : GXml.Node,
+public class GXml.CharacterData : GXml.Node,
DomNonDocumentTypeChildNode,
DomChildNode,
DomCharacterData
@@ -85,7 +85,7 @@ public class GXml.GomCharacterData : GXml.Node,
* This object avoids pre and post XML parsing, by using a one step parsing
* to translate text XML tree to an GObject based tree.
*/
-public class GXml.GomText : GomCharacterData,
+public class GXml.Text : GXml.CharacterData,
DomText
{
@@ -94,7 +94,7 @@ public class GXml.GomText : GomCharacterData,
_local_name = "#text";
}
- public GomText (DomDocument doc, string data) {
+ public Text (DomDocument doc, string data) {
_document = doc;
_node_value = data;
}
@@ -106,7 +106,7 @@ public class GXml.GomText : GomCharacterData,
* This object avoids pre and post XML parsing, by using a one step parsing
* to translate text XML tree to an GObject based tree.
*/
-public class GXml.GomProcessingInstruction : GomCharacterData,
+public class GXml.ProcessingInstruction : GXml.CharacterData,
DomProcessingInstruction
{
// DomProcessingInstruction
@@ -114,7 +114,7 @@ public class GXml.GomProcessingInstruction : GomCharacterData,
construct {
_node_type = DomNode.NodeType.PROCESSING_INSTRUCTION_NODE;
}
- public GomProcessingInstruction (DomDocument doc, string target, string data) {
+ public ProcessingInstruction (DomDocument doc, string target, string data) {
_document = doc;
_node_value = data;
_local_name = target;
@@ -127,14 +127,14 @@ public class GXml.GomProcessingInstruction : GomCharacterData,
* This object avoids pre and post XML parsing, by using a one step parsing
* to translate text XML tree to an GObject based tree.
*/
-public class GXml.GomComment : GomCharacterData,
+public class GXml.Comment : CharacterData,
DomComment
{
construct {
_node_type = DomNode.NodeType.COMMENT_NODE;
_local_name = "#comment";
}
- public GomComment (DomDocument doc, string data) {
+ public Comment (DomDocument doc, string data) {
_document = doc;
_node_value = data;
}
diff --git a/gxml/meson.build b/gxml/meson.build
index 310daef..5083bcd 100644
--- a/gxml/meson.build
+++ b/gxml/meson.build
@@ -63,7 +63,6 @@ valasources = files ([
'GomProperty.vala',
'GomSchema.vala',
'GomStringRef.vala',
- 'GomText.vala',
'gxml-init.vala',
'HTMLCollection.vala',
'LXPathObject.vala',
@@ -72,6 +71,7 @@ valasources = files ([
'Range.vala',
'SettableTokenList.vala',
'Schema.vala',
+ 'Text.vala',
'TokenList.vala',
'XAttribute.vala',
'XCharacter.vala',
diff --git a/test/DocumentTest.vala b/test/DocumentTest.vala
index 4d498ce..82ea3d7 100644
--- a/test/DocumentTest.vala
+++ b/test/DocumentTest.vala
@@ -335,7 +335,7 @@ class GXml.DocumentTest : GXmlTest {
try {
DomDocument doc = new GXml.Document.from_string ("<document_element />");
DomText text = (DomText) doc.create_text_node ("Star of my dreams");
- assert (text is GomText);
+ assert (text is GXml.Text);
assert (text is DomText);
assert (text.node_name == "#text");
@@ -367,7 +367,7 @@ class GXml.DocumentTest : GXmlTest {
try {
DomDocument doc = new GXml.Document.from_string ("<document_element />");
DomProcessingInstruction instruction = doc.create_processing_instruction
("target", "data");
- assert (instruction is GomProcessingInstruction);
+ assert (instruction is GXml.ProcessingInstruction);
assert (instruction is DomProcessingInstruction);
assert (instruction.node_name == "target");
assert (instruction.node_value == "data");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]