SUBROUTINE TRANSS
* Display a Reality item, translated using RWA_TRANS.

* Include the RealWeb definitions.
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

* Start the HTML page.
CALL RW_START_HTML_PAGE("TRANSS", "", "", "", "")

* Read an item from a Reality file - we'll use the code of
* the HELLOWORLD example.
ITEM = ""
OPEN "SUBROUTINE.EXAMPLES" TO F ELSE STOP
READ ITEM FROM F,"HELLOWORLD" ELSE STOP
CLOSE F

* Convert reserved HTML characters into escape sequences.
* Highlight RealWeb subroutines, etc.
CALL RWS_TRANS(ITEM, RWD_BLIST)

* Format it as preformatted text.
CALL RWS_FIXED(ITEM, "")

* Since the text is now preformatted, having a <br> tag at
* the end of each line means that we get two line feeds.
* Remove the <br> tags, to close up the lines.
ITEM = CHANGE(ITEM, "<br>", "")
ITEM = CHANGE(ITEM, "<BR>", "")

* Output the text.
CALL RW_PUT(ITEM)

* Complete the page.
CALL RW_END_PAGE
RETURN