- From: Vasil Rangelov <boen.robot@gmail.com>
- Date: Wed, 28 Nov 2007 00:34:18 +0200
- To: <public-xml-processing-model-comments@w3.org>
OK. I give up. The second argument idea would be impossible to implement. Its "any of the available" part to be more precise. Unless implementations could automatically differentiate between the different paths, the interpreter must be relied upon to differentiate them. There is still a need for a way to get values from environment variables though, and that new function remains one possible resolution. Anyhow, the command is relative to the CWD, and any command you ask for, if it's in one of the folders in the PATH would get executed no matter the CWD. So having <p:exec . . . command="perl". . ./> Should still work, wouldn't it? I mean if the pipeline was located in "D:\", then with the CWD defaulted to the base URI, and COMMAND being relative to that, the above would be like having D:\>perl In the command prompt (notice the ">" separating the CWD from the actual command being entered), not C:\Documents and Settings\User>D:\perl Which would obviously not work, unless the Perl executable happened to be in "D:\". And if the executable was not accessed directly from the path, it wouldn't work anyway. Not with Windows' CLI at least. I tried a sort of D:\>"Folder\new.bat" Where "Folder\new.txt" doesn't exist in this folder, but in a folder that's within a folder from the PATH, and didn't worked. -----Original Message----- From: Vasil Rangelov [mailto:boen.robot@gmail.com] Sent: Tuesday, November 27, 2007 10:02 PM To: 'public-xml-processing-model-comments@w3.org' Subject: RE: An unfulfilled requirement maybe? On second thought, environmental variables could also have multiple values, separated by a platform defined character (on Windows, that's ";". I don't know about others). Having said that, such a function would need a way to select a special path from the listed, or "any of the listed" or "the whole value" in case the value is not even a path. How should this be done... probably have a second argument indicating what value to use. The default value of "0" to this optional argument should mean the complete value. A special value, like say "-1" should mean "any one". And all positive integers should mean a specific value in the path order. Nah... this means you won't be able to select paths from the end, which may be desirable in some cases. Then maybe any non-numeric value (i.e. "NaN") should mean "any of the available" while a negative integer would mean "that path from the end"? -----Original Message----- From: Vasil Rangelov [mailto:boen.robot@gmail.com] Sent: Tuesday, November 27, 2007 9:41 PM To: 'public-xml-processing-model-comments@w3.org' Subject: RE: An unfulfilled requirement maybe? Oh. That. Well, again, if a sysntax for environmental variables is established, an explicit reference to the PATH may be added in the command path and/or CWD. Suppose AVTs were the type of syntax, then the final path may be something like: <p:exec ... command="{PATH}perl" ... /> Another way, now that I think about it, could possibly involve a new extension function (suppose called something like p:env($varname as string)) that can be embedded in one of the options like: <p:exec> <p:option name="command" select="concat(p:env('PATH'),'perl')"/> </p:exec> In this case, CWD is of no importance, since PATH is always an absolute path (or at least is by default anyway). -----Original Message----- From: Henry S. Thompson [mailto:ht@inf.ed.ac.uk] Sent: Tuesday, November 27, 2007 9:21 PM To: Vasil Rangelov Cc: public-xml-processing-model-comments@w3.org Subject: Re: An unfulfilled requirement maybe? -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Vasil Rangelov writes: > "search path"? What is that? That's the first time I hear about it, and I > found no info on Wikipedia about it. The PATH environment variable. On your proposal, how can I write a pipeline which e.g. runs perl w/o knowing the full path to its location? As things stand, I just say <p:exec . . . command="perl". . ./>, but that won't work under your proposal. ht - -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (GNU/Linux) iD8DBQFHTG4MkjnJixAXWBoRAsOfAJ9VAj+WEjrf4DOZjaUJe8V4eXoDuwCdFgyO Ni0hMMkkfct8qCfLDed390Y= =MhoU -----END PGP SIGNATURE-----
Received on Tuesday, 27 November 2007 22:34:33 UTC