CROSS-REFERENCE TO RELATED APPLICATIONS
This application is a continuation of U.S. patent application Ser. No. 12/724,557, filed Mar. 16, 2010, which is a continuation of U.S. patent application Ser. No. 10/930,677, filed Aug. 31, 2004, now U.S. Pat. No. 7,712,027, the contents of both applications are incorporated herein by reference in their entirety.
FIELD OF THE INVENTION
The following is directed in general to displaying content on mobile communication devices, and more particularly to a method for viewing a selected portion of a document on a mobile communication device without having to request multiple pages of the document contents containing document global properties applied to the selected part of the document.
BACKGROUND OF THE INVENTION
Mobile communication devices are becoming increasingly popular for business and personal use due to a relatively recent increase in number of services and features that the devices and mobile infrastructures support. Handheld mobile communication devices, sometimes referred to as mobile stations, are essentially portable computers having wireless capability, and come in various forms. These include Personal Digital Assistants (PDA), cellular phones and smart phones. While their reduced size is an advantage to portability, bandwidth and processing constraints of such devices present challenges to the downloading and viewing of documents, such as word processing documents, tables and images.
Electronic documents are produced using various computer programs, such as word processors, spreadsheet programs, financial software, and presentation software. In addition to text, such documents contain structural and property information such as paragraph indentation, text color and table size, etc.
When a user of a mobile communication device wishes to view only selected portions of a document stored on a remote server, other portions of the document that contain the structural information and properties used by the selected portion must also typically be transmitted to the mobile communication device. The required downloading of these other portions occurs over a potentially bandwidth-constrained wireless network. For example, if a user wishes to view only a single paragraph in a section at the middle of a 400-page document, the entire section (and sometimes even entire document) that contains default properties for the paragraph must be transmitted to the mobile communication device.
Once downloaded to the device, the electronic document is viewed using a user interface on the mobile communication device, which typically differs from the user interface used to create and view a document on a personal computer. For example, whereas the user interface on a personal computer may include a large, color display and a pointing device such as a mouse, the mobile communication device typically has only a small, possibly non-color, screen, and may not have a mouse. In addition, the mobile communication device typically has greater processing power and memory limitations than a personal computer.
SUMMARY OF THE INVENTION
According to an aspect of this specification, a method is set forth for viewing a selected portion of a server stored document on a mobile device, comprising building a graph structure within said server representing a map of said document; calculating an output size for each node in said graph structure based on size required by said mobile device and in response marking each page start in said graph structure; searching said graph structure for a parent node representing a page start for said selected portion of said document; associating properties and attributes of said selected portion with said parent node; and transmitting pages of said parent and all child nodes along with said properties and attributes for display by said mobile device.
According to another aspect, a process is set forth viewing a selected portion of a server stored document on a mobile device, comprising: building a graph structure within said server representing a map of said document; marking pages of the document within said server based on size required by said mobile device; associating properties and attributes of said selected portion with ones of said pages containing said selected portion; and transmitting said ones of said pages containing said selected portion with said properties and attributes for display by said mobile device independently of other pages of said document; wherein said associating properties and attributes further comprises searching said graph structure for a node representing a page start for said selected portion of said document; traversing said graph structure and recursively storing each parent of said node representing the page start in a parent container within said server, such that said parent container contains all nodes and leaves belonging to said page start and each parent of said node; and generating an output for each said page start containing contents and attributes of all said nodes and leaves belonging to said page start and attributes of each parent of said node representing the page start, for transmission to said mobile device
By using this approach for page delivery from the server, the client on the mobile device is able to retrieve any portion (page) of a document and display it independently, since all of its properties and attributes are already associated. This eliminates the order dependence for displaying a document such as required by a desktop application. More importantly, overall network bandwidth usage is limited.
Additional aspects and advantages will be apparent to a person of ordinary skill in the art, residing in the details of construction and operation as more fully hereinafter described and claimed, reference being had to the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
A detailed description of the preferred embodiment is set forth in detail below, with reference to the following drawings, in which:
FIG. 1 is a block diagram of a network environment in which the preferred embodiment may be practiced;
FIG. 2 is a tree diagram showing the basic structure of a Document Object Model (DOM) used in the preferred embodiment of the invention;
FIG. 3 shows the top-level of the DOM structure in FIG. 2;
FIG. 4 shows an exemplary DOM structure for a word processing document;
FIG. 5 shows an exemplary DOM structure for a table document;
FIG. 6 shows an exemplary DOM structure for a word processing document containing an image subdocument;
FIG. 7 is a flowchart showing document DOM structure construction and pagination according to the preferred embodiment; and
FIG. 8 is a flowchart showing document DOM page generation and delivery according to the preferred embodiment.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
With reference to FIG. 1, network environment 10 is shown in which the preferred embodiment of the invention may be practiced. Network environment 10 includes mobile devices 12 communicating via a wireless network 14 to a server 28 for downloading document attachments to the mobile devices 12. While only one server 28 is shown for illustration purposes, a person of skill in the art will understand that network environment 10 could have many such servers for hosting web sites or graphic download sites, providing access to picture files such as JPEG, IFF, BMP, PNG, SGI, MP4, MOV, GIF, SVG, etc. As would be understood by one of ordinary skill in the art, wireless networks 14 include GSM/GPRS, CDPD, TDMA, iDEN Mobitex, DataTAC networks, or future networks such as EDGE or UMTS, and broadband networks like Bluetooth and variants of 802.11.
A connection to a fixed service requires special considerations, and may require special permission as authorized through a Network Access Point (NAP) 16. For generic services, such as web access, a proxy-gateway or Network Address Translator (NAT) 18 may be provided so that a network operator can control and bill for the access. NATs 18 enable management of a limited supply of public Internet addresses for large populations of wireless mobile devices. Solutions offered by a proxy-gateway or NAT 18 can require a complex infrastructure and thus may be managed by a value-added service providers (VASPs), which provide, for instance, WAP gateways, WAP proxy gateway solutions, multi-media messaging servers (MMS) and Internet Multi-Media Services (IMS).
Private Intranet services 26 also connected to Internet 20 may require their own Private Intranet Proxy Gateway 24 for accessing content on server 28. Such private services include WML access to corporate mail systems, HTML access to CRM databases, or any other services that deliver information as formatted data with links and URLs embedded. As shown, it is possible that a private service 26 may be connected directly to wireless network 14, as opposed to connected via Internet 20.
Referred to throughout this document for the purpose of describing the preferred embodiment is the structure of a Document Object Model (DOM) for a document attachment to be viewed on a mobile device 12.
The attachment server 28 uses a designated file-parsing distiller for a specific document type to build an in-memory Document Object Model (DOM) structure representing an attachment of that document type. The document DOM structure is stored in a memory cache of server 28, and can be iterated bi-directionally.
As shown in FIG. 2, the graph-based document DOM structure consists of nodes and leaves. The nodes serve as the parents of leaves and nodes, while leaves are end points of a branch in the graph. Each node and leaf can have a set of attributes to specify its own characteristics. For example, a paragraph node can contain attributes to specify its alignment, style, entry of document TOC, etc. In addition, each of the nodes and the leaves has a unique identifier, called a DOM ID, to identify itself in the document DOM structure.
The document DOM structure is divided into three parts: top-level, component and references. The top level refers to the document root structure, while the main document is constructed in the component and the references represent document references to either internal or external sub-document parts. The following paragraphs examine each part in detail.
The root node of a document DOM structure, referred to as “Document”, contains several children nodes, referred to as “Contents”, which represent different aspects of the document contents. Each “Contents” node contains one or multiple “Container” nodes used to store various document global attributes. The children of the “Container” nodes are components, which store the document structural and navigational information. When the attachment server 28 builds the DOM structure for an attachment file for the first time, the top-level structure is a single parent-child chain as shown in FIG. 3:
Three types of components are defined by the attachment server 28: text components, table components and image components, which represent text, tables and images in a document, respectively. The text and table components are described in detail below, and the image component structure is identical.
A component consists of a hierarchy of command nodes. Each command represents a physical entity, a property, or a reference defined in a document. For the text component, the physical entity commands are page, section, paragraph, text segments, comments, footnote and endnote commands, which by name define the corresponding entity contained in a document. The property commands for the text component are font, text color, text background color, hyperlink start/end and bookmark commands. The text component has only one reference command, referred to as the text reference command, which is used to reference a subdocument defined in the main body of a document. Usually, the children of a text component are page or section command nodes that, in turn, comprise a set of paragraph command nodes. The paragraph command can contain one or multiple nodes for the remaining command types.
Using the following sample text document, the corresponding document DOM structure is shown in FIG. 4:
Second paragraph with bold and red text.
As FIG. 4 demonstrates, the section command, which is the child of the text component, consists of two paragraph commands. The first paragraph command contains one text segment command and the text content for that paragraph is added as an attribute to the text segment command. The second paragraph command has a relatively more complex structure, as the text properties in the paragraph are much richer. Each time a text property (font, text color, etc) changes, a corresponding text property command is created and the change value is added to that command as an attribute. The following text segment command records the text with the same text property as an attribute. As document structure gets richer and more complex, more commands of corresponding types are created and the document properties are added as attributes to those commands.
The table component has the same three types of commands as the text component, but different command names. The document DOM structure for the sample table document below is shown in FIG. 5: