Main ----- Copyright Up Previous Next

What was said was never done
Don't panic, it's not really worth your while

(Blur, "Bang")

Special Tags

hsc adds several special tags to process macros, handle conditionals, include files and lots of other things.


Comments

You can insert a comment with
<* This is a hsc-comment *>
You can also nest such comments.

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.


Conditional conversion

As there is a lot to tell about this feature, there exists a whole section about <$if>.

Include file

A hsc-file can be included to the text using
<$include FILE="filename" [SOURCE] [PRE] [TEMPORARY]>

If you include a file this way, it is handled as an usual hsc-file. That means, all tags and special characters are handled as before.

To include a source file, eg a C- or HTML-source so that the tags are not interpreted but displayed, add the optional boolean attribute SOURCE.
<$include FILE="hugo.c" SOURCE>

Now the basic special characters "<", ">" and "&" are replaced by their entities.

Note that this does not include a <PRE>-tag to render the text as it exists with the same line breaks and spaces.

To get this done, you should use the optional boolean attribute PRE. This inserts a <PRE> before the included data and a </PRE> afterwards.

If you enable TEMPORARY, the file included will not effect the dependencies for the current document. This is only reasonable if you have the PRJFILE CLI-option set and want to include a temporary file which might not exist anymore when invokin make the next time.

You should consider to enable this attribute, if invoking make returns something like
make: *** No rule to make target `hsc0x395bf7e0001.tmp', needed by `/html/hugo.html'.


Define attributes

You can create an attribute and pass a value to it via
<$define attribute>

If you define an attribute via <$define> inside a macro, it is of local existence only and is removed after processing the macro. You can suppress this with using the attribute flag /GLOBAL: in this case, the attribute exists until the end of conversion.

You can use the flag /CONST to make the attribute read-only. That means it can't be overwritten by <$let>


Set new attribute value

You can update an attribute's value with
<$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." *>

Define macros

As there is a lot to tell about this feature, there exists a whole section about macros...

User messages

During conversion, you can invoke messages by yourself using
    <$message TEXT="message text" [CLASS="class"]>
For an example, look at <$exec>.

Insert expression

This tag is used to insert data of attributes and expressions. For example:
    <$define hugo:string="hugo">       <* create hugo and set to "hugo" *>
    <(hugo+" ist doof.")>              <* insert text "hugo ist doof." *>

Don't parse section

If you created some perverted HTML source or use features hsc can't handle (which is theoretically impossible), you can keep of hsc from parsing this section by surrounding it with <| ... |>. Of course, this is a dirty hide-out and should be used only for special cases.

Thomas Aglassinger (agi@giga.or.at), 09-Aug-1996