ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject Official (reserved?) namespace of Ant itself???
Date Fri, 17 Oct 2003 20:37:38 GMT
Peter and al.,

I've started using Ant 1.6, and I *really* like the new support
for XML namespaces, so much so that I'm creating AntLibs for all
custom tasks I use (mine own, Ant-Contrib, CppTasks, etc...).

One thing that's missing for me in the build snippet below is the
namespace URI for the default namespace (the xmlns="URI" one).

<project name="buildtools" default="help"

  <description> ... </description>

  <property environment="env" />

  <target name="help">
    <bm:projecthelp />



As it stands, <project> / <property> / <description> / <target>
are in no namespace at all. This hurts my XML sensibilities, and
also it will eventually hurt when people (like me) start doing
AntLib-specific XML validation (for editing purposes most likely)
using either W3C XML Schema, or Relax NG. OK, it might not be that
much of a problem, but still...

Also, suppose someone would like to embeb Ant build snippets into
another XML document/top-level XML element from a different
namespace? Or even not have a default namespace at all:

C:\oss\org_apache\antx\buildtools>ant -f empty-xmlns.xml
Buildfile: empty-xmlns.xml

C:\oss\org_apache\antx\buildtools\empty-xmlns.xml:8: Unexpected element
"ant:project" project

Total time: 0 seconds
C:\oss\org_apache\antx\buildtools>type empty-xmlns.xml
<?xml version="1.0"?>

<!-- ANT build file to test a specific feature or bug of ANT.
     Dominique Devienne <>         Oct 2003
<ant:project name="antx" default="help"
             xmlns:ant="Ant URI???"

  <ant:target name="help">
    <ant:echo>This is a test!</ant:echo>
    <bm:projecthelp />


Shouldn't one be able to use this? Am I wrong in assuming the above
is valid XML, and thus should be accepted in Ant (provided Ant like
the URI)?

I'd like the know the official URI for Ant 1.6, and also have the build
script above work correctly before Ant 1.6 ships. Thanks, --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message