https://issues.apache.org/bugzilla/show_bug.cgi?id=52309

             Bug #: 52309
           Summary: Typedef doc: explicitely mention the need of
                    xmlns:taglibNs on <project>
           Product: Ant
           Version: 1.8.2
          Platform: PC
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Documentation
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


The last example at http://ant.apache.org/manual/Tasks/typedef.html shows
correctly how to use uri on taskdef but it's easy to overlook (as the ordinary
xml boilerplate) the absolutely necessary mapping of the thus created namespace
to a prefix on the project element. I therefore propose to rewrite it as
follows:

===
<!-- Notice the xmlns:antcontrib=<the uri from taskdef> - this is necessary to
be
able to use the antcontrib prefix for tasks in the lib --> 
<project xmlns:antcontrib="antlib:net.sf.antcontrib">
     <taskdef uri="antlib:net.sf.antcontrib"
              resource="net/sf/antcontrib/antlib.xml"
              classpath="path/to/ant-contrib.jar"/>
     <antcontrib:if> ...  </antcontrib:if>
===
(I've also actually added a usage of the task to make the example complete.)

Thanks a lot!

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to