Query By Templates: A generalized approach for visual query formulation for text dominated databases Arijit Sengupta Andrew Dillon Abstract With the advent of the World Wide Web (WWW), the concept of document databases is becoming more popular. This makes the idea of a globally distributed digital document library realizable. The standard encoding format for the WWW is HTML (HyperText Markup Language), which embeds some structural information in otherwise text-dominated documents. HTML can be viewed as a special instance of SGML (Standard Generalized Markup Language), a very powerful document encoding language capable of describing may different types of languages and formats. The current work is based on designing query languages, processing and visualizing mechanisms for structured documents in general, and SGML documents in particular. We are using the World Wide Web as a platform for this querying mechanism, especially because of its popularity and world-wide availability. However, because of the wide range of users, these systems need to be easy to use. In particular, it is important that users can easily search for information from the database without prior knowledge of the internal structure of the database. This paper outlines a visual query constructing technique for application in databases containing hierarchically structured documents. In this paper, we describe the visual component of this query language, which is essentially a generalization of the Query By Example (QBE) language for relational databases. We call this method ``Query By Templates(QBT)''. Further, we describe the basic properties and usefulness this visual query technique, and show how queries on structured document databases can be performed using this method. We also describe an implementation of QBT on the Web using the Java{TM} programming language.