1. A method comprising: maintaining, in a processor-readable storage medium, a dynamic document template containing a plurality of queries, wherein each query includes a query scope and a context element, wherein the query scope refers to content of one or more source documents maintained in a document collection; applying a content rule to monitor the document collection and trigger an action if a change occurs to any of the source documents; when a change occurs to the any of the source documents, determining the validity of each of the queries in the document template; and if any of the queries are invalid after the change, notifying a user of an invalid query scope.