2 standard inputs?

From: Derek Fountain (nomail_at_hursley.ibm.com)
Date: 10/25/03


Date: Sat, 25 Oct 2003 09:36:25 +0800

I have a script in which I've built two variables; one contains a string
which is XML text, the other contains a string which is XSLT text. I want
to feed these pieces of information into xsltproc, which actually takes two
filenames as input. I'm trying to avoid writing my 2 strings out to files,
just so xsltproc can load them.

I can avoid one of the files by supplying xsltproc /dev/stdin as one of it's
input files, then feeding one of my text strings to the standard input:

exec xsltproc /dev/stdin $xmlFilename << $xsltText

(The script is in Tcl, and this uses a feature of the Tcl exec command, but
I should be able to adapt any generic scripting answer.)

I can't think of a way of easily feeding the text which I'm currently
dumping in $xmlFilename into the xsltproc process without using the
intermediate file. Any ideas, anyone?



Relevant Pages

  • Re: How to rewrite with awk?
    ... > I'm unfamiliar with tools such as sed & awk. ... Extract the string that matches a RE. ... This script will not only expand all the lines that say "include ... file) and not resetting ARGV(the tmp file), it then lets awk do any ...
    (comp.unix.shell)
  • Re: Slow string
    ... I see virtually no difference in execution time for the code you posted when using cscript versus using wscript; to confirm, I bracketed the code with an initial ... Are you actually entering the script name into a console window? ... You can use the exact same line for every wrapper script - and that includes wsf and js scripts; all you need to do is change the final "vbs" to "wsf" or "js" as appropriate. ... If you build a large string by small concatenations, the performance degrades geometrically - so does array resizing, because they both use the same nasty technique inherited from VB1 of copying the entire data structure to a new structure with the added element. ...
    (microsoft.public.scripting.vbscript)
  • Re: Function that returns date of file.
    ... string after the date/time when it is used by itself. ... Is that your entire script? ... I make an IF statement that required the 'equals equals'. ... designed database your job will be all that much harder. ...
    (alt.php)
  • Re: Script: Remote shutdown of all domain computers
    ... When trying to run the script from a XP workstation, where i am logged in as ... Dim strBase, strFilter, strAttributes, strQuery, objRecordSet ... 2000 or above and allow shutdown, ... Public Function AllComputersAs String() ...
    (microsoft.public.windows.server.scripting)
  • Re: Update Notes Field
    ... I was able to run the script without any problems. ... The info attribute can be assigned a value when the user object is created, but I don't see where dsadd can do it. ... Most attributes are string values, and VBScript strings can include the character vbCrLf. ... If there is another way to add the information to the Notes field, ...
    (microsoft.public.windows.server.active_directory)