element book local stream bookhtm set referent "next-%v(id)" to "" ; the next on this page is set to empty ; this is done since we don't know yet if there is a next page set referent "next-%g(previd)" to "Next" ; the next of previous page gets the info of this (being next) page open bookhtm with referents-allowed as file "%v(id).htm" ; referents-allowed added since we put placeholders in this stream now using output as bookhtm ; writing to the file do output "%c" do when last proper subelement is related output "
" done output "Previous " set previd to "%v(id)" ; used in next page for filling in placeholder done