4. The method of claim 1 wherein if the query returns a plurality of query results, notifying a user to select which query result is inserted into the document at the data target.
1. A computer-implemented method for automatically making changes in a document in a content management system based on other content in the document that is modified by a user, the method comprising the steps of: providing a dynamic inclusion rule separate from the document that specifies at least one relationship between a data source in the document and a data target in the document and that specifies a corresponding query to a repository managed by the content management system to execute when the data source in the document changes; monitoring the document for changes to the data source specified in the dynamic inclusion rule; when the data source in the document is changed, and when all parameters for the query are available to execute the query, performing the steps of: automatically executing the query in a background process, wherein the query includes at least one parameter corresponding to the changed data source, the query returning a query result; automatically inserting a link to the query result at the data target in the document; when the data source in the document is changed, and when not all parameters for the query are available to execute the query, performing the steps of: determining from a successful query database that stores successful queries for elements in the repository a plurality of related queries; presenting a list of the related queries to a user who selects one of the related queries for execution; executing the selected query; and automatically inserting the results of executing the selected query at the data target in the document.