Homework 15: Glossary with Velocity

Goal:
Develop a Velocity macro, which generates fragments of DHTML markup, which display glossary term definitions in response to user's mouse over events. This example shows how to write and distribute Velocity macros in Spring's applications.
Description:
Repetitive and verbose HTML/CSS/JavaScript constructs are sometimes the easiest way to achieve client-side dynamic behavior. To make creation of such effects easy for the template writer, a development of a specialized Velocity macro is suggested. Assume that you have to generate mouse-hover glossary definitions like these: http://www.milonskarate.lv/exams.php?page=main&item_id=9&action=details&validated=8&params=. Propose an easy way to markup such glossary definitions and suggest a Velocity macro, which can do this. (The glossary definitions need NOT to be dynamic. I.e. they can be generated at the time, when Velocity templates are evaluated by some preprocessor script). The macros should be easy and should use glossary definitions defined elsewhere (e.g. in some Properties file).
... some text #glossary('some_key') more text ...