Well, the XmlDocument object does give you a list of namespaces
associated with the current document so you should be able to do what
you are asking. According to the docs for XmlNode (which XmlDOcument
derives from)


XmlNode.NamespaceURI Property 

Gets the namespace URI of this node.

[C#]
public virtual string NamespaceURI {get;}

Property Value
The namespace URI of this node. If there is no namespace URI, this
property returns String.Empty.

Remarks
This is the namespace URI specified at creation time. For example,
NamespaceURI is urn:samples for the element <bk:book xmlns:bk=
"urn:samples">

An attribute does not inherit its namespace from the element it is
attached to. If an attribute is not explicitly given a namespace, it
simply has no namespace.


Joe


-----Original Message-----
From: Shaw, Gerry [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 21, 2002 11:19 AM
To: [EMAIL PROTECTED]
Subject: RE: [nant-dev] cl task gone???


Wow, I guess I should have read more about Xml namespaces.  Good thing
there is lots of smart people on this list.

This is really clean Joe/Ian but is there anyway to import a task dll
into the default namespace using this method?  Ie, I want to "import" a
number of task assemblies into the default (ie, no prefix) namespace but
import another into it's own namespace.  Here is some broken syntax that
demonstrates something like what I want to do.

<?xml version="1.0"?>
<project
    xmlns:default="NAnt.Core.dll"
    xmlns:default="NAnt.DotNetTasks.dll"
    xmlns:zip="NAnt.ZipTasks.dll" >

    <echo message="Hello"/>
    <target name="foo">
        <csc/>
        <zip:unzip/>
    </target>
</project>


Also it would be nice to be able to specify the strong name for the
assembly to import.

Another thing to think about is to associate your buildfile with a known
nant assembly.  Nothing worse than taking an older project and trying to
build it but have it not work because the version of nant on your system
is not backwards compatible.  By being tied to a version of nant you
would know the problem.


-------------------------------------------------------
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