A computer-implemented method for randomly accessing and formatting a portion of an electronically published document having fixed text content and fixed structure defined by descriptive markup defining a plurality of hierarchical elements, wherein each element except a root element has an ancestor element and a type name, and at least one element has text content, the method using a memory storing a format specification for each type name utilized for elements in the electronically published document, wherein the format specification for a type name defines appearance of the text content of the elements in the electronically published document having the type name, and wherein the memory separately stores the electronically published document, the method comprising the steps, performed by the computer, of:
- receiving an indication of a starting point within the electronically published document;
- selecting a starting point element within the electronically published document according to the received indication of the starting point;
- selecting elements of the electronically published document beginning with the selected starting point element;
- identifying ancestor elements of the selected elements;
- and
- formatting the text content of each selected element according to a combination of format specification for the type names of ancestor elements identified for the selected element and for the type name of the selected element.