Methods and apparatus, including computer program products, for protecting
electronic documents. A computer system includes a repository for storing
an electronic document that has a document attribute. An access layer is
used by an accessor to access at least one portion of the electronic
document. The accessor has an accessor attribute. An expert system is
operable to determine an access behavior with regards to the at least one
portion by evaluating rules of a rule set with reference at least to the
document attribute and the accessor attribute when the accessor tries to
access the at least one portion using the access layer.