Re: calling external functions

Subject: Re: calling external functions
From: "Mitch C. Amiano" <amiamc@xxxxxxxxxxxxxxx>
Date: Fri, 17 Dec 1999 12:23:15 -0500
Holger Klawitter wrote:
> 
> Hi there,
> 
> is there any way to call external functions from withing DSSSL, most
> perferably perl scripts or similar.

DSSSL specifies the concept of an externalprocedure, which Jade 
makes use of to implement its "formattinginstruction" extension.
I think it could be done with some C++ coding to add a new 
external procedure ("system-coupling" ?) to style/FlowObj.cxx,
style/FOTBuilder.*, and one or more of the back ends 
(jade/TransformFOTBuilder.* ?), following the code used to do 
formattinginstruction.

> I repeatedly run over problems where I have to insert some information
> into a SGML document which cannot be computed (at reasonable cost) from
> within Jade. Lots of things like the URL of the "next" document, things
> might be passed into variables, but sometime the result has to be computed
> from context data which is only accessible to jade. Transforming text only
> inside specific elements is such an example.

Launching another process for string manipulation has got to be expensive though,
if the same transformations could be applied instead using DSSSL functions.

I've run into this too. While I could have used a "system-coupling" 
extention, I didn't want to modify Jade either.  The solution in my case
was to use an (empty) entity declaration, an entity reference
as a placeholder for the content, and a catalog to define the actual
enties in force during a processing run.  Obviously, this will only
work if the information can still be determined before processing
begins.

It is also possible, though very poorly performing, to use a URL
in the form of a CGI call, to read an entity. Since URL's accept
arguments, it is possible to parameterize the entity on values which
are determined at processing time.  It is a pain to go through
a network connection just to get, for instance, a list of files,
but it works in a pinch.

> I would like to do that without having to mess with the jade source
> code.
> 
> Any ideas?
>         Holger Klawitter
> --
> Holger Klawitter                                     +49 (0)251 484 0637
> holger@xxxxxxxxxxxx                             http://www.klawitter.de/
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

--                                                                          --
Mitch C. Amiano                                 Mitch.C.Amiano@xxxxxxxxxxxxxxx
Software Development Engineer
Engineering Tools and Process Engineering
Engineering Services
Raleigh Design Center
Alcatel USA


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread