Bug 57112 - <macrodef>: ability to transform a nested element
Summary: <macrodef>: ability to transform a nested element
Status: NEW
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Ant Notifications List
Depends on:
Reported: 2014-10-18 04:58 UTC by Matthew Cline
Modified: 2014-10-18 04:58 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Cline 2014-10-18 04:58:35 UTC
In a <macrodef>, I'd like to be able to take the text and attributes of a nested element, and use it to construct something entirely different.  A simple example of what I'm thinking about:

    <macrodef name="transform_demo">
        <transformed_element name="foo" optional="yes"/>
            <foo><echo message="@{foo.text}"/></foo>
A usage:


The result:

    <echo message="A"/>
    <echo message="B"/>
    <echo message="C"/>