I answered this in an earlier post, perhaps with insufficient detail, when I 
said:

"You should be able to do it using combinations of the following CGIDEV2 subprocedures:

  - RtvHtmlRcd
  - RtvSubsVarInfo
  - Encode
  - Encode2
  - EncodeBlanks
  - WrtNoSection (not in the README (an oversight), but in the prototypes)"

To elaborate, here is how I would do it:

1. Read the external HTML with GetHtml, GetHtmlIfs, or GetHtmlIfsMult

2. Use RtvHtmlRcd to retrieve the HTML, one record at a time, by RRN for a section or for all the external HTML

3. For each record, encode the data with either Encode or Encode2. If blanks need to be encoded, use EncodeBlanks in addition to Encode or Encode2.

4. For each encoded record, pass its address and length to WrtNoSection

An alternative would be to use the IFS APIs to read the HTML file a line at a time and perform steps 3 and 4, above, for each.

By definition, HTML templates (externally described HTML) is static (not modified at run time). Run-time variable substitution produces dynamic content.

I don't plan to provide a subprocedure to encode the static data in an HTML template. Either of the above techniques allows programmers to do it themselves, writing the output either to the browser or to a new IFS file (with WrtHtmlToStmf).

Mel Rothman, CGIDEV2 Author
Mel Rothman, Inc.





Jon Paris wrote:
 >> I assume it's possible with the right combination of functions.  :)

I don't know how Giovanni does it with his (most every demo on the web site
can display its template) but you could easily write a simple function to
"grab" a pointer to the template.  Or read the file yourself etc.  I'm not
surprised that there is no function that does exactly what you want - it
doesn't really have much utility other than showing people the HTML you
used - or am I missing something?

Jon Paris
Partner400
www.Partner400.com




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.