Hi Gerry, > <echo refid="HelloEcho" message="Goodbye!"/> > <!-- here the echo task gets init'ed with 'Hello, World!' then gets set > to 'Goodbye!'. -->
humm... For tasks with simple attributes, this makes quite a bit of sense, and it's semantically simple. However, what would be the semantics for more complex elements, say, a FileSet? For example, consider this: <fileset id="Fileset1"> <includes name="src/**/*.cs"/> <includes name="tests/**/*.cs"/> </fileset> <fileset refid="Fileset1"> <excludes name="src/file.cs"/> </fileset> What would the semantics be? Should the second FileSet excludes/includes element be "merged" with the original FileSet's filelist? Or should the list be replaced? I think the correct solution would be to Merge them (iow, in the example above, you'd end up with a fileset with two includes and one exclude. However, I'm not sure this would be the best solution in all cases. A second thing I have been considering is that during reinitialization what you really want is to copy the original element instance. IOW, elements should be clonable. Why? Well, if you always made changes on the same object that was initialized when the element with the id attribute was found. Otherwise when you refid'd a single element more than once later in the buildfile, there's no way you could predict exactly what that element would contain. For example, if I created yet another fileset referencing Fileset1 above, what would it be referencing? A FileSet with two includes, or a FileSet with two-includes and one excludes? I think the first behavior is what the user would expect, and it's the easier to deal with in complex buildfiles... What do you guys think? Finally, am I right in assuming that given NAnt's current behavior when loading the buildfiles, this would require that an element can only be refid'd _after_ the original element with such _id_ appears? IOW, in a sortta-programming-language-like way, elements can only be referenced after they have been defined? -- Tomas Restrepo [EMAIL PROTECTED] ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ Nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
