Re: Newbie howto question.



Longfellow wrote (reordered):

> I'm using ANSI C and wish to avoid any non-standard usages.

Please consider using a light scripting language, such as Ruby. Everything
in all of software engineering is non-standard, so pick a non-standard that
makes programming easy. Raw C is a simply miserable language for string
processing, and the "ANSI" seal of approval will provide portability to cell
phones, dongles, and other platforms you don't need.

> What I'm trying to figure out is an elegant way of inserting the
> information into the correct place in the html file.

The "HTML template" problem is as old as the World Wide Web, and there are
many, many solutions out there. One of them, common for systems like ASP and
eRuby, is to mix <html> tags with <% code %> tags. A server will parse the
tags and evaluate the scripting code between the <%%> marks.

The most "standard" solution here is slightly different. Write the data to
XML, and use an XML transformer, like the msxsl.exe or xsltproc.exe command
lines, to merge the XML with an XSLT file. That's a file with <html> tags
mixed with <xsl:xxx> commands, like <xsl:if> or <xsl:value-of>. The tags
query the input XML, via XPath, and insert results into a stream of <html>
output.

--
Phlip
http://www.c2.com/cgi/wiki?ZeekLand


.



Relevant Pages

  • Re: Simple password login
    ... IE allows a non-standard "shortcutting" access to elements as you do in ... (IE allows a number of non-standard and sometimes trouble- ... Use HTML 4.01 strict doc-type. ... I would use the onSubmit property for the Javascript. ...
    (comp.lang.javascript)
  • Re: root and in-addr.arpa zone transfers
    ... On Donnerstag 10 September 2009 Stephane Bortzmeyer wrote: ... But this is a non-standard way, ... But a secure way since the files on internic.net are PGP-signed. ...
    (comp.protocols.dns.bind)