What was said was never done
Don't panic, it's not really worth your while
(Blur, "Bang")
hsc adds several special tags to process macros, handle conditionals, include files and lots of other things.
<* comment *> insert comments
<$content>
insert content of container macro
<$defent>,
<$deficon>,
<$deftag>
define entities, icon-entities and tags
<$define> define a new (global) attribute
<$depend> add a dependency
<$exec> execute shell-command
<$if>, <$else>, <$elseif> conditionals
<$include> include a file
<$let> set new attribute value
<$macro> define macro-tags
<$message> display user message
<$stripws> strip previous/next white spaces
<( expression )> insert expression
<| verbatim data |> insert verbatim data
<* This is a <* nested *> hsc-comment *>
As you can see, such comments can also be nested.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.
Of course, if you need the standard comments, you can use
<!-- This is a html/sgml-comment -->
as usual.
<$content> can be only used inside a
container macro
and inserts the content the user specified inside the start and
end tag for the macro.
<$depend> to
add an additional dependency which will be noted in the project
data.
Possible attributes:
ON:stringFILE:boolON is no more
interpreted as an URI, but as a local filename relative
to the source directory.
<$depend ON="work:dings.dat" FILE>
<$exec COMMAND="convdings FROM work:dings.dat" INCLUDE TEMPORARY>
In this example, dings.dat contains some data
maintained by an external application. A script called
convdings converts dings.dat to
legal html data end send them to stdout, which are inserted
into the current document.
<$depend>, the current
source will be updated if dings.dat has been
modified.
<$include>.
Possible attributes:
FILE:string/requiredSOURCE:bool<'') is not interpreted
as an escape character, but converted to an entity.&'').
PRE:bool<PRE> ... </PRE>, and the whole section will
be rendered as pre-formatted.
TEMPORARY:bool<$include FILE="macro.hsc">
<$include FILE="hugo.c" SOURCE PRE>
<$define attribute>
If you define an attribute using <$define> inside a macro, it is of
local existence only and is removed after processing the macro. You
can suppress this with the attribute modifier /GLOBAL: in
this case, the attribute exists until the end of conversion.
You can use the modifier /CONST to make the attribute read-only.
That means it can not be updated with <$let>.
<$let>.
<$let attribute_name =
new_value>
Example:
<$define hugo:string="hugo"> <* create hugo and set to "hugo" *>
<$let hugo=(hugo+" ist doof.")> <* update it to "hugo ist doof." *>
During conversion, messages might show up. But not only hsc
creates messages, also the user is able to so using
<$message>. For instance, when he wants to perform some
plausibility checks of macro arguments.
Possible attributes:
TEXT:string/requiredCLASS:enum("note|warning|error|fatal")='note'
<$message TEXT="shit happens..." CLASS="fatal">
<$message TEXT="something's wrong" CLASS="warning">
Possible attributes:
TYPE:enum("both|prev|succ|none")="both"Prev will remove
all white spaces, which have occured after the previous
word and the ``<'' of this tag, succ will
skip all blanks after the ``>'' and until the next
text or visible tag.Both will act like if both prev and
succ would have been specified, and
none has no effect on your data.
prev <$stripws type=both> succ
prev <$stripws type=prev> succ
prev <$stripws type=succ> succ
prev <$stripws type=none> succ
results in
prevsucc
prev succ
prev succ
prev succ
Note that the word ``prev'' is succeeded by two blanks,
whereas the word ``succ'' is preceded by three spaces.
<(expression)> is used to insert data
of attributes and
expressions.
<$define hugo:string="hugo"> <* create hugo and set it to "hugo" *>
<(hugo+" ist doof.")> <* insert text "hugo ist doof." *>
<| ... |>. Of course, this is a dirty hide-out and should
be used only for special cases.
Example:
<|<B>some &<> bull >> shit</B>|>The disadvantage is obvious: It is impossible to use constructs like macros or expressions inside a verbatim data section.