Re: Processing CDATA content with DSSSL/Jade?

Subject: Re: Processing CDATA content with DSSSL/Jade?
From: "Mitch C. Amiano" <amiamc@xxxxxxxxxxxxxxx>
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:

(define read-entity (external-procedure "UNREGISTERED::James
Clark//Procedure::read-entity"))

(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


Current Thread
  • Re: Processing CDATA content with DSSSL/Jade?, (continued)
        • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id IAA13988Fri, 24 Jul 1998 08:23:07 -0400 (EDT)
        • Sebastian Rahtz - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA14876Fri, 24 Jul 1998 09:15:43 -0400 (EDT)
        • Norman Walsh - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id JAA15346Fri, 24 Jul 1998 09:35:54 -0400 (EDT)
        • Sebastian Rahtz - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id KAA17233Fri, 24 Jul 1998 10:07:52 -0400 (EDT)
    • Mitch C. Amiano - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id MAA26330Thu, 30 Jul 1998 12:12:53 -0400 (EDT) <=