Hyperlinks

Because RSP code is intended to be independent of its eventual translation to a target language all hyperlinks on RSP pages should be references to .rsp pages. The compiler will then translate all such links to the appropriate target file name.

Example 3.3. Hyperlink translation

The following RSP code:

<html>
<body>
    <h1>A simple HTML page</h1>

    <p>
    A hyperlink to another such page: <a href="another.rsp">click me!</a>.
    </p>
</body>
</html>

...would be translated to a PHP file as if it were like this:

<html>
<body>
    <h1>A simple HTML page</h1>

    <p>
    A hyperlink to another such page: <a href="another.php">click me!</a>.
    </p>
</body>
</html>

Dynamic Hyperlink Translation

Sometimes you want to write code that will convert a string containing a .rsp file name into the appropriate target language file name. For this you can use the translate() standard library function.