ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Bekker" <ebek...@powervision.com>
Subject Re: Call for patches
Date Wed, 24 May 2000 12:22:16 GMT
Actually, I like the script blocks being evaluated as the XML is parsed in
the PI, because if you actually need to delay the evaluation, you can
synthesize that by creating a sub-routine in the script and calling it when
you need to evaluate it.

However, I am a proponent of moving the evaluation of the element fields
(including the properties tag) being evaluated at run-time instead of XML
parse time.  One of the tasks that I tried to write for Ant was an INPUT
tag that actually got interactive input from the console when the user ran
it.  Unfortunately, I soon learned that it wouldn't work as intended since
all element, and their attributes are evaluated for their values so it
would always execute the prompt whether or not that task was executed.



Jose Alberto Fernandez wrote:
> 
> rubys@us.ibm.com wrote:
> 
> > > One thing to note, in my implementation I actually support script
> > > blocks in terms of processing instructions (PI)
> > >
> > > <?script
> > >  var foo = 1;
> > >  var bar = 2;
> > >  var cond = (foo < bar) && (bar - foo > 0);
> > > ?>
> >
> > Please don't make me reinvent this.  If you send it, I will integrate it
> > ASAP.
> >
> 
> I really like the idea of using PI forthis kind of evaluation. In particular I
> think
> it would settle the controversy about conditional properties being evaluated
> during runtime or during loading of the XML.
> 
> By using processing instructions, I think one can make a clear case for the
> processing
> to occur as the XML is parsed. Which is consistent with the current ideas about
> 
> when properties are evaluated.
> 
> Maybe it would also make sence to treat the available task the same way. As a
> PI.
> 
> >
> > My feeling is that adding a simple thing as ORs or ANDs to BSF is the
> > beginning of a very slippery slope...by the time you are done you end up
> > with XSLT.  XSLT is great for pattern matching and tree manipulation, but
> > as a programming language it leaves something to be desired.
> >
> > I very much want the BSF core to be free of all of this.  People who don't
> > need this stuff are not encumbered by it.
> >
> > Then I want an optional package which allows you to use the scripting
> > language of your choice.  At that point, you will be free to use all the
> > facilities of that language.  However, you will have to accept all that
> > that implies.  If you want to use VBScript and manipuate the Windows
> > registry, then your build script will likely only ever run on Windows.  And
> > if you feel so inclined, you can even make the steps optional based on the
> > value of various Java system properties.
> >
> > And I agree that a PI would be a more natural syntax for this in many
> > cases.
> >
> > - Sam Ruby
> >
> > P.S.  CDATA can also be used to avoid the need to subsitute entity
> > expressions for operators.
> >
> > P.P.S.  BSF will either become open source, or I will die trying.  I'm
> > meeting again today with the IBM lawyers.
> 
> --
>   ------------------------------------------------------------------------
>  Jose Alberto Fernandez               500 Oracle Parkway, M/S 9op4
>  Development Manager                  Redwood Shores, CA 94065
>  ORACLE Corp.                         Phone: (650) 506-8830
>  Java Products Group                  Fax: (650) 506-7303
>  Languages & Obj-Relational Tech      Email: jofernan@us.oracle.com

-- 
Eugene Bekker
Chief Architect
PowerVision Corporation
http://www.powervision.com
tel://410/312.7243 cel://443/838.6330

Mime
View raw message