## Re: Processing CDATA content with DSSSL/Jade?

 Subject: Re: Processing CDATA content with DSSSL/Jade? From: "Mitch C. Amiano" Date: Thu, 30 Jul 1998 12:10:45 -0400
>From a purist's point of view, there isn't a way to execute an arbitrary
process from within a DSSSL engine.
Pragmatically, an entity using a URL storage object identifier can
achieve this, but only at the cost of introducing another level of
indirection and layer of network communication, ie,

<!entity mathimage SYSTEM
"http://www.foobar.com/cgibin/tex2image.cgi?arg1+arg2+arg3";>

James' "read-entity" extension can be used to read an entity, and in
this case all it would need to read back is the location of a formatted
version of a file. It would be similar to this (untested) code:

(element unitlist
(let* ((prodid (attribute-string "productid"))
(unitfile (string-append
"http://www.alcatel.com/cgibin/unitlist.cgi?"; prodid )))
(make element
gi: "img"
attributes: (list (list "src" (read-entity unitfile)) )
(literal "Unit List") )
))

This of course is a hack, and will be slow, and it poorly expresses what
is really going on (wrt the coordinated creation of a resource which is
an image file), and requires the use of a non-standard procedure, and
can have side effects, and requires Jade to have URL support turned on.
But it does indeed fire off an external process whose system name and
arguments are determined at processing time.

Thomas Corte wrote:
>
> Hello,
>
> I wonder whether the following can be done with DSSSL/Jade; I have
>
> <!ELEMENT TeXMath - - CDATA>
>
> to be used like this:
>
> <texmath>$x = \frac{y}{z}$</texmath>
>
> for direct inclusion of TeX math within my SGML document instance
> (thus obtaining a powerful Math markup language without having to deal
> with MathML).
>
> Now it would be nice if I could
>
> - send the whole formula essentially unaltered through to Jadetex for
>   TeX formatting or even
> - process the formula with TeX using an external process and convert it
>   to, say, GIF for inclusion in HTML output - I'm aware that this is by no
>   means a side-effect-free operation :-).
>
> Up to now, I have not even found a way to get hold of CDATA contents within
> my style sheet. Furthermore, there seems to be no way to call external
> programs from DSSSL - this, however, is reasonable with respect to
> side-effect-freeness and system-independence.
>
> Any help would be appreciated.
>
> Thomas Corte
>
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

--
Mitch C. Amiano
amiamc@xxxxxxxxxxxxxxx
Technical Staff Member  Advanced Design Process Group  Alcatel Network
Systems

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