/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements. See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership. The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */
package org.apache.commons.weaver.ant;

import java.util.Properties;

import org.apache.commons.lang3.StringUtils;
import org.apache.tools.ant.DynamicElement;

/**
 * <p>Structure to allow inline specification of properties.</p>
 * <p>Example:
 * {pre}&lt;foo&gt;foo-value&lt;/foo&gt;
 * &lt;bar&gt;bar-value&lt;/bar&gt;
 * &lt;baz&gt;baz
 * -nextline-value&lt;/baz&gt;
 * {/pre}
 * </p>
 */
public class InlineProperties implements DynamicElement {
    /**
     * Represents a single inline property.
     */
    public final class InlineProperty {
        private final String name;

        private InlineProperty(String name) {
            this.name = name;
        }

        /**
         * Add text to this property.
         * @param text to add
         */
        public void addText(String text) {
            final String value;
            if (properties.containsKey(name)) {
                value = StringUtils.join(properties.getProperty(name), text);
            } else {
                value = text;
            }
            properties.setProperty(name, value);
        }
    }

    /**
     * {@link Properties} object maintained by the {@link InlineProperties}.
     */
    final Properties properties = new Properties();

    /**
     * Handle the specified nested element.
     * @param name property name
     * @return {@link InlineProperty}
     */
    public InlineProperty createDynamicElement(String name) {
        return new InlineProperty(name);
    }
}
@@ -910,16 +910,60 @@
 gUtils;%0A
+import org.apache.tools.ant.BuildException;%0A
 import o
@@ -996,16 +996,18 @@
 cElement
+NS
 ;%0A%0A/**%0A 
@@ -1288,16 +1288,18 @@
 cElement
+NS
  %7B%0A    /
@@ -2156,132 +2156,227 @@
 ram 
-name property name%0A     * @return %7B@link InlineProperty%7D%0A     */%0A    public InlineProperty createDynamicElement(String name)
+uri String URI%0A     * @param localName local element name%0A     * @param qName qualified name%0A     */%0A    @Override%0A    public Object createDynamicElement(String uri, String localName, String qName) throws BuildException
  %7B%0A 
@@ -2404,25 +2404,30 @@
 ineProperty(
-n
+localN
 ame);%0A    %7D%0A

use DynamicElementNS interface as it preserves case