Re: Including the result of an external program

Subject: Re: Including the result of an external program
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Wed, 10 May 2000 15:09:25 -0500
Quoting Gary Lawrence Murphy <garym@xxxxxxxxxx>:
> Further to the earlier post on including stdin into a document, I have
> a wish-list item that seems so common and general a task, someone must
> have worked out a solution: I'd like to pass parameters to an external
> program from within an SGML tag and replace that tag with the output
> results.
   How about approaching this from a slightly different angle?
Instead of trying to execute the programs during the DSSSL processing,
why not have the DSSSL processing compile a list of programs that need
to be run, and insert entity references that point to where the
results of those programs will be stored?
   The first run of Jade would pass the SGML through, relatively
untouched, except that the links to the source code (using links, such
as the Olink stuff, instead of refentry tags) will be replaced with
entity references, and an auxiliary file will be generated listing all
of the source files that need to have their documentation parsed out,
as well as the names of the files to place the output in.
   Then, a simple script would iterate through that list, launching
the source parses as needed.
   A second pass of Jade could then do the actual formatting,
including the documentation from the source files, which will be
pulled right in from the results of the source parsing.
   The first-pass stylesheet would probably have some processing in
the (root) rule to generate a list of all the link elements and
process them all at once (inside of a (make entity) to generate the
separate file), then just have the (default) rule copy everything
verbatim, except for a rule to handle the link elements and turn them
into entity references.
   Package this all up into a nice shell script, and the coders will
be none the wiser. :)

-Brandon :)

 DSSSList info and archive:

Current Thread