element book
local stream bookhtm ;creating a variable with
name "bookhtm"" of type stream
open bookhtm as file "%v(id).htm"
; this stream is written to a file,
based on the id of the book element
using output as bookhtm ; now we write the output to
this stream (file)
do ;everything between 'do' and 'done' needs to go to the stream
output "%n"
|| output "
%n"
|| output "Book %v(id)"%n
|| output "%n"
|| output "%n"
output "%c"
do when last proper subelement is related
output ""
done
output "
%n"
output "%n"
done
element authors
local stream authorshtm
open authorshtm as file "authors.htm"
using output as authorshtm
output "%n"
|| output "%n"
|| output "Authors"%n
|| output "%n"
|| output "%n"
output "An overview of our writers
%n"
output ""
output "Name | Specialty |
%n"
output "%c
%n"
output "%n"
done