The default ns for ant is "ant:core". <ant:project name="antx" default="help" xmlns:ant="ant:core" xmlns:ac="antlib:net.sf.antcontrib">
<ant:target name="help"> <ant:echo>This is a test!</ant:echo> <ac:shellscript shell="bash"> echo This is also a test </ac:shellscript> </ant:target> </ant:project> as described in opps.... missing documentation. Peter On Friday 17 October 2003 21:37, Dominique Devienne wrote: > 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" > xmlns:bm="antlib:com.lgc.buildmagic"> > > <description> ... </description> > > <property environment="env" /> > > <target name="help"> > <bm:projecthelp /> > </target> > > ... > > </project> > > 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 > > BUILD FAILED > 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 <[EMAIL PROTECTED]> Oct 2003 > --> > <ant:project name="antx" default="help" > xmlns:ant="Ant URI???" > xmlns:bm="antlib:com.lgc.buildmagic"> > > <ant:target name="help"> > <ant:echo>This is a test!</ant:echo> > <bm:projecthelp /> > </ant:target> > > </ant:project> > > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]