[gxml/serialization] Removed XPath.
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml/serialization] Removed XPath.
- Date: Mon, 20 Jan 2014 18:42:02 +0000 (UTC)
commit 2e9958ec06d5ddf2bef48733da423c66fe0307b0
Author: Daniel Espinosa <esodan gmail com>
Date: Mon Jan 20 12:39:08 2014 -0600
Removed XPath.
gxml/Makefile.am | 6 +-
gxml/Node.vala | 22 --
gxml/Serializable.vala | 2 +-
gxml/XPathError.vala | 43 ----
gxml/XPathExpression.vala | 117 ----------
gxml/XPathNSResolver.vala | 64 ------
gxml/XPathResult.vala | 208 ------------------
test/GXmlTest.vala | 3 -
test/Makefile.am | 5 +-
test/SerializableBasicTypesTest.vala | 6 +-
test/SerializableGeeArrayListTest.vala | 25 ++
test/SerializableGeeCollectionsTest.vala | 6 +-
test/SerializableGeeDualKeyMapTest.vala | 25 ++
test/SerializableGeeHashMapTest.vala | 25 ++
test/SerializableGeeTreeMapTest.vala | 25 ++
test/SerializableObjectModelTest.vala | 25 ++
test/SerializableTest.vala | 27 +++-
test/XPathExpressionTest.vala | 353 ------------------------------
test/XPathNSResolverTest.vala | 22 --
test/XPathResultTest.vala | 153 -------------
20 files changed, 160 insertions(+), 1002 deletions(-)
---
diff --git a/gxml/Makefile.am b/gxml/Makefile.am
index 08ce7bd..d433f76 100644
--- a/gxml/Makefile.am
+++ b/gxml/Makefile.am
@@ -66,11 +66,7 @@ libgxml_la_SOURCES = \
SerializableMapDualKey.vala \
SerializableGeeArrayList.vala \
$(NULL) \
- SerializableContainer.vala \
- XPathError.vala \
- XPathExpression.vala \
- XPathNSResolver.vala \
- XPathResult.vala
+ SerializableContainer.vala
# TODO: do we want XPath files in own directory?
diff --git a/gxml/Node.vala b/gxml/Node.vala
index 1481791..a8d9300 100644
--- a/gxml/Node.vala
+++ b/gxml/Node.vala
@@ -516,27 +516,5 @@ namespace GXml {
public virtual string to_string (bool format = false, int level = 0) {
return "Node(%d:%s)".printf (this.node_type, this.node_name);
}
-
- /*** XPath functions ***/
-
- /* XPATH:TODO: should Node implement "XPathEvaluator" as an interface? No? */
-
- /**
- * Evaluates XPath expression in context of current DOM node (or Document).
- *
- * @param expr XPath expression
- * @param nsr namespace resolver object (prefix -> URI mapping)
- * @param res_type type to cast resulting value to
- * @return XPath.Result object containing result type and value
- * @throws GXml.Error when node type is not supported as context of evaluation
- * @throws XPath.Error when supplied with invalid XPath expression
- */
- public XPath.Result evaluate (string expr, XPath.NSResolver? nsr = null,
- XPath.ResultType res_type = XPath.ResultType.ANY)
- throws GXml.Error, XPath.Error
- {
- var expression = new XPath.Expression (expr, nsr);
- return expression.evaluate (this, res_type);
- }
}
}
diff --git a/gxml/Serializable.vala b/gxml/Serializable.vala
index 1e5588a..7ccaf91 100644
--- a/gxml/Serializable.vala
+++ b/gxml/Serializable.vala
@@ -2,7 +2,7 @@
/* Serializable.vala
*
* Copyright (C) 2011-2013 Richard Schwarting <aquarichy gmail com>
- + Copyright (C) 2013 Daniel Espinosa <esodan gmail com>
+ * Copyright (C) 2013 Daniel Espinosa <esodan gmail com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
diff --git a/test/GXmlTest.vala b/test/GXmlTest.vala
index 34a9c89..bd2ceea 100644
--- a/test/GXmlTest.vala
+++ b/test/GXmlTest.vala
@@ -44,9 +44,6 @@ class GXmlTest {
SerializableGeeArrayListTest.add_tests ();
SerializableGeeCollectionsTest.add_tests ();
SerializableBasicTypeTest.add_tests ();
- XPathExpressionTest.add_tests ();
- XPathNSResolverTest.add_tests ();
- XPathResultTest.add_tests ();
Test.run ();
diff --git a/test/Makefile.am b/test/Makefile.am
index dbe82da..b1bf663 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -44,10 +44,7 @@ gxml_test_SOURCES = \
SerializableGeeHashMapTest.vala \
SerializableGeeCollectionsTest.vala \
SerializableBasicTypesTest.vala \
- $(NULL) \
- XPathExpressionTest.vala \
- XPathNSResolverTest.vala \
- XPathResultTest.vala
+ $(NULL)
gxml_test.vala.stamp: $(gxml_test_SOURCES)
diff --git a/test/SerializableBasicTypesTest.vala b/test/SerializableBasicTypesTest.vala
index 1bfeffe..b3655ef 100644
--- a/test/SerializableBasicTypesTest.vala
+++ b/test/SerializableBasicTypesTest.vala
@@ -8,7 +8,7 @@
* Daniel Espinosa <esodan gmail com>
*
*
- * Copyright (c) 2013 Daniel Espinosa
+ * Copyright (c) 2013-2014 Daniel Espinosa
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -49,7 +49,7 @@ class SerializableBasicTypeTest : GXmlTest {
stdout.printf (@"ERROR: Wrong boolean value. Expected true got: $(b.node_value.down ()) :
$(b.node_value)\n");
assert_not_reached ();
}
- stdout.printf (@"\n$doc\n");
+ //stdout.printf (@"\n$doc\n");
} catch (GLib.Error e) {
stdout.printf (@"ERROR: $(e.message)");
assert_not_reached ();
@@ -67,7 +67,7 @@ class SerializableBasicTypeTest : GXmlTest {
stdout.printf (@"ERROR: Wrong boolean value. Expected true got: $(bt.boolean)\n$doc\n");
assert_not_reached ();
}
- stdout.printf (@"\n$doc\n");
+ //stdout.printf (@"\n$doc\n");
} catch (GLib.Error e) {
stdout.printf (@"ERROR: $(e.message)");
assert_not_reached ();
diff --git a/test/SerializableGeeArrayListTest.vala b/test/SerializableGeeArrayListTest.vala
index 218add4..82a5b62 100644
--- a/test/SerializableGeeArrayListTest.vala
+++ b/test/SerializableGeeArrayListTest.vala
@@ -1,3 +1,28 @@
+/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
+/**
+ *
+ * GXml.Serializable.BasicTypeTest
+ *
+ * Authors:
+ *
+ * Daniel Espinosa <esodan gmail com>
+ *
+ *
+ * Copyright (c) 2013-2014 Daniel Espinosa
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
using GXml;
using Gee;
diff --git a/test/SerializableGeeCollectionsTest.vala b/test/SerializableGeeCollectionsTest.vala
index 32f69bd..3022be0 100644
--- a/test/SerializableGeeCollectionsTest.vala
+++ b/test/SerializableGeeCollectionsTest.vala
@@ -506,7 +506,7 @@ class SerializableGeeCollectionsTest : GXmlTest
stdout.printf (@"ERROR: bad root node name\n");
assert_not_reached ();
}
- stdout.printf (@"$doc\n");
+ //stdout.printf (@"$doc\n");
foreach (GXml.Node n in doc.document_element.child_nodes) {
if (n is Element) {
if (n.node_name == "ChargeZone") {
@@ -521,7 +521,7 @@ class SerializableGeeCollectionsTest : GXmlTest
if (sn.node_name == "refaction") {
foreach (GXml.Node rn in sn.child_nodes) {
if (rn is Element) {
- stdout.printf (@"Refaction current node: '$(rn.node_name)'\n");
+ //stdout.printf (@"Refaction current node: '$(rn.node_name)'\n");
if (rn.node_name == "ship") {
var atr = ((Element) rn).get_attribute_node ("manufacturer");
if (atr == null) {
@@ -538,7 +538,7 @@ class SerializableGeeCollectionsTest : GXmlTest
}
}
foreach (GXml.Node shn in rn.child_nodes) {
- stdout.printf (@"Refaction: Ship MegaTrench: Node: $(shn.node_name)\n");
+ //stdout.printf (@"Refaction: Ship MegaTrench: Node: $(shn.node_name)\n");
if (shn is Text) {
tfound = true;
if (shn.node_value != "TEST_TEXT") {
diff --git a/test/SerializableGeeDualKeyMapTest.vala b/test/SerializableGeeDualKeyMapTest.vala
index 2d97690..01a0a8f 100644
--- a/test/SerializableGeeDualKeyMapTest.vala
+++ b/test/SerializableGeeDualKeyMapTest.vala
@@ -1,3 +1,28 @@
+/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
+/**
+ *
+ * GXml.Serializable.BasicTypeTest
+ *
+ * Authors:
+ *
+ * Daniel Espinosa <esodan gmail com>
+ *
+ *
+ * Copyright (c) 2013-2014 Daniel Espinosa
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
using GXml;
using Gee;
diff --git a/test/SerializableGeeHashMapTest.vala b/test/SerializableGeeHashMapTest.vala
index 1fd5107..ad48795 100644
--- a/test/SerializableGeeHashMapTest.vala
+++ b/test/SerializableGeeHashMapTest.vala
@@ -1,3 +1,28 @@
+/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
+/**
+ *
+ * GXml.Serializable.BasicTypeTest
+ *
+ * Authors:
+ *
+ * Daniel Espinosa <esodan gmail com>
+ *
+ *
+ * Copyright (c) 2013-2014 Daniel Espinosa
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
using GXml;
using Gee;
diff --git a/test/SerializableGeeTreeMapTest.vala b/test/SerializableGeeTreeMapTest.vala
index 9a59f25..87c2c61 100644
--- a/test/SerializableGeeTreeMapTest.vala
+++ b/test/SerializableGeeTreeMapTest.vala
@@ -1,3 +1,28 @@
+/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
+/**
+ *
+ * GXml.Serializable.BasicTypeTest
+ *
+ * Authors:
+ *
+ * Daniel Espinosa <esodan gmail com>
+ *
+ *
+ * Copyright (c) 2013-2014 Daniel Espinosa
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
using GXml;
using Gee;
diff --git a/test/SerializableObjectModelTest.vala b/test/SerializableObjectModelTest.vala
index 693f6e5..9e3910f 100644
--- a/test/SerializableObjectModelTest.vala
+++ b/test/SerializableObjectModelTest.vala
@@ -1,3 +1,28 @@
+/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
+/**
+ *
+ * GXml.Serializable.GeeCollectionsTest
+ *
+ * Authors:
+ *
+ * Daniel Espinosa <esodan gmail com>
+ *
+ *
+ * Copyright (c) 2013-2014 Daniel Espinosa
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
using GXml;
using Gee;
const string XML_COMPUTER_FILE =
diff --git a/test/SerializableTest.vala b/test/SerializableTest.vala
index e49539e..aea2044 100644
--- a/test/SerializableTest.vala
+++ b/test/SerializableTest.vala
@@ -1,4 +1,29 @@
-/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
+/* -*- Mode: vala; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- */
+/**
+ *
+ * GXml.Serializable.BasicTypeTest
+ *
+ * Authors:
+ *
+ * Richard Schwarting <aquarichy gmail com>
+ * Daniel Espinosa <esodan gmail com>
+ *
+ * Copyright (C) 2011-2013 Richard Schwarting <aquarichy gmail com>
+ * Copyright (c) 2013-2014 Daniel Espinosa <esodan gmail com>
+ *
+ * This program 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 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
using GXml;
using Gee;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]