xslt has had functions from the start and I'm never tempted to try to implement a match template as a function - its probably possible but it would be a major PITA.
Ian
Gert Driesen wrote:
Jarek,
I know this can all be implemented using functions, but my concern is that build files might start looking like regular source code instead of xml files, that's all ...
Function support is something NAnt urgently needed, and I will definitely use it myself, but I just want to make sure we don't (ab)use it for just about everything, and don't offer users any alternatives ...
Tasks should offer functionality on a much higher level than functions ...
Gert
----- Original Message ----- From: "Jaroslaw Kowalski" <[EMAIL PROTECTED]>
To: "Gert Driesen" <[EMAIL PROTECTED]>; "Ian MacLean"
<[EMAIL PROTECTED]>; "William E Caputo" <[EMAIL PROTECTED]>
Cc: "Nant-Developers (E-Mail)" <[EMAIL PROTECTED]>
Sent: Sunday, December 14, 2003 11:48 AM
Subject: Re: [nant-dev] SUBMISSION: Path Task
We already have tasks:used
<sysinfo> <tstamp> <available> <if>
that are basically readonly (they only change properties) and are just
toto retrieve/calculate some information. We have four ways of doing so, why add fifth one? I think this should be done as a function ONLY:
<property name="somepath" value="c:\temp\test.txt" /> <property name="basename" value="${path::get-file-name-without-extension(somepath)}" />
It's both readable and can be used in all places, like CSC task:
<csc output="${path::combine(path::get-directory-name(somefile), 'outputfile.dll')}"> ... </csc>
or:
<csc output="${path::get-directory-name(somefile)}/outputfile.dll"> ... </csc>
Try it:
http://jaak.sav.net/nant-ee/nant-ee-test4.zip
Jarek
----- Original Message ----- From: "Gert Driesen" <[EMAIL PROTECTED]>
To: "Ian MacLean" <[EMAIL PROTECTED]>; "William E Caputo"
<[EMAIL PROTECTED]>
Cc: "Nant-Developers (E-Mail)" <[EMAIL PROTECTED]>
Sent: Sunday, December 14, 2003 11:21 AM
Subject: Re: [nant-dev] SUBMISSION: Path Task
<start-rant>
Guess this will be the start of many dilemma's ... I'm pretty sure there
will always be people that prefer xml build elements only, and actually
that's also one of my concerns ... I'd hate to see build files reduced
nolarge chunks of scripts ...
As long as we allow build authors to choose themselves I certainly have
toproblem with the expression eval support, I actually like it very much,but
we should give build authors a choice in this matter ...task
I'm definitely not saying that we should provide a task alternative for
every function we support in the expression eval, but by not providing
support for "basic" build "tasks", we're actually forcing build authors
basename,use expression support ...
</end-rant>
If we decide to add William's task, I think we should :
- add it to NAntContrib first
- split it up into at least 3 tasks, like Ant has : dirname,
timeand path-combine (or something, doesn't exist in Ant)
What do you think ?
Gert
----- Original Message ----- From: "Ian MacLean" <[EMAIL PROTECTED]>
To: "William E Caputo" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, December 14, 2003 5:38 AM
Subject: Re: [nant-dev] SUBMISSION: Path Task
This looks good William. However I'm thinking that the new function support will be easier to use to do this kind of stuff.
the following path related functions will be included:
path.changeextension path.combine path.getdirectoryname path.getextension path.getfilename path.getfilenamewithoutextension path.getfullpath path.getpathroot path.gettempfilename path.gettemppath path.hasextension path.ispathrooted
Ian
William E Caputo wrote:
(This is a resend. I didn't see it come across the list the first
Isubmit
extractssent it. My apologies if it comes through twice)
Hi All,
Attached is a zip file containing a task called path. This task
currentpath information from a given partial (or complete) path name and
optionally expands it to a fully-qualified path, using either the
placesworking directory or the Project's base directory as the root, and
in a designated property.
I looked through the list of tasks and didn't see anything that did
something like this (and we needed it) so after implementing it in a
script task, I decided to code it up as a full-fledged task and
itwhere
in the hope that it will be useful to others.
I wrote it is as being in the Nant.Core namespace because that is
ourcopy and mkdir are (and we seem to always be manipulating paths in
somewherebuild files) but if the project's admins prefer that it be a
(Ielse in NAnt or submitted to NAntContrib instead that is fine by me
submitextractsdidn't cross post, but I will send it to that list if you like).
The task is accompanied by 12 tests, and is fully documented.
Best, Bill
William E. Caputo ThoughtWorks, Inc. http://www.williamcaputo.com -------- idia ktesis, koine chresis
Hi All,
Attached is a zip file containing a task called path. This task
currentpath information from a given partial (or complete) path name and
optionally expands it to a fully-qualified path, using either the
placesworking directory or the Project's base directory as the root, and
in a designated property.
I looked through the list of tasks and didn't see anything that did
something like this (and we needed it) so after implementing it in a
script task, I decided to code it up as a full-fledged task and
itwhere
in the hope that it will be useful to others.
I wrote it is as being in the Nant.Core namespace because that is
ourcopy and mkdir are (and we seem to always be manipulating paths in
somewherebuild files) but if the project's admins prefer that it be a
(Ielse in NAnt or submitted to NAntContrib instead that is fine by me
didn't cross post, but I will send it to that list if you like).
The task is accompanied by 12 tests, and is fully documented.
Best, Bill
William E. Caputo ThoughtWorks, Inc. http://www.williamcaputo.com -------- idia ktesis, koine chresis
-- Ian MacLean, Developer, ActiveState, a division of Sophos http://www.ActiveState.com
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers
--
Ian MacLean, Developer, ActiveState, a division of Sophos
http://www.ActiveState.com
------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ nant-developers mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-developers