/usr/share/doc/hsc/docs/others.html is in hsc 0.934-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>hsc - Using Other HTML-Extensions</title>
<link rev="owns" title="Thomas Aglassinger" href="mailto:agi@giga.or.at">
<link rel="Next" href="bugs.html">
<link rel="Copyright" href="copy.html">
<link rel="Previous" href="ports.html">
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
</head>
<body>
<a href="index.html"><img src="image/main.png" alt="Contents" align="middle" width="70" height="16"></a>
<img src="image/noindex.png" alt="-----" align="middle" width="70" height="16">
<a href="copy.html"><img src="image/copy.png" alt="Copyright" align="middle" width="70" height="16"></a>
<a href="index.html"><img src="image/back.png" alt="Up" align="middle" width="70" height="16"></a>
<a href="ports.html"><img src="image/prev.png" alt="Previous" align="middle" width="70" height="16"></a>
<a href="bugs.html"><img src="image/next.png" alt="Next" align="middle" width="70" height="16"></a>
<hr>
<h1>Using Other HTML-Extensions</h1>
<p>As HTML has turned out to be incredibly useless very soon, many
people have written several extension trying to reduce this
uselessness. Most of them only increased it. However, this will
shortly comment on some of these extensions, and how you can use them
together with <kbd>hsc</kbd>.</p>
<h2>General Comments</h2>
<p>When you process a page with <kbd>hsc</kbd>, there is no way to change any
data of the HTML object after it has been created; <kbd>hsc</kbd> only does a
static job. Many of the extensions described below allow documents or
parts of them to be created dynamically. But then you will have to
care about several security problems.</p>
<p>Most of these concepts integrate themselves into HTML in a fairly
clean way (usually by means of sgml-comments). For others you will
need to utilise <a href="features/spctags.html#dontparse"><code><| .. |></code></a> (skip verbatim data) to make <kbd>hsc</kbd> accept them. If this
still does not help, there is no way to use a specific extension
together with <kbd>hsc</kbd>. There definitely will not be built-in support for
any of these extensions.</p>
<p>This chapter does not pretend to describe all of them, but most
suggestions provided here should also work with most others
extensions. You also will not find any information about where to
obtain these tools from. Ask your favourite w3-search engine for
details.</p>
<h2>Server Side Includes</h2>
<p>Server Side Includes (SSI) are one of the oldest extensions for
w3-servers. An example command would be
<pre><!--#echo="DATE_GMT"--></pre>
which more or less does the same as
<pre><(GetGMTime())></pre>
<p>in <kbd>hsc</kbd>, with the difference that the ssi-version will be executed
every time one accesses the page.</p>
<p>As the SSI-call is done inside a sgml-comment, <kbd>hsc</kbd> will
not care about it and simply skip it. Only make sure you did not set
the command line option <a href="options.html#stripcomment"><kbd>StripComment</kbd></a>. The sgml-comment will
be substituted by your server later (if it supports SSI).</p>
<p>Usually SSI-operations result in an increased CPU-load of your
server, as they have to be performed every time one accesses the page.
</p>
<h2>Common Gateway Interface</h2>
<p>Most w3-servers also support the so called Common Gateway Interface
(CGI). This is just the simple capability to return the output a
program wrote to <code>stdout</code> as w3-page. CGI-programs are usually
unreadable and unmaintainable Perl-scripts more or less entirely
consisting of statements like
<code>printf("<html><head><title>cool
script</title>..")</code>.</p>
<p>Ill-minded people could think about invoking <kbd>hsc</kbd> inside a
CGI-script. I do not recommend this for several reasons that
should be obvious.</p>
<h2>JavaScript</h2>
<p>JavaScript has been developed to show scrolling messages on your
pages. It should have been named ScrollerScript, but as it came out
more or less at the same time when the hype on a programming language
called Java (poor man's SmallTalk raped by C++ which is expected to
solve all problems of the world, including traffic, pollution and
AIDS) started, its creators decided to use the term ``Java'' in
it's name, too.</p>
Scripts implemented in a clean way like
<pre><script type="text/javascript"><!--
// ..script text..
// -->
</script></pre>
should not cause problems, as they are also embedded inside
sgml-comments like ssi.
<h2>Personal Home Page Tool/Form Interpreter</h2>
<p>The Personal Home Page Tool/Form Interpreter (PHP/FI) started as a
messy Perl-script acting as some simple CGI-wrapper. As time passed,
it grew to a inflated and inconsistent moloch providing a
simple programming language inside HTML-documents. It also supports
things like embedded SQL, and some people with other presuicidal
syndromes even use it as a plug-in with their w3-server.</p>
<p>The syntax does a very good job on combining the drawbacks of C
with the disadvantages of Perl, in general resulting in a completely
unreadable sequence of seemingly random characters. Therefore, it became
quite popular among Unix-fossils. For example, one could have this
line in a source code:</p>
<pre><?echo "Hi $Name!<p>"></pre>
If you pass this to <kbd>hsc</kbd>, it will not be very happy about it.
However, you can use <a href="features/spctags.html#dontparse"><code><| .. |></code></a> (skip verbatim data) to include PHP/FI-stuff:
<pre><|<?echo "Hi $Name!<p>">|></pre>
If you want to access data of <kbd>hsc</kbd> into your PHP/FI-section, it will
become a bit tricky. But with <a href="features/spctags.html#expression"><code><( .. )></code></a> (insert expression) even this is
possible:
<pre>
<$define Name:string="Sepp">
<(
'<|' +
'<?echo "Hello, ' + Name + '!">' +
'|>'
)></pre>
will temporarily result in
<pre><|<?echo "Hello, Sepp!">|></pre>
and after being processed by <kbd>hsc</kbd> a
<pre><?echo "Hello, Sepp!"></pre>
<p>will show up in the HTML object. If you are really sure that code
like the above will not significantly reduce your life expectancy, do
not hesitate to use it. But if you use PHP/FI, you apparently are
sure about that.</p>
</body></html>
|