ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject Re: Roles (was: antlib)
Date Thu, 08 May 2003 18:50:42 GMT
peter reilly wrote:
> The NS standard
> allows one to do somthing like this:
> <project  xmlns:html=''>
>    <target name="t">
>        <echo html:class="reallyimportant">message</echo>
>     </target>
> </project>
> of course it is up to the ant software to understand the xml file,
> but "unsupported attribute 'class'" is not a usefull error message
> in this case.

I would make elements from namespaces without associated code
in certain positions legal (silently ignored by Ant) or a warning
level problem. Same for attributes from namespace which is not the
default namespace nor the namespace of the element. This allows
buildfile editors to put stuff for other tools into the buildfile
in a structured way. This is used for example in XSLT, which allows
elements  from non-default, non-xslt namespaces as immediate children
of xsl:stylesheet, for various purposes, the most oviously
useful is extended documentation:
  <xsl:stylesheet version="1.0
    <doc:title>A sample stylesheet</doc:title>
      <xhtml:p>The template matching <doc:subst what="match"/>
        is used for...
   <xsl:template match="foo">

Attributes could also provide interesting use cases:
   <task crossref:author="J. Random Hacker" ...
Well, You could achieve the same with PIs and the like, but
atributes are much easier to process with XSLT. For example
the above could provide an overview of which authors are
responsible for which tasks.


View raw message