inclusion procedure

Subject: inclusion procedure
From: David Megginson <ak117@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Aug 1997 16:43:14 -0400
Graydon Hoare writes:

 > this is a dumb newbie question but it's making things terribly difficult:
 > is there a simple procedure in scheme or DSSSL style language that halts
 > the parse, reads in the contents of another file, and restarts as though
 > the file were included inline?

Not in DSSSL proper -- there is no explicit file I/O -- but you can
use an external procedure called 'read-entity' if you're using Jade:

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

  (element INCLUDED-FILE
    (make literal
      (read-entity (attribute-string "FILE-NAME"))))

Note that this works for character-oriented data like source-code
listings, not binary data like graphics or video.  The included file
will not go through an SGML parse -- if you need to do that, take a
look at the 'sgml-parse' procedure in the SDQL.  If you need to
include binary data, take a look at the 'external-graphic' flow-object

All the best,


David Megginson                 ak117@xxxxxxxxxxxxxxxxxxx
Microstar Software Ltd.         dmeggins@xxxxxxxxxxxxx

 DSSSList info and archive:

Current Thread