Method and system for creating a grid-like coordinate system for addressing data contained in an irregular computer-generated table
Methods and systems provide for imposing structure onto a freeform or irregular table so that a subsequent consuming application may use the table, including presentation of the table and location of the data in the table. A generic grid structure is created having a plurality of uniformly-shaped cells such that if the generic grid is overlaid onto the irregular table, each cell within the irregular table may be located based on its position relative to the uniform cells or grids. The grid structure creates a coordinate system for defining the shape of the irregular table, for defining locations and shapes of cells comprising the irregular table and for addressing the locations of data contained in the irregular table.
Latest Microsoft Patents:
The present invention relates to methods and systems for creating a grid-like coordinate system for addressing data contained in an irregular computer-generated table.
BACKGROUND OF THE INVENTIONComputer software applications allow users to create a variety of documents to assist them in work, education, and leisure. For example, word processing applications allow users to create letters, articles, books, memoranda and the like. Spreadsheet applications allow users to store, manipulate, calculate, print, and display a variety of alphanumeric data. Such applications have a number of well-known strengths including rich editing, formatting, printing and calculation.
Recently, markup languages such as hypertext markup language (HTML) and Extensible Markup Language (XML) have been developed for placing data into a format that may be consumed by a variety of different types of applications. HTML is used primarily for formatting data for publication on Internet-based web pages. Extensible markup language (XML) has been developed for applying structure to data to allow the data to be consumed by a variety of other applications. For example, a document prepared with a word processing application may be saved in an XML format, and a spreadsheet application, for example, may subsequently open the XML formatted document for presentation to a user via the spreadsheet application. One markup language may also be transformed into another markup language where the second markup language is required by a consuming application. For example, XML markup may be transformed into HTML for viewing the transformed data using a Web browser. A common way of transforming XML markup into HTML is by using Extensible Stylesheet Language Transformations (XSLT) files that may be used to define how a given XML markup should be converted into HTML.
Often users of word processing applications construct irregular tables for presenting data, text and/or images. For example, an irregular table may be a table comprised of two rows where each row is broken into a number of cells of varying widths causing the overall table shape to lack definitive Cell Columns. Unfortunately, if the user creates such an irregular table and then desires to save the document using a markup language like XML that will at some point be transformed into HTML, then there can be virtually no way of defining the XSLT transform file that will convert that XML file into HTML that would result in a correct rendering of that table in the browser or the application supporting that particular markup language. For example, if a word processing document is used to create an irregular table containing numerical data and it is subsequently saved as an XML-formatted document, and that document is subsequently transformed into HTML using an XSLT transform file for display using a web browser, for example, the XML markup of the document during the saving process has no way of describing the exact positions of the table cells within the irregular table so that the table can be easily expressed as HTML and viewed in the browser without losing its original layout. Consequently, there is no easy way to use the XSLT transform file to display the XML-described table in an HTML-based browser the same way it was displayed by the creating application.
It is with respect to these and other considerations that the present invention has been made.
SUMMARY OF THE INVENTIONEmbodiments of the present invention provide methods and systems for imposing structure onto a freeform or irregular table so that a subsequent consuming application may use the table, including presentation of the table and location of the data in the table. A user of a computer-generated document such as a word processing document prepares an irregular table. Once the irregular table is prepared, controls, images, text, or other data are inserted into a plurality of cells within the irregular table. After the irregular table is prepared and completed, the document is saved in the format of a markup language such as XML. During the process of saving the document by the application, all edges of each cell in the irregular table are located. Beginning at a starting position at the uppermost and leftmost position of the irregular table, each cell edge is defined based on its position relative to the starting position. Next, a generic grid structure (hereafter grid) is created having a plurality of cells such that if the generic grid is overlaid onto the irregular table, each cell within the irregular table may be located based on its position relative to the cells or grids of the generic grid structure. Once the grid is calculated, for the markup used to represent the table it is output in such a way that makes all cell sizes and locations within the table expressed in terms of the cells of the generic grid structure. The grid structure creates a coordinate system for defining the shape of the irregular table for defining locations and shapes of cells comprising the irregular table and for addressing the locations of data contained in the irregular table.
These and other features, advantages and aspects of the present invention may be more clearly understood and appreciated from a review of the following detailed description of the disclosed embodiments and by reference to the appended drawings and claims.
The following description of embodiments of the present invention is made with reference to the above-described drawings wherein like numerals refer to like parts or components throughout the several figures. The present invention is directed to a method and system for imposing a grid-like structure on a freeform or irregular table so that a consuming application may locate and address data contained in the irregular table.
Operating Environment
With reference to
A number of program modules may be stored in the drives and RAM 25, including an operating system 35, one or more application programs 100, a word processor program module 37 (or other type of program module), program data, such as the manifest 38, and other program modules (not shown).
A user may enter commands and information into the personal computer 20 through a keyboard 40 and pointing device, such as a mouse 42. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 21 through a serial port interface 46 that is coupled to the system bus, but may be connected by other interfaces, such as a game port or a universal serial bus (USB). A monitor 47 or other type of display device is also connected to the system bus 23 via an interface, such as a video adapter 48. In addition to the monitor, personal computers typically include other peripheral output devices (not shown), such as speakers or printers.
The personal computer 20 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 49. The remote computer 49 may be a server, a router, a peer device or other common network node, and typically includes many or all of the elements described relative to the personal computer 20, although only a memory storage device 50 has been illustrated in
When used in a LAN networking environment, the personal computer 20 is connected to the LAN 51 through a network interface 53. When used in a WAN networking environment, the personal computer 20 typically includes a modem 54 or other means for establishing communications over the WAN 52, such as the Internet. The modem 54, which may be internal or external, is connected to the system bus 23 via the serial port interface 46. In a networked environment, program modules depicted relative to the personal computer 20, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
Operation
As briefly described above, often users prepare an irregular table such as the tables illustrated in
Unfortunately, conversion of the original word processing application containing the irregular table into XML for consumption by other applications such as HTML is difficult because during the XML conversion process it is difficult to define the shapes of the irregular tables and to define the locations in the irregular table of the various data entries. For example, if table 250,
Referring now to
At step 525, calculation of the grid structure 375 is started. The cell edges of the cells contained within the irregular table are located. For example, referring to the table 300 shown in
At step 530, the horizontal and vertical edges determined at step 525 are used to define a grid structure 375, as illustrated in
At step 535, the document containing the irregular table is saved as an XML document so that the document may be consumed by a separate application such as a spreadsheet application. It should be understood that if the document is saved in an XML format but is subsequently opened by the same providing application as originally created the document, the data of the document may be transformed back into the language of the original providing application in order to avoid difficulty in locating data contained within the irregular table.
At step 540 the grid structure 375 is output to allow a consuming application to draw the irregular sized table and/or locate data contained in the irregular table. For example, if a spreadsheet application requires the data entry contained in Cell G of the table 300 illustrated in
As described herein, a method and system are provided for calculating a coordinate system based on a grid structure for superimposing on to an irregular table for allowing a consuming application to define the table shape and to locate data contained within the irregular table. It will be apparent to those skilled in the art that various modifications or variations may be made in the present invention without departing from the scope or spirit of the invention. Other embodiments of the invention will be apparent to those skilled in the art from consideration of this specification and practice of the invention disclosed herein.
Claims
1. A computer-implemented method of creating a coordinate system for defining an irregular computer-generated table, comprising:
- storing in computer memory a document containing an irregular table having a plurality of table cells;
- determining a size of a smallest table cell;
- creating a grid structure comprised of uniformly-shaped cells in response to the size of the smallest table cell, comprising locating all vertical and horizontal edges of each of the plurality of table cells, marking the position of each cell edge relative to a starting position on the table, and determining a grid cell size that is equal to the smallest table cell;
- preparing a coordinate system for the table for allowing a consuming application to display the shape of the table;
- superimposing the grid structure onto the table;
- defining the shape of the table based on the coordinates of the uniformly-shaped grid cells of the grid structure superimposed onto the table;
- mapping an irregular table cell having a first size with a grid cell having a second size, wherein the first size and the second size are different sizes; and
- storing the defined table using a first markup language.
2. The method of claim 1, whereby the step of defining the shape of the table based on the coordinates of the uniformly-shaped grid cells of the grid structure superimposed onto the table includes:
- mapping each table cell to a position in the grid structure by locating the leftmost and uppermost position of each table cell in the grid structure; and
- defining the size of each table cell based on the number of grid cells high and wide each table cell comprises.
3. The method of claim 1, further comprising:
- transforming the document and the table for display by a consuming application; and
- displaying the document and the table.
4. The method of claim 3, wherein the document is transformed from the first markup language into Hypertext Markup Language (HTML) using an XSLT transform file, wherein the first markup language is different from HTML.
5. The method of claim 4, whereby the step of preparing a coordinate system for the table for allowing a consuming application to define the shape of the table further comprises preparing a coordinate system for the table for allowing the consuming application to locate data contained in the table.
6. The method of claim 5, further comprising:
- locating any data contained in each of the plurality of table cells based on the coordinates of the uniformly-shaped cells of the grid structure overlaying each of the plurality of table cells.
7. The method of claim 6, further comprising the step of:
- in response to locating any data contained in each of the plurality of table cells, causing the consuming application to extract data from one or more of the non-uniformly-shaped cells for use by the consuming application.
8. The method of claim 7, whereby the any data contained in each of the plurality of table cells includes text, graphical images, or alpha-numeric data.
9. The method of claim 1, whereby the consuming application is a web browser application.
10. A computer readable medium having stored thereon computer-executable instructions which when executed by a computer perform:
- preparing a document containing an irregular table having a plurality of table cells;
- determining a size of a smallest table cell;
- creating a grid structure comprised of uniformly-shaped cells in response to the size of the smallest table cell, comprising locating all vertical and horizontal edges of each of the plurality of table cells, marking the position of each table cell edge relative to a starting position at the upper most and left most point on the table, and calculating the smallest cell in the table;
- preparing a coordinate system for the table for allowing a consuming application to display the shape of the table;
- superimposing the grid structure onto the table;
- defining the shape of the table based on the coordinates of the uniformly-shaped grid cells of the grid structure superimposed onto the table;
- mapping an irregular table cell having a first size with a grid cell having a second size, wherein the first size and the second size are different sizes; and
- storing the defined table using a first markup language.
11. The computer readable medium of claim 10, whereby defining the shape of the table based on the coordinates of the uniformly-shaped grid cells of the grid structure superimposed onto the table includes defining the shape of the table and addressing the location of each of a plurality of cells of the table.
12. The computer readable medium of claim 11 having stored thereon computer-executable instructions which when executed by a computer, further perform:
- locating any data contained in each of the plurality of table cells based on the coordinates of the uniformly-shaped cells of the grid structure superimposed over each of the plurality of table cells.
13. A computer-implemented method of locating data in an irregular table, comprising:
- storing the irregular table in a computer memory;
- preparing a coordinate system for the table for allowing a consuming application to display the table;
- determining a size of a smallest table cell;
- creating a grid structure comprised of uniformly-shaped cells in response to the size of the smallest table cell, comprising locating all vertical and horizontal edges of each of the plurality of table cells, marking the position of each cell edge relative to a starting position on the table, and determining a grid cell size that is equal to the smallest table cell;
- applying the coordinate system to the table;
- defining the shape of the table based on a set up of coordinates of the coordinate system that define an outer parameter of the table;
- mapping an irregular table cell having a first size with a grid cell having a second size, wherein the first size and the second size are different sizes;
- locating data contained in any of a plurality of cells contained in the table based on a set of coordinates of the coordinate system that define the locations of each of the plurality of cells; and
- storing the located data as a markup language.
14. The method of claim 13, whereby the step of defining the shape of the table includes:
- overlaying the table with the grid structure; and
- defining the shape of the table based on the coordinates of the uniformly-shaped cells of the grid structure overlaying the table.
15. The method of claim 14, whereby the step of locating data contained in any of a plurality of cells contained in the table based on a set of coordinates of the coordinate system that define the locations of each of the plurality of cells, includes locating any data contained in each of the plurality of cells based on the coordinates of the uniformly-shaped cells of the grid structure overlaying each of the plurality of cells of the table.
4802673 | February 7, 1989 | Patel |
5272628 | December 21, 1993 | Koss |
5317680 | May 31, 1994 | Ditter, Jr. |
5450536 | September 12, 1995 | Rosenberg et al. |
5555352 | September 10, 1996 | Lucas |
5557787 | September 17, 1996 | Shin et al. |
5588099 | December 24, 1996 | Mogilevsky et al. |
5636297 | June 3, 1997 | Eller et al. |
5768606 | June 16, 1998 | Sharp |
5774584 | June 30, 1998 | Matsumoto et al. |
5835916 | November 10, 1998 | Inaki et al. |
5873106 | February 16, 1999 | Joseph |
5907630 | May 25, 1999 | Naoi et al. |
5933833 | August 3, 1999 | Musashi |
6044383 | March 28, 2000 | Suzuki et al. |
6088708 | July 11, 2000 | Burch et al. |
6112216 | August 29, 2000 | Pratley et al. |
6144974 | November 7, 2000 | Gartland |
6336124 | January 1, 2002 | Alam et al. |
6374273 | April 16, 2002 | Webster |
6415305 | July 2, 2002 | Agrawal et al. |
6613098 | September 2, 2003 | Sorge et al. |
6639611 | October 28, 2003 | Leduc |
6678865 | January 13, 2004 | Pratley et al. |
6747643 | June 8, 2004 | Happel |
6816170 | November 9, 2004 | Udeshi |
6822663 | November 23, 2004 | Wang et al. |
7002571 | February 21, 2006 | Lake et al. |
20010049699 | December 6, 2001 | Pratley et al. |
20020124016 | September 5, 2002 | Rank et al. |
20030005410 | January 2, 2003 | Harless |
20030028560 | February 6, 2003 | Kudrolli et al. |
20040015834 | January 22, 2004 | Mestre et al. |
20040153449 | August 5, 2004 | Bettendorf |
20040205452 | October 14, 2004 | Fitzsimons et al. |
20050091231 | April 28, 2005 | Pal et al. |
- Anderson, Richard J., et al., “The Table Layout Problem”, SCG '99, Miami Beach, FL, Jun. 1999, pp. 115-123 [ACM 1-58113-068-6/99/06].
- Okubo, Tsuneo, et al., “New Algorithm for Overlapping Cell Treatment in Hierarchical CAD Data / Electron Beam Exposure Data Conversion”, 27th ACM/IEEE Design Automation Conference, © 1990, pp. 321-326 [IEEE 0738-100X/90/0006/0321].
- Villard, Lionel, et al., “An Incremental XSLT Transformation Processor XML Documentation Manipulation”, WWW '02, Honolulu, HI, May 7-11, 2002, pp. 474-485 [ACM 1-58113-449-5/02/0005].
- Microsoft Computer Dictionary, 5th Edition, Microsoft Press, Redmond, WA, © 2002, pp. 129-130, 516 and 580.
- Parker, Sybil P. (ed.), McGraw-Hill Dictionary of Scientific and Technical Terms, 5th Edition, McGraw-Hill, Inc., New York, NY, © 1994, p. 2006.
- Microsoft Press Computer Dictionary, 3rd Edition, Microsoft Press, Redmond, WA, © 1997, p. 367.
- Zuyev, Peter, et al., “Table Image Segmentation”, Proceedings of the 4th Int'l Conf. on Document Analysis and Recognition, vol. 2, Aug. 18-20, 1997, pp. 705-708.
- North, Simon, et al., Sam's Teach Yourself XML in 21 Days, Sam's Publishing, Indianapolis, IN, Mar. 1999, pp. 13-18.
- Raviv, Alon, et al., “Three Dimensional Freeform Sculpting via Zero Sets of Scalar Trivariate Functions”, Fifth Symposium on Solid Modeling, Ann Arbor, MI, Jun. 1999, pp. 246-257.
- Samet, Hanan, “Hierarchical Representations of Collections of Small Rectangles”, ACM Computing Surveys, vol. 20, No. 4, Dec. 1988, pp. 271-309.
- Ayani, Rassul, et al., “Optimizing Cell-Size in Grid-Based DDM”, 0-7695-0677-1/00 © IEEE 2000, pp. 93-100.
- Nagy, George, et al., “Approximation of Polygonal Maps by Cellular Maps”, Communications of the ACM, vol. 22, No. 9, Sep. 1979, pp. 518-525.
- Samet, Hanan, “The Quadtree and Related Hierarchical Data Structures”, ACM Computing Surveys, vol. 16, No. 2, Jun. 1984, pp. 187-260.
- Anderson, Richard J., et al., “The Table Layout Problem,” SCG '99, Miami Beach, FL, Jun. 1999, pp. 115-123 [ACM 1-58113-068-6/99/06].
- Okubo, Tsuneo, et al., “New Algorithm for Overlapping Cell Treatment in Hierarchical CAD Data / Electron Beam Exposure Data Conversion”, 27th ACM/IEEE Design Automation Conference, © 1990, pp. 321-326 [IEEE 0738-100X/90/0006/0321].
- Villard, Lionel, et al., “An International XSLT Transformation Processor XML Documentation Manipulation”, WWW '02, Honolulu, HI, May 7-11, 2002, pp. 474-485 [ACM 1-58113-449-5/02/0005].
- Microsoft Computer Dictionary, 5th Edition, Microsoft Press, Redmond, WA, © 2002, pp. 129-130, 516 and 580.
- Parker, Sybil P. (ed.), McGraw-Hill Dictionary of Scientific and Technical Terms, 5th Edition, McGraw-Hill, Inc., New York, NY, © 1994, p. 2006.
- Microsoft Press Computer Dictionary, 3rd Edition, Microsoft Press, Redmond, WA, © 1997, p. 367.
- Featuring Adobe FrameMaker 6.0, Adobe Systems Incorporated, © 2000.
Type: Grant
Filed: Feb 13, 2003
Date of Patent: Apr 29, 2008
Assignee: Microsoft Corporation (Redmond, WA)
Inventors: Brian Jones (Redmond, WA), Robert Little (Redmond, WA), Marcin Sawicki (Kirkland, WA)
Primary Examiner: Shahid Alam
Assistant Examiner: Robert Stevens
Attorney: Merchant & Gould P.C.
Application Number: 10/366,109
International Classification: G06F 15/00 (20060101); G06F 17/00 (20060101);