ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Koberg <...@koberg.com>
Subject Re: property validation
Date Wed, 27 Oct 2004 23:18:45 GMT
Mark Lybarger wrote:

> i'd like to validate some properties in my build file. we have version numbers specified
as MAJOR, MINOR, and BUG and i'd like to make sure they're numeric (preferably 2 digits or
under).  does anyone know how i can possibly use ant's script (javascript) or something else
to validate this?
> 

write a custom schema. In XML Schema you would do something like:

<xs:attribute
   name="MAJOR"
   use="required"
   type="xs:int"/>

Many people find Relax NG much easier to work with, so you might want to 
use it.

best,
-Rob


> thanks
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message