----- Original Message -----
From: "Conor MacNeill" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>
Cc: "Nant-Developers (E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, August 04, 2004 1:53 PM
Subject: Re: [nant-dev] Extend CustomXmlProcessing to attributes


> Gert Driesen wrote:
>
> > Hi Conor,
> >
> > What would you actually need this for ?
> >
>
> The initial Clover.NET NAnt tasks worked by replacing the csc task
> definition with a driver task that would intercept the csc compilation,
> perform some additional operations (instrumentation) and then processed
> with csc after adjusting some parameters - source locations.
>
> The InitializeTask method of this task looked like
>
>          protected override void InitializeTask(XmlNode taskNode)
>          {
>              CloverContext context = CloverContext.GetContext();
>
>              TaskBuilder builder = context.OriginalCSC;
>
>              csc = (CscTask) builder.CreateTask();
>              csc.Project = Project;
>              csc.NamespaceManager = Project.NamespaceManager;
>              csc.Initialize(taskNode);
>          }
>
> So, the replacement task does not do any attribute or element handling -
> it just delegates it to a private copy of the "real" csc task. In the
> current 0.85 snapshot, this fails because the clover verions of the task
> does not process any of the attributes.
>
> For a few reasons we disliked this implementation and the
> CustomXmlProcessing changes were enough to make us change it anyway so
> that in the end this is not a problem for us.
>
> Nevertheless, I thought that a task that declares it wants to do
> CustomXML processing may want to apply custom processing to both
> attributes and nested elements.
>
> > I'd like to avoid this, or if necessary we need to have two separate
> > properties (one for attributes and one for nested elements).
> >
>
> It's not a big deal. I'm not sure why you think they need to be separate
> concepts but if it is important, then do what you think is best.

The reason why I don't want to ignore both unknown attributes and unknown
nested elements, is that I needed a way to ignore unknown nested build
elements but still report errors for unknown attributes. We need this, for
example, for task container (like the <if> task).

> Though, the name CustomXMLProcessing is somewhat misleading, in that case,
I think

It might be better to have two separate properties
(CustomAttributeProcessing and CustomElementProcessing ???).

Gert



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to