Re: Newbie howto question.
- From: "Phlip" <phlip_cpp@xxxxxxxxx>
- Date: Tue, 26 Apr 2005 00:59:49 GMT
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
.
- References:
- Newbie howto question.
- From: Longfellow
- Newbie howto question.
- Prev by Date: Re: Invoking a function through function pointer
- Next by Date: Re: Which programming language/db to use?
- Previous by thread: Newbie howto question.
- Next by thread: Re: Newbie howto question.
- Index(es):
Relevant Pages
|