Yes, you are correct on the dummy node issue. Good catch and my bad. :-)

Joe


-----Original Message-----
From: Ian MacLean [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 21, 2002 11:05 AM
To: Joe Jones
Cc: Shaw, Gerry; Jayme Edwards; [EMAIL PROTECTED]
Subject: Re: [nant-dev] cl task gone???


Joe Jones wrote:

>Anyway to incorporate XML namespaces into this instead of prefix? 
>Something like this:
>
><dotnet:dotnetns xmlns:dotnet="NAnt.DotNetTasks.dll" /> <!-- Dummy tag 
>to bring the namespace into existence --> <dotnet:csc>
>       <!--
>               Have the loader check the namespace assigned to the tag
>to get the 
>               appropriate assembly name for loading.
>       -->
>       ...
></dotnet:csc>
>
>Using this would allow us to drop the import tag (possibly) or to use 
>it as the dummy tag for laoding the namespace, E.G. <dotnet:import 
>xmlns:dotnet="NAnt.DotNetTasks.dll" /> Joe
>  
>
+1 for me on this. The same information is brought into the build file (
ie which assembly to load the task from ) but without introducing a new 
syntax. The only thing is the concept of a dummy tag won't work. Any 
namespaces introduced apply to the current tag and its children not 
other tags at the same level. So in your example <dotnet:csc> would have

to be a child of <dotnet:dotnetns >. However putting them at the project

node would work. So for example :

<?xml version="1.0"?>
<project    xmlns:dotnet="NAnt.DotNetTasks.dll"
                xmlns:zip="NAnt.ZipTasks.dll" >
    <target name="foo" >
        <dotnet:csc>
                   
        </dotnet:csc>
        <zip:unzip>
       
        </zip:unzip>
    </target>
</project>

where the namespace rules work as normal for xml with the additional 
NAnt constraint that the expanded name maps to a valid task assembly 
findable by NAnt.

Ian 




-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old cell
phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Nant-developers mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to