[Practicalxml-commits] SF.net SVN: practicalxml:[48] trunk/src
Brought to you by:
kdgregory
From: Auto-Generated S. C. M. <pra...@li...> - 2008-12-09 12:41:56
|
Revision: 48 http://practicalxml.svn.sourceforge.net/practicalxml/?rev=48&view=rev Author: kdgregory Date: 2008-12-09 12:41:54 +0000 (Tue, 09 Dec 2008) Log Message: ----------- DomUtil: rename appendChildWithNamespace() to appendChildInheritNamespace() Modified Paths: -------------- trunk/src/main/java/net/sf/practicalxml/DomUtil.java trunk/src/test/java/net/sf/practicalxml/TestDomUtil.java Modified: trunk/src/main/java/net/sf/practicalxml/DomUtil.java =================================================================== --- trunk/src/main/java/net/sf/practicalxml/DomUtil.java 2008-12-09 12:41:16 UTC (rev 47) +++ trunk/src/main/java/net/sf/practicalxml/DomUtil.java 2008-12-09 12:41:54 UTC (rev 48) @@ -114,7 +114,7 @@ * * @return The newly created child element. */ - public static Element appendChildWithNamespace(Element parent, String qname) + public static Element appendChildInheritNamespace(Element parent, String qname) { String nsUri = parent.getNamespaceURI(); String parentPrefix = parent.getPrefix(); Modified: trunk/src/test/java/net/sf/practicalxml/TestDomUtil.java =================================================================== --- trunk/src/test/java/net/sf/practicalxml/TestDomUtil.java 2008-12-09 12:41:16 UTC (rev 47) +++ trunk/src/test/java/net/sf/practicalxml/TestDomUtil.java 2008-12-09 12:41:54 UTC (rev 48) @@ -57,21 +57,21 @@ assertEquals("w", child3.getPrefix()); assertEquals("wargle", child3.getLocalName()); - Element grandchild1 = DomUtil.appendChildWithNamespace(child1, "qwe"); + Element grandchild1 = DomUtil.appendChildInheritNamespace(child1, "qwe"); assertNotNull(grandchild1); assertSame(child1, grandchild1.getParentNode()); assertEquals(child1.getNamespaceURI(), grandchild1.getNamespaceURI()); assertEquals(child1.getPrefix(), grandchild1.getPrefix()); assertEquals("qwe", grandchild1.getLocalName()); - Element grandchild2 = DomUtil.appendChildWithNamespace(child2, "asd"); + Element grandchild2 = DomUtil.appendChildInheritNamespace(child2, "asd"); assertNotNull(grandchild2); assertSame(child2, grandchild2.getParentNode()); assertEquals(child2.getNamespaceURI(), grandchild2.getNamespaceURI()); assertEquals(child2.getPrefix(), grandchild2.getPrefix()); assertEquals("asd", grandchild2.getLocalName()); - Element grandchild3 = DomUtil.appendChildWithNamespace(child3, "zxc"); + Element grandchild3 = DomUtil.appendChildInheritNamespace(child3, "zxc"); assertNotNull(grandchild3); assertSame(child3, grandchild3.getParentNode()); assertEquals(child3.getNamespaceURI(), grandchild3.getNamespaceURI()); @@ -87,7 +87,7 @@ { Element root = DomUtil.newDocument("foo"); Element child = DomUtil.appendChild(root, "MyNSURI", "argle:bargle"); - Element grandchild = DomUtil.appendChildWithNamespace(child, "zippy:pinhead"); + Element grandchild = DomUtil.appendChildInheritNamespace(child, "zippy:pinhead"); assertEquals("zippy", grandchild.getPrefix()); } @@ -111,7 +111,7 @@ DomUtil.setText(root, t3); assertEquals(t3, DomUtil.getText(root)); - Element child = DomUtil.appendChildWithNamespace(root, "bar"); + Element child = DomUtil.appendChildInheritNamespace(root, "bar"); assertNull(DomUtil.getText(child)); DomUtil.appendText(child, t1); @@ -135,7 +135,7 @@ public void testGetSiblings() throws Exception { Element root = DomUtil.newDocument("foo"); - Element child1 = DomUtil.appendChildWithNamespace(root, "bargle"); + Element child1 = DomUtil.appendChildInheritNamespace(root, "bargle"); Element child2 = DomUtil.appendChild(root, "argle", "bargle"); Element child3 = DomUtil.appendChild(root, "argle", "w:wargle"); DomUtil.appendText(root, "should never be returned"); @@ -176,7 +176,7 @@ { Element root = DomUtil.newDocument("foo"); DomUtil.appendText(root, "bar"); - Element child1 = DomUtil.appendChildWithNamespace(root, "bargle"); + Element child1 = DomUtil.appendChildInheritNamespace(root, "bargle"); Element child2 = DomUtil.appendChild(root, "argle", "bargle"); Element child3 = DomUtil.appendChild(root, "argle", "w:wargle"); @@ -250,8 +250,8 @@ final String TEXT2_WS = " "; Element root = DomUtil.newDocument("foo"); - Element child1 = DomUtil.appendChildWithNamespace(root, "foo"); - Element child2 = DomUtil.appendChildWithNamespace(root, "foo"); + Element child1 = DomUtil.appendChildInheritNamespace(root, "foo"); + Element child2 = DomUtil.appendChildInheritNamespace(root, "foo"); DomUtil.setText(child1, TEXT1_WS); DomUtil.setText(child2, TEXT2_WS); @@ -273,8 +273,8 @@ public void testRemoveEmptyText() throws Exception { Element root = DomUtil.newDocument("foo"); - Element child1 = DomUtil.appendChildWithNamespace(root, "foo"); - Element child2 = DomUtil.appendChildWithNamespace(root, "foo"); + Element child1 = DomUtil.appendChildInheritNamespace(root, "foo"); + Element child2 = DomUtil.appendChildInheritNamespace(root, "foo"); DomUtil.setText(child1, "foo"); DomUtil.setText(child2, " "); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |