hsc-0.934.orig/ 0040700 0001750 0000144 00000000000 10015376350 012143 5 ustar lory users hsc-0.934.orig/amiga/ 0040700 0001750 0000144 00000000000 07776512740 013240 5 ustar lory users hsc-0.934.orig/amiga/msgbrowser.c 0100600 0001750 0000144 00000017366 07770472341 015606 0 ustar lory users /*
* This source code is part of hsc, a html-preprocessor,
* Copyright (C) 1995-1998 Thomas Aglassinger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
/*
* amiga/msgbrowser.c
*
* implements throwback functions for SAS/c message browser
*/
#ifndef AMIGA
/* Avoid that anything is attempted to be compiled on none-Amiga systems.
* A dummy symbol is declared to keep the linker from whining. */
char amiga_message_browser_dummy = 0;
#else
#include "hsc/global.h"
#include "ugly/fname.h"
#include Again, like in html, one kind of quotes might show up inside a string,
as long as it is quoted with other kind, for example: Now As you can see in the description of attribute
types, Because of the When the assigned value starts with a The There are two kind of quotes you can use for string constants,
namely single quotes (') and double quotes ("). You can use the one
inside of the other just as a normal character: Note that this is no Because of the limitations of html, it is not possible to use both
kind of quotes in one value. However, in hsc you could use string
concatenation to push both quotes into one value: The value of sepp then would be >> Now hsc can't use neither single nor double quotes to assign the value
of Note that several browsers are too stupid to display this
correctly. This paragraph deals with a feature you probably do not want to use
(and understand) before you understood how those macros work. You can
skip this part for now and return later. The macro But there has not necessarily a If On the first sight, it might seem that there is only the simple
condition One of the most annoying thing within creating HTML pages is to
find out if all your links work. Concepts superior to HTML and HTTP
usually maintain a database, which is automatically updated if a
document is moved or deleted. (And they already did that in they
seventies.) For local URIs (those which only refer to files), This can not only be caused by documents which are referred to
using For absolute URIs, no checks are performed. Since V0.929, $source> You can invoke shell-commands during processing of a hsc source. The
output of the command can be assigned to an special attribute or
immediately being included into the document. This can be useful to
include data from external applications (like databases), prepared
by scripts (eg. Rexx), which of course you have to write yourself. This functionality is provided by the hsc tag If you didn't specify an output filename (using To avoid this, you can set By default, Additionally, you can use all attributes of You can set both As The Rexx-script Technically speaking, with will both create an output in The reason is obvious: The command outputs to Another problem will occur, if you redirect the output yourself
within the command call, but do not specify the
will try to invoke something like The behavior of this call is system dependent, but there's a general
statement on this topic: it most likely won't work. In addition to simple strings, you can use expressions to set the
value of an attribute. Within expressions, you can refer to other
attributes to obtain their value, and you can also use various operators.
Usually, expressions have to be enclosed in parentheses
(`` String constants must be enclosed inside any kind of quotes -
different to values outside expressions, where the quotes can
be omitted under certain circumstances. As a difference from most ``real''
programming languages, the same is true of
numeric constants! To refer to the value of another attribute, simply use its
name, without any enclosing quotes. The source attribute must
exist, either defined via Furthermore, it must have been assigned a value, for example using
will be converted to The latter four operators were present in HSC V0.917 already, but their
semantics have changed (that's why they were undocumented in the first place)!
They used to compare strings, now they compare numbers -- but
they still have a string equivalent each, see below. These comparison operators, added in V0.920 to do the job of what are now
integer operators, all work case-insensitively. Maybe that's not such
a smart choice after all and they should be case-sensitive while you get a
unary will be converted to At least on my machine. If you pass an expression to a boolean attribute, the expression is
evaluated as before. If the expression returned an empty string,
the boolean attribute is interpreted as Any none-empty string will set the attribute to will be converted to if if The following operators yield a boolean ( Important: Different to most programming languages, But you can use nested brackets within complex expressions. Starting with V0.926, HSC can also handle a special kind of expressions called
symbolic references (in PERL-speak), which are a bit of an exception to
the above syntax. A symbolic reference is an expression whose
value will be taken as the name of a variable. The following
macro employs this mechanism:
<$source pre>
<$macro NAMES SELECT:num>
<$define NAME1:string="Hugo">
<$define NAME2:string="Resi">
This is <( {"NAME" + SELECT} )>
$macro>
$source>
A symbolic reference is an expression enclosed in ``curly braces''
(`` One major difference between a symbolic reference and a normal expression is
that the former may be used on the left hand side of an expression, it yields a
so-called lvalue. So you can not only read an attribute whose
name is determined at compilation time, but also write to it: is the same as: Specifying the desired size of an image in its As you usually don't know the exact size of your images, let your
stupid computer handle this dull task by enabling the switch
If you have already set these attributes yourself, Take a look at this nice picture of some nice guy: This can usually be included in a document using something like
<$source PRE>
<$if (name="hugo")>
This is hugo!
<$else>
Maybe it's sepp?
$if>
AmigaOS version: <$insert text=(GetEnv "KickStart")>
hsc-0.934.orig/docs-source/exmpl/macro_addr.hsc 0100600 0001750 0000144 00000000060 07642675506 020324 0 ustar lory users <$macro Hugo-Address>
hugo@some.where
$macro>
hsc-0.934.orig/docs-source/exmpl/macro_cnt2nest.hsc 0100600 0001750 0000144 00000000222 07642675506 021152 0 ustar lory users <$macro hinz /close>
hinz=( <$content> )
$macro>
<$macro kunz /close>
kunz=( <$content> )
$macro>
$macro>
hsc-0.934.orig/docs-source/exmpl/operators.hsc 0100600 0001750 0000144 00000000364 07642675506 020256 0 ustar lory users <$define name:string="hugo">
<$define here:string="here">
<$if (name="hugo")>
This is hugo!
<$else>
Maybe it's sepp?
$if>
hsc.prefs: <(GetEnv ("HSCPREFS"))>
hsc-0.934.orig/docs-source/features/ 0040700 0001750 0000144 00000000000 10010115234 016172 5 ustar lory users hsc-0.934.orig/docs-source/features/assign.hsc 0100600 0001750 0000144 00000017321 07701664211 020201 0 ustar lory users String Constants
As usual with html, you can use an assignment like
<$source pre>
$source>
to set the attribute SRC to ALT to
$source>
ALT contains a double quote as value.Numeric Constants
Constants Without Quotes
If only certain characters are used, you even can omit the quotes at
all. For example,
<$source pre>
$source>
is also legal. As this can cause problems with (very) old browsers, it
might result in
$source>
SRC, it would
have been required to put it inside quotes. As this is not the case,
Compute Expressions
$source>
If the attribute name has been set to
$source>
Using Quotes Inside Quoted Strings
$source>
a single (') quote
and a double quote (") together<<. Different to html, hsc
doesn't mind about that internally. The trouble starts when you assign
the value later on to an attribute of an HTML tag:
$source>
sepp to ALT. To solve that problem, it
uses double quotes to embed the value in and replaces all double quotes inside
by its entity ", thus resulting in:
$source>
Conditional Assignments
sepp=(hugo)
However, if hugo has not been defined and assigned a
value before, this will result in an error message. Conditional
assignments now only assign a value to the target attribute, if the
source attribute has been set; in any case, the source attribute must
have been defined before (using sepp?=hugo
This becomes handy for such macros which are more or less only
extensions of real HTML tags:
<$source PRE>
<$macro MY-BODY BackGround:uri>
$macro>
$source>
BackGround.BackGround attribute to
be set when calling BackGround to the BackGround passed,
this attribute would have been unset, and the attempt to copy the
value of BackGround/MY-BODY to
BackGround/BODY using
BackGround=(BackGround) would result in Complex Conditions
STYLE
attributes can be parsed, checked and merged already. The following
features support CSS:
STYLE attributes will be checked
against this list.GETSIZE/S
function are CSS by default if you use XHTML mode.STYLE attributes in a single tag will be merged into
one. This can simplify the writing of macros where you want to supply a few
default styles and let the user pass in additional ones:
<$source pre>Possible Attributes
COMMAND:string/required
INCLUDE:bool
FILE)
is included in the document.
ATTRIBUTE:string
FILE:string
INCLUDE or
ATTRIBUTE
TEMPORARY:bool
REMOVE:enum("auto|on|off")="auto"
REMOVE="off", the file will be left untouched. If no one
else is going to remove it, it will continue to exist until
doomsday or the next head-crash.
FILE),
this can clutter your temporary-directory (usually "REMOVE="on", so the output-file
will always be removed.REMOVE="auto" is set. This will remove the
file, if TEMPORARY has been enabled, and - if
INCLUDE has been activated, too - no messages
showed up during including the file.REMOVE="off"
if your data are not really completely temporary.
PRE,
SOURCE etc. - Of course, this only makes sense if the
INCLUDE-attribute has been set.INCLUDE and ATTRIBUTE with
one call to Examples
FILE-attribute.
output; no data are included into the
current document.
A More Complex Example
If you want to create a portable hsc source to insert a listing of a
directory, you could try something like this:
<$include FILE="exmpl/exec.hsc" SOURCE PRE>
And the data created by this code sequence would look like this:
<$include FILE="exmpl/exec.hsc">
Computing Complex Data
<$define snc.rex:string="StripNastyChars.rexx">
<$define snc.hsc:string="StripNastyChars.hsc">
<$macro snc.rex>rx <(snc.rex)> bla:sülz:fasel
results in
blaslzfasel
If you tried this yourself, you maybe noticed that the Rexx-script does not
output a linefeed at the end of line. This is done by avoiding to use
SAY stripped
to display the converted data. Instead, you will find a
call WriteCH(stdout, stripped)
This simply is because clean-data by means of
<$source pre>
<$exec command=("rx StripNastyChars.rexx " + nasty-data) ATTRIBUTE=clean-data>
$source>
Because of obvious reasons, the linefeed character created by
SAY would be unwanted in the value of the target
attribute. Therefor, the interesting part of the created HTML document
will look like:
Converted "This#Text|Contains!Ñâ§ïÿ/Characters"
to "ThisTextContainsCharacters".
It should be easy for you to put this functionality in a macro.
Problems
>filename" to the command-string.
For example, if you calledFILE attribute, you tell FILE-attribute: General Syntax
(...)'') and may appear after the
<$source PRE>
<$define image:string="hugo.gif">
$source>
$source>
Operators
Unary Operators
not expression
set attribute
defined attribute
Exists(local uri)
bool).
This can also be specified as a
Exists("index.html"),
Exists(":image/next.gif")
fExists(filename)
bool). If you do not specify
a full filename (including a device name), it will be relative to
the source root directory.
fExists("sepp:hugo/resi.hsc"),
fExists("///child.txt"),
fExists("include/global.hsc")
chr(number)
ord(character)
ord() is a string of more than one character,
all but the first are ignored. An empty string yields zero.
GetEnv(environment-variable)
GetEnv("Workbench")
GetFileSize(local uri)
HSC.Format.FileSize
to change the appearance of the result.
GetFileSize("../../download/hugo.lha"),
GetFileSize(":nudes/resi.jpg")
GetGMTime()
HSC.Format.Time
to change the appearance of the result.
GetTime()
HSC.Format.Time
to change the appearance of the result.
GetFileDate()
HSC.Format.Time
to change the appearance of the result.
To show the time of the last change to a page, this is often a more
logical choice than GetTime(), especially if you
include a lot of macros and use only a few in a certain document.
Last change:
basename
extension
urikind
Unfortunately, these are sort of .
Binary Operators
Integer arithmetics
These operators are fairly simple. Division by zero is caught, but no
overflows or stuff like that. But as long as you don't do scientific
maths in your HTML macros, you should be fine.
Empty strings count as BOOL.
String operators
<$source PRE>
<$define name:string="hugo">
<$define here:string="here">
<$if cond=(name="hugo")>
This is hugo!
<$else>
Maybe it's sepp?
$if>
<$if cond=("SePp" IN "hugo,sepp and resi")>
Sepp is among them.
$if>
AmigaOS version: <(GetEnv ("KickStart"))>
$source>
Boolean Expressions
false. This will
cause the attribute to be removed from the tag/macro-call.true,
resulting in a value equal to the name of attribute. (In HTML, writing
ISMAP is short for ISMAP="ISMAP", while in
XHTML the latter has to be, and automatically is, spelled out.)$source>
$source>
name has been set to "hugo.gif",
or to
$source>
name has been set to "map.gif". Note that
only the second call enables the boolean attribute ISMAP,
while it gets stripped for the first call.TRUE or
FALSE) result and/or can be used to manipulate boolean
values.
TRUE if both expression1 and expression2
are TRUE.
TRUE if expression1 or expression2
or both are TRUE.
TRUE if either expression1 or
expression2, but not both, are TRUE.
Priorities
Symbolic References
yields ``This is Hugo'', while
yields ``This is Resi''.{...}''). HSC takes its value as the name of an attribute, and
the value of this attribute is the value of the entire expression. The above
just concatenates the string "NAME" and the ``selector'' number and
returns the value of the appropriate variable. This may not seem very useful,
but for things like emulating arrays it can come in quite handy.WIDTH and
HEIGHT attributes to the tag or use Cascading
Stylesheet specifications to add the size information.Usage
SRC refers to, and either append the
attributes WIDTH and HEIGHT with the
dimensions obtained from the image data, oder add the properties
width: and height: to a STYLE attribute,
which will be created if it didn't exist yet.Example

$source>
but if a document called hsc niceguy.hsc TO niceguy.html GETSIZE
the
$source>
in the HTML object. If you do not like the double quotes assigned to the
size values, use the CLI-option
The use of STYLE attributes is currently tied to the XHTML mode, i.e. XHTML
output will use CSS while traditional HTML uses the In the early times of w3, this was the only format supported by
most browsers. It features only indexed-color (16 or 256 colors) and
an ugly looking progressive display option. It became very popular in
a negative sense because of it's compression algorithm and the
associated copyright. Bye the way, did you know that "The Graphics Interchange Format(c) is
the Copyright property of CompuServe Incorporated. GIF(sm) is a
Service Mark property of CompuServe Incorporated."? So now you do; if
it makes them happy... Essentially, this format does a good job as an idiot indicator. This
already starts with the name: jfif is short for JPEG File Interchange
Format (because it uses jpeg compression for image data). Nevertheless
jfif-pictures will have a file extension set to The main feature about jpeg compression is that it is lossy, which
means that the output image is not identical to the input image.
Documents about software using jpeg compression usually claim that you
can obtain good compression levels with no visible change. As long as
you do not start to rotate or apply other complex image processing
operations on pictures, this might even be true. Otherwise, an ugly grid
will appear soon. Most important, jfif is commonly used to encode images of more or
less undressed people. To store as many such pictures as possible in
as little space as possible, the compression rate is usually set to a
high value. This makes these people look as if they suffered from
leprosy, or just a drawing by Egon Schiele. Furthermore many people outside English speaking countries
pronounce jpeg ( Above all, PNG supports most obvious things several other formats
failed to include. There is nothing really remarkable about it, but
today one has to be glad even about this. So it can be said that PNG
is one of the few positive things that happened in the last ten
years. But even despite there being free source code available to read
PNG-images, and the word Bye the way, Both This one inserts the text " Setting Nesting them is also possible, of course: You should not compare This macro inserts a link to an URI specified with The " For example, you can utilize this macro using This leads to the text with a anchor around the term " Everything The main advantage of this concept is that it's rather
easy to add new syntax elements. For this purpose the It is a serious problem about HTML that no one can give you competent
answer to the question The If it is unable to find If you want to find out where This tag defines
a new entity. The (required) attribute Example: The Unlike previous versions, This tag defines
a new icon-entity. The only (required) attribute is Example: This tag defines
a new tag, and is used quite similar to Example: To fully understand the above line, you might also want to read the sections
about attributes
and options for tags and macros. For those, who are not smart enough or simply to lazy, here are some
simple examples, which should also work somehow, though some features of
This tag lets you define a new CSS property and optionally a list of values
that are allowed for it. If you omit the The value for This tag defines an attribute list shortcut to support your laziness
when editing the prefs file. It allows to collect an arbitrary number of
attribute declarations under a single name that you can use later in
Example: This is the same as: Browsers should read that line, obtain the DTD and parse the source
according to it. The problem about DTDs: they are written in SGML. And
the problem about SGML: It's awful. It's unreadable. It's a pure
brain-wanking concept born by some wireheads probably never seriously
thinking about using it themselves. Even when there is free code
available to SGML-parse text. As a result, only less browsers did support this because it was too
easy to write a browser spitting on the SGML-trash, simply parsing the
code These browsers became even more popular when they supported tags
certain people liked, but were not part of DTDs. As DTDs were
published by w3c, and w3c did not like those tags, they did not made
it into DTDs for a long time or even not at all (which is really
understandable, too). This did work for a certain degree until HTML-2.0. Several people
(at least most of the serious w3-authoring people) did prefer to
conform to w3c than use the funky-crazy-cool tags of some special
browsers, and the funky-crazy-cool people did not care about DTDs or
HTML-validators anyway. However, after HTML-2.0, w3c fucked up. They proposed the infamous
HTML-3.0 standard, which was never officially released, and tried to
ignore things most browsers did already have implemented (which not
all of them were useless crap, I daresay.). After more than a year
without any remarkable news from w3c, they finally canceled HTML-3.0,
and instead came out with the pathetic HTML-0.32. Nevertheless, many people were very happy about HTML-0.32, as it
finally was a statement after that many things became clear. It became
clear that you should not expect anything useful from w3c anymore. It
became clear that the browser developers rule. It became clear that no
one is going to provide useful DTDs in future, as browser developers
are too lazy and incompetent to do so. It became clear that anarchy
has broken out for HTML-specifications. Quite unexpected, with HTML-4.0 this has changed for some extent,
as the DTDs are quite readable and well documented. The general syntax
of course still sucks, error handling is unbearable for There is also a disadvantage of this concept: reading Once upon a time, some guys invented ASCII. As these guys were
Americans, they did not care (or probably not even know) about the
rest of the world and said: But, thank god, the guys who perpetrated html, after about 30 years
of a computer world without working umlauts, provided a solution to
this tricky problem: Instead of typing So as consequence of this prehistoric crap, Note:This only works for special
characters that have been defined with This attribute is defined internally during startup and is maintained
by This attribute is defined internally during startup and is
maintained by This BOOL attribute is defined and
set to TRUE (i.e. "1") whenever HSC was called with the XHTML commandline
switch. It allows macros to check the current mode and adapt their code, for
example with respect to doctypes or attributes used. Test it using
WIDTH and
HEIGHT attributes. The above example would look like this after
running it through
$source>
Supported Image Formats
In the recent years several formats to store image data have been
established — mostly because none of these was really useful. Only a
few of them are supported by gif — Graphics Interchange Format
jfif/jpeg
PNG — Portable Network Graphics
The PNG Specification (<(HSC.Anchor)>)
claims this format to be
...an extensible file format for the lossless, portable,
well-compressed storage of raster images. PNG provides a patent-free
replacement for the GIF format and can also replace many common uses
of TIFF format. Indexed-color, grayscale, and truecolor images are
supported, plus an optional alpha channel. Sample depths range from 1
to 16 bits [and] it is fully streamable with a progressive display
option.
General Syntax
Conditionals looks like that:
<$if COND=expression>
code to be processed if condition matches
<$elseif COND=expression>
(optional) code to be processed if alternative condition matches;
this can occur multiple times
<$else>
(optional) code to be processed if none of the previous conditions matched
</$if>
COND; false is represented by an empty string,
true by any non-empty string. Normally, you will like to
set COND using
expressions.Some Simple Examples
Now let's see how this works in practice:
<$SOURCE PRE>
<$if COND=(NAME="sepp")>
You must be sepp!
$if>
$SOURCE>
You must be sepp!", if the attribute
NAME has the value "sepp". Note that the
"="-operator performs a case-insensitive string-comparison,
so setting NAME="SEPP" would lead to the same result.NAME="sepp" will create the same text as above. Any
other value for NAME will insert
"I don't know you.".Nesting Conditionals
Conditionals And Macros
#if of the C-preprocessor. The main difference is
that you can use HREF,
using TITLE as link text; but only, if the destination
(local) URI can be accessed. If the required document is not
available, only the plain text without a link will be inserted./r" behind the declaration of the
macro-attributes is short for "/required" and means that
the macro needs both of these attributes to be set during the
macro-call.
You should read the document about recent bugfixes if there are any.
bugfixes" if the document
"Default Preferences
Searching For The Preferences
If you do not explicitly specify certain preferences by means of the
commandline option
$HOME/libPROGDIR:, which is automatically
assigned to the same directory where the /usr/lib and /usr/local/libSpecial Tags To Modify Syntax Definition
<$macro SPCTAG NAME:string/r TITLE:string/r>
<(NAME)>: <(title)>
$macro>
All the tags below should be used within NAME declares the
name of the entity, RPLC the character that should be
replaced by this entity if found in the hsc-source and NUM
is the numeric representation of this entity. NUM may be in the
range 128-65535, allowing for any Unicode (UCS-2 to be exact) character to be
assigned a corresponding entity. Definitions in the range 128-255 are done in the
prefs-file to allow users with character sets other than ISO-8859-1 (Latin-1)
to change the replacement characters; some other characters such as
mathematical symbols or typographical entities are predefined internally by
ENTITYSTYLE
commandline option affects the way PREFNUM attribute for an entity will make it
use the numeric representation if ENTITYSTYLE=replace, no matter
what representation was used in the source text.PREFNUM flag and the
RPLC character will be updated. This allows to change the default
rendering/replacement of internally defined entities.
Warning #92 will be issued and should be
ignored if you really want to do this.NAME
which declares the name of the icon.VAL attribute, any value
will be permitted. Otherwise it should be a list in the same style as for
enum parameters: words (which may include spaces) separated by
vertical bars.text-indent is numeric, so the possible values
can't be listed exhaustively and val is omitted.
text-align on the other hand has a short list of four possible
values.
Why It Can Not Read DTDs
DTD is short for Document Type Definition. One of the early concept of
HTML was that the first line of a document should contain a line that
tells which DTD has been used to create this document. This could look
like
<$source PRE>$source>
Problems
"
+"You'll have all that you can eat
"
+"Of milk & honey over there")
QAUTHOR='Natalie Merchant, "San Andreas Fault"'>
Ü. Congratulations, what a great idea! 7 bit
rulez!
<* insert heading for another special attribute *>
<$macro SPCATTR NAME:string/r TITLE:string/r>
Hsc.Anchor - destination URI of last anchor
Hsc.Click-Here - keywords for Hsc.Color-Names - values to be used as colors-names
Hsc.Content - content text of current container macro
Hsc.Opts.XHTML - defined if HSC was called in XHTML mode
Hsc.Opts.Entitystyle - reflects
the current entity rendering style
Hsc.Document.Name - filename of HTML object
Hsc.Document.Path - directory part
of HTML object, relative to the document tree's root
Hsc.Document.URI - full relative URI of HTML object
Hsc.DestPath - relative path to the
HTML object's destination directory
Hsc.Exec.Result - return-code of command invoked by Hsc.LF - a single linefeed-character
Hsc.Source.Name - filename of hsc-source
Hsc.Source.Path - directory part of hsc-source
Hsc.Source.File - full path and filename of hsc-source
Hsc.System - value depending on operating system
Hsc.Format.Filesize - how to render Hsc.Format.Time - how to render Hsc.TMP.* - temporary attributes for internal use
<(title)>
$macro>
Attributes Containing Special Data
<**********************************************************>
<* Hsc.Anchor *>
<**********************************************************>
<$include FILE="exmpl/anchor.hsc">
<**********************************************************>
<* Hsc.Content *>
<**********************************************************>
This is a STRING attribute, which is
always defined and reflects the current entity rendering style, i.e. one of
These attributes are defined internally during startup and are read-only. They contain the filename, the directory, the whole relative URI of the HTML object to be created and the path from the current directory to the HTML object's destination, respectively.
For example, <$source PRE> hsc FROM people/hugo.hsc TO html:my_project/ $source> will lead to| attribute | value |
|---|---|
| Hsc.Document.Name | "hugo.html" |
| Hsc.Document.Path | "people/" |
| Hsc.Document.URI | "people/hugo.html" |
| Hsc.DestPath | html:my_project/people/ |
Hsc.Document.Path does not contain the whole
destination directory, but only the relative path. If you need the latter, use
Hsc.DestPath.
\nThese attributes are defined internally during startup and are
read-only. They contain the filename, the directory and the full path
and filename of the hsc-source you have specified when invoking
| attribute | value |
|---|---|
| Hsc.Source.Name | "hugo.hsc" |
| Hsc.Source.Path | "people/" |
| Hsc.Source.File | "people/hugo.hsc" |
This attribute is defined internally during startup and is
read-only. It contains a value depending on the operating
system
OS | Hsc.System
--------+-----------
AmigaOS | AMIGA
RiscOS | RISCOS
Unixoid | UNIX
*>
| OS | Hsc.System |
|---|---|
| AmigaOS | AMIGA |
| RiscOS | RISCOS |
| BeOS | BEOS |
| NextStep | NEXTSTEP |
| Unixoid | UNIX |
For several tasks,
For example, if you are using the special tag <(...)> (insert expression),
Hsc.TMP.insert.expression to
assign the value of the expression you passed between the brackets. If
this expression contains errors, you will achieve a message mentioning
the attribute Hsc.TMP.insert.expression.
This attribute is defined in
For attributes of type
COLOR,
you can not only use the
cryptic #rrggbb-style, but also use some predefined
values. With this attribute you can declare which values
This one contains all values recommended for HTML-0.32 and is in
the
This attribute is defined in
When processing German documents, probably this one would fit better:
<$source PRE><$define Hsc.Click-Here:string/c="klicken|hier">$source> <**********************************************************> <* Hsc.Format.filesize *> <**********************************************************>
%b is replaced by the filesize in bytes.
%k is replaced by the filesize in kilobytes.
%m is replaced by the filesize in megabytes.
%g is replaced by the filesize in gigabytes.
%a is replaced by the filesize, with a reasonable unit computed automatically
%u is replaced by the unit for %a
This attribute is defined internally during startup, and contains the
value "%a%u", leading to results like "123K" or
"12M". It can be changed by the user at any time.
<**********************************************************>
<* Hsc.Format.Time *>
<**********************************************************>
strftime()):
%A is replaced by the full weekday name.
%a is replaced by the abbreviated weekday name, where the abbreviation
is the first three characters.
%B is replaced by the full month name.
%b or %h
is replaced by the abbreviated month name, where the abbreviation
is the first three characters.
%C is equivalent to %a %b %e %H:%M:%S %Y
%c is equivalent to %m/%d/%y .
%D is replaced by the date in the format mm/dd/yy .
%d is replaced by the day of the month as a decimal number (01-31).
%e is replaced by the day of month as a decimal number (1-31); single
digits are preceded by a blank.
%H is replaced by the hour (24-hour clock) as a decimal number
(00-23).
%I is replaced by the hour (12-hour clock) as a decimal number
(01-12).
%j is replaced by the day of the year as a decimal number (001-366).
%k is replaced by the hour (24-hour clock) as a decimal number (0-23);
single digits are preceded by a blank.
%l is replaced by the hour (12-hour clock) as a decimal number (1-12);
single digits are preceded by a blank.
%M is replaced by the minute as a decimal number (00-59).
%m is replaced by the month as a decimal number (01-12).
%n is replaced by a newline.
%p is replaced by either AM or PM as appropriate.
%R is equivalent to %H:%M
%r is equivalent to %I:%M:%S %p .
%t is replaced by a tab.
%S is replaced by the second as a decimal number (00-60).
%s is replaced by the number of seconds since the Epoch, UCT.
%T or %X
is equivalent to %H:%M:%S .
%U is replaced by the week number of the year (Sunday as the first day
of the week) as a decimal number (00-53).
%W is replaced by the week number of the year (Monday as the first day
of the week) as a decimal number (00-53).
%w is replaced by the weekday (Sunday as the first day of the week) as
a decimal number (0-6).
%x is equivalent to %m/%d/%y %H:%M:%S .
%Y is replaced by the year with century as a decimal number.
%y is replaced by the year without century as a decimal number
(00-99).
%Z is replaced by the time zone name.
%% is replaced by % .
This attribute is defined internally during startup, and contains the
value "<(GetTime())>".
Possible attributes:
$macro>
<$macro /DTA>One of the basic concepts of every computer language is that the user should be able to add comments. The machine will ignore them, but they usually help the programmer to understand his intention when looking at his source code later.
As yet another proof of the incompetence of the HTML creators, there is no reasonable way to add comments to your source code. Early versions of HTML did not offer any possibility to do that at all. Later ones support comments comparable to sgml. But as the way sgml handles comments is so messy and weird, nearly no one knows how they are really supposed to work (including myself and - more remarkable - most developers of w3-browsers).
In general, there is no way to use sgml-comments so they will work with all browsers. Many browsers are unable to find out when a comment ends, independent of whether you did it right or wrong.
Furthermore, such comments also waste bandwidth, as usually the reader will not see them (except he views the document source). And internal notes of w3-authors are usually not interesting for the public...
It is really remarkable that they managed to fuck up such a simple and usually strait forward concept like comments; even most assembler languages are smarter with this.
Anyway, with
As you can see, such comments can also be nested - yes, this is a documented behaviour.
And you can comment out sections of HTML source without any problems for the browser. This simply is possible because comments in the hsc-source are not written to the HTML object. So they also will not waste bandwidth.
Of course, if you need the standard comments, you can still use <$source PRE>$source> as usual. But think twice before doing so.ON is no more
interpreted as an URI, but as a local filename relative
to the source directory.
In this example,
$insert what [options]
Optionally, you can pass a format-string, that discribes the time.
As If you define an attribute using You can use the modifier During conversion, messages might
show up. But not only For instance this can be useful, if he wants to perform some
plausibility checks of macro arguments, or for debugging purpose
(strftime()
to perform that task, you can use the same format specifications.
__TIME__-format.
Insert text
As an required argument, you must give a string
that contains the text.
hugo was here". Of course, this does not
make much sense.href.
*>
/GLOBAL: in this case, the attribute exists
until the end of conversion./CONST to make the
attribute read-only. That means it can not be updated with
Prev will remove all white spaces, which have occured
between the previous word and the succ will skip all blanks between the
Both will act like if both prev and
succ would have been specified, and
none has no effect on your data.
prevsucc
prev succ
prev succ
prev succ
Note that the word
Usually there should be no need to use sgml-comments, so why not
remove them at all? You can perform this by enabling the switch
Because of the numerous problems sgml-comments cause, you better use hsc-comments anyway (see there also for a discussion of these problems).
..can be passed to the option
You can't strip tags, which have the tag
modifier /SPECIAL set. But this only concerns the
These can be removed if you want to create a No-Net-version of your
document. Use the switch /STRIPEXT set within
Currently, this affects only the tags
These can be removed, if you heavy use them to structure your
source, but don't want to waste bandwidth for them. You only need to
enable the switch
If now someone performs a
Linefeeds and white spaces inside a tag call are also affected by
this option. The tag
When parsing your input, ALIGN option of
However, the syntax check of
( So if if (..) to avoid an enforcer hit/segmentation
fault, why not display an error message now..
This kind of URI specifies a local object relative to the current
directory (unless you have set a
Sometimes, when your project starts to become rather complex, you
create subdirectories to structure the whole thing. As example, I
prefer to create a directory image/, where all images for
buttons and logos are placed.
Creating a link to an image from a document in the project root
directory is no problem, it's URI simply is
image/logo.gif. But if your current page is somewhere
deeper in your project path, eg. people/hugo/hugo.html,
you need to refer to the same image using
../../image/logo.gif. So you always have to know the
directory level of your current page.
One solution would be to define a HREF attribute.
This is very annoying if you need to refer to files located in the
same directory.
But, thanks to
For example, an
For the HTML document, these URIs will be translated to relative URIs as described above.
Different to the project relative URIs described above, server
relative URIs are not a feature of
For those who really can not live without them, the CLI-option
For html, they point to a specific location in a document and can
be created using
This changes if you start to utilize the project management capabilities. On
demand,