hsc adds some special attributes, which can be quite useful to include special data or configure the parser.
__ANCHOR__ contains destination URI of last anchor
__CLICK_HERE__ declare keywords for "click here"-syndrome
__COLOR_NAMES__declare values to be used as colors-names
__DEST_NAME__filename of html-object
__DEST_PATH__directory of html-object
__DEST_URI__full relative URI of html-object
__SOURCE_NAME__filename of hsc-source
__SOURCE_PATH__directory of hsc-source
__SOURCE_FILE__full path and filename of hsc-source
__SYSTEM__contains value depending on operating system
This attribute is defined internaly during startup and is maintained by hsc. It contains the URI of the last anchor referenced to.
For example, To get update, take a look at the
<A HREF="http://www.giga.or.at/~agi/hsc/index.html">hsc-support-page</A>
at <STRONG><(__ANCHOR__)></STRONG>.
will be converted to
To get update, take a look at the hsc-support-page at http://www.giga.or.at/~agi/hsc/index.html.
These attributes are defined internaly during startup and are read-only. They contain the filename, the directory and the whole relative URI of the to be created html-object.
For example,
hsc FROM people/hugo.hsc TO html:my_project/
will lead to
attribute | value
--------------+----------------
__DEST_NAME__ | "hugo.html"
__DEST_PATH__ | "people/"
__DEST_URI__ | "people/hugo.html"
Note that __DEST_PATH__ does not contain the whole
destination-directory, but only the relative path.
These attributes are defined internaly during startup and are read-only. They contain the filename, the directory and the full path and filename of the hsc-source you've passed specified when invoking hsc.
For example,
hsc FROM people/hugo.hsc TO html:my_project/
will lead to
attribute | value
----------------+----------------
__SOURCE_NAME__ | "hugo.hsc"
__SOURCE_PATH__ | "people/"
__SOURCE_URI__ | "people/hugo.hsc"
This attribute is defined internaly during startup and is read-only. It contains a value depending on the operating system hsc is running on.
OS | __SYSTEM__
---------+-----------
AmigaOS | AMIGA
Unix-esh | UNIX
This for example can be useful if you are executing a shell-command during
conversion. See <$exec> for details.
This attribute is defined in hsc.prefs and can be altered to the user's needs. However, it's value is only scanned once and later changes will not be recognised by hsc.
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 hsc should
know about, each separated by a vertical bar (`|').
<$define __COLOR_NAMES__:string/c="aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow">
This one contains all values recommended for html-0.32 and is in the hsc.prefs that came with this distribution.
This attribute is defined in hsc.prefs and can be altered to the user's needs. However, it's value is only scanned once and later changes will not be recognised by hsc.
Inside an anchor tag (<A HREF="...">), the normal text is
scanned for special keywords indicating a `click here'-syndrome.
With this attribute you can declare these keywords
, each separated by a vertical bar (`|').
Example:
<$define __CLICK_HERE__:string/c="click|here">
When processing german documents, probably this one would fit better:
<$define __CLICK_HERE__:string/c="klicken|hier">