1. A method comprising: analyzing contents of a document to identify a plurality of document elements that collectively constitute the contents of the document, and storing, for each of the identified document elements, a database entry having a unique respective document-element identifier; creating a plurality of anchors dispersed throughout the document by storing, for each of a plurality of anchor locations, a respective database entry comprising a unique anchor identifier; storing a document view that represents the document as an ordered list of the document-element identifiers of the identified document elements, and listing at least some of the anchor identifiers in the document view interspersed with or nested within the document-element identifiers; and in response to selection of a portion of the document, generating a referencing address uniquely identifying the selected portion, the referencing address comprising one or more anchor identifiers of one or more respective anchors associated with the selected portion.
1. A method comprising: analyzing contents of a document to identify a plurality of document elements that collectively constitute the contents of the document, and storing, for each of the identified document elements, a database entry having a unique respective document-element identifier; creating a plurality of anchors dispersed throughout the document by storing, for each of a plurality of anchor locations, a respective database entry comprising a unique anchor identifier; storing a document view that represents the document as an ordered list of the document-element identifiers of the identified document elements, and listing at least some of the anchor identifiers in the document view interspersed with or nested within the document-element identifiers; and in response to selection of a portion of the document, generating a referencing address uniquely identifying the selected portion, the referencing address comprising one or more anchor identifiers of one or more respective anchors associated with the selected portion. 14. The method of claim 1 , wherein the database entries for the anchors further store, as attributes, signatures derived from contents surrounding the respective anchor locations in the document.