Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3219

NamespaceBuilder does not create child nodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.7
    • 1.6-rc-2, 1.5.8, 1.7-beta-1
    • None
    • None

    Description

      NamespaceBuilder does not create child nodes

      	@Test
      	void testNamespaceBuilder() {
      
      		def n = new Namespace('http://foo/bar')
      		
      		def builder = new NamespaceBuilder(new NodeBuilder()).namespace(n.uri)
      		Node node = builder.crap(id:"3") {
      			bucket(name:"foo")
      		}
      		// ** this prints out only the "crap" element, not its child
      		new XmlNodePrinter().print(node)
      
      		// *** fails
      		assert node[n.bucket][0].@name == 'foo'
      
      	}
      

      If I'm not missing something here then the bug is in NamespaceBuidlerSupport (it doesn't do anything with the BuilderSupport instance that you pass into the constructor).

      Attachments

        Activity

          People

            paulk Paul King
            david_syer Dave Syer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: