While responding to a "our documentation is buggy" complaint I got annoyed in my attempt to reproduce the behavior by having to surgically copy line-by-line the DDL and DML code involved. Let's strive for a more copy-paste friendly example setup. No prompts and no interspersed command tags (they are ok if the script is one block and the output is another).
In passing, the examples use < 5 and >= 5 in expressions - which in theory are supposed to require the use of < and > entities...or enclosure in a CDATA construct. The latter seems preferable.