Other XML based vocabularies have a top-level version
attribute, let's say have
 <project version="1.0" default="package" basedir=".">

During execution you can use this to control behaviour
 public void execute()
  throws BuildException
{
  if( getVersion().equals( Version.v10 ) )
  {
    doAntCallOriginal();
  }
  else if( getVersion().later( Version.v11 ) )
  {
    doAntCallV2();
  }
  else
  {
  ...
  }
}
If you make syntax checks during parsing, the version
will have to control this as well.
Ansother possibility is simply to branch to the appropriate
reader/tree-builder/executor once the version attribute is
encountered.

Note that this version attribute does not describe the
version of ant but the version of the buildfile vocabulary
(probably, but not necessarily semantics too).

J.Pietschmann



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to