The instant disclosure relates to computer programs. More specifically, the instant disclosure relates to computer programs for dynamically generating documents.
Conventionally, output documents, such as those produced by a web server, do not include a combination of static and dynamic data. A single script runs on the web server to generate the output document. However, there is a need for a script to combine static and dynamic data.
According to one embodiment, a method includes executing a dynamic document template. The method also includes generating a script from the dynamic document template. The method further includes creating or appending to an output document based, in part, on the script.
According to another embodiment, a computer program product includes a computer readable medium having code to execute a dynamic document template. The medium also includes code to generate a script from the dynamic document template. The medium further includes code to create an output document based, in part, on the script.
According to yet another embodiment, an apparatus includes a processor and a memory coupled to the processor, in which the processor is configured to execute a dynamic document template. The processor is further configured to generate a script from the dynamic document template. The processor is also configured to create an output document based, in part, on the script.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims. The novel features which are believed to be characteristic of the invention, both as to its organization and method of operation, together with further objects and advantages will be better understood from the following description when considered in connection with the accompanying figures. It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended as a definition of the limits of the present invention.
For a more complete understanding of the disclosed system and methods, reference is now made to the following descriptions taken in conjunction with the accompanying drawings.
In one embodiment, the user interface device 110 is referred to broadly and is intended to encompass a suitable processor-based device such as a desktop computer, a laptop computer, a personal digital assistant (PDA) or table computer, a smartphone or other a mobile communication device or organizer device having access to the network 108. In a further embodiment, the user interface device 110 may access the Internet or other wide area or local area network to access a web application or web service hosted by the server 102 and provide a user interface for enabling a user to enter or receive information.
The network 108 may facilitate communications of data between the server 102 and the user interface device 110. The network 108 may include any type of communications network including, but not limited to, a direct PC-to-PC connection, a local area network (LAN), a wide area network (WAN), a modem-to-modem connection, the Internet, a combination of the above, or any other communications network now known or later developed within the networking arts which permits two or more computers to communicate, one with another.
In one embodiment, the server 102 is configured to store data or scripts. Additionally, spreadsheets for calculating recommendations on the server 102 may access data stored in the data storage device 106 via a Storage Area Network (SAN) connection, a LAN, a data bus, or the like. The data storage device 106 may include a hard disk, including hard disks arranged in an Redundant Array of Independent Disks (RAID) array, a tape storage drive comprising a magnetic tape data storage device, an optical storage device, or the like. The data may be arranged in a database and accessible through Structured Query Language (SQL) queries, or other data base query languages or operations.
In one embodiment, the server 102 may submit a query to selected data from the storage devices 204, 206. The server 102 may store consolidated data sets in a consolidated data storage device 210. In such an embodiment, the server 102 may refer back to the consolidated data storage device 210 to obtain a set of data elements and/or scripts. Alternatively, the server 102 may query each of the data storage devices 204, 206, 208 independently or in a distributed query to obtain the set of data elements. In another alternative embodiment, multiple databases may be stored on a single consolidated data storage device 210.
In various embodiments, the server 102 may communicate with the data storage devices 204, 206, 208 over the data-bus 202. The data-bus 202 may comprise a SAN, a LAN, or the like. The communication infrastructure may include Ethernet, Fibre-Chanel Arbitrated Loop (FC-AL), Small Computer System Interface (SCSI), Serial Advanced Technology Attachment (SATA), Advanced Technology Attachment (ATA), and/or other similar data communication schemes associated with data storage and communication. For example, the server 102 may communicate indirectly with the data storage devices 204, 206, 208, 210; the server 102 first communicating with a storage server or the storage controller 104.
The server 102 may include modules for interfacing with the data storage devices 204, 206, 208, 210, interfacing a network 108, interfacing with a user through the user interface device 110, and the like. In a further embodiment, the server 102 may host an engine, application plug-in, or application programming interface (API).
The computer system 300 also may include random access memory (RAM) 308, which may be SRAM, DRAM, SDRAM, or the like. The computer system 300 may utilize RAM 308 to store the various data structures used by a software application such as data and/or scripts. The computer system 300 may also include read only memory (ROM) 306 which may be PROM, EPROM, EEPROM, optical storage, or the like. The ROM may store configuration information for booting the computer system 300. The RAM 308 and the ROM 306 hold user and system data.
The computer system 300 may also include an input/output (I/O) adapter 310, a communications adapter 314, a user interface adapter 316, and a display adapter 322. The I/O adapter 310 and/or the user interface adapter 316 may, in certain embodiments, enable a user to interact with the computer system 300. In a further embodiment, the display adapter 322 may display a graphical user interface associated with a software or web-based application. For example, the display adapter 322 may display menus allowing an administrator to input dynamic document templates on the server 102 through the user interface adapter 316.
The I/O adapter 310 may connect one or more storage devices 312, such as one or more of a hard drive, a compact disk (CD) drive, a floppy disk drive, and a tape drive, to the computer system 300. The communications adapter 314 may be adapted to couple the computer system 300 to the network 108, which may be one or more of a LAN, WAN, and/or the Internet. The user interface adapter 316 couples user input devices, such as a keyboard 320 and a pointing device 318, to the computer system 300. The display adapter 322 may be driven by the CPU 302 to control the display on the display device 324.
The applications of the present disclosure are not limited to the architecture of computer system 300. Rather the computer system 300 is provided as an example of one type of computing device that may be adapted to perform the functions of a server 102 and/or the user interface device 110. For example, any suitable processor-based device may be utilized including without limitation, including personal data assistants (PDAs), tablet computers, smartphones, computer game consoles, and multi-processor servers. Moreover, the systems and methods of the present disclosure may be implemented on application specific integrated circuits (ASIC), very large scale integrated (VLSI) circuits, or other circuitry. In fact, persons of ordinary skill in the art may utilize any number of suitable structures capable of executing logical operations according to the described embodiments.
When calling the dynamic document template 506 the application 504 may pass arguments to the dynamic document template 506. For example, the arguments may be passed in a JavaScript arg[ ] Array object. According to one embodiment, when the addByTemplate( ) function is executed an arg[ ] Array may be passed to the addByTemplate( ) function including information to be passed to the dynamic document template 506. When passing variables, string, number, and Boolean data types may be passed by value to the dynamic document template 506. The application 504 may retrieve modified values from the dynamic document template 506 for variables in the passed arg[ ] Array. Composite objects such as, for example, Dataset objects and Array objects may be passed by-reference to the dynamic document template 506.
According to one embodiment, the addByTemplate( ) function includes a callback function for the calling Dataset object with supporting logic to convert the document template into an interim template JavaScript 508; validate the caller's arguments; load and execute the interim template JavaScript and optional TEMPLATE( ) entry-point function 502; and transfer any non by-reference return TEMPLATE( ) entry point arguments to the callers arg[ ] Array.
The dynamic document template 506 would normally be physically separate from the application 504 such that dynamic document templates may be modified and maintained without impacting the application 504. Additionally, separating the dynamic document template 506 from the application 504 allows debugging action for the addByTemplate( ) function. The dynamic document template 506 may also have access only to variables in its local namespace and variables passed by the application through arguments to the dynamic document template 506. Thus, operations in the dynamic document template 506 have a minimally adverse impact to variables in other portions of the application 504. Furthermore, the separate document template scripts may be called from more than one application program, and may be subject to security controls imposed by the application environment.
According to one embodiment, a dynamic document template 506 may include lines containing either literal data to generate one output document record that is appended to a target dataset that invoked the addByTemplate( ) function or a procedural statement. Lines of the dynamic document template 506 not placed between procedural delimiters may be interpreted literally. Within literal data, assignment delimiters may bracket variables, function calls, or complex expressions whose evaluation directly inserts data into a generated output dataset record.
The method 400 continues to block 404 with generating a script from the dynamic document template. For example, the dynamic document template 506 of
According to one embodiment, the script 508 is generated temporarily as an interim script, which is executed and the document records generated are appended to an output document 502. After the interim script 508 is generated, a TEMPLATE( ) entry-point function of the script 508 may be executed. After the interim script 508 completes execution, the interim script 508 may be removed from memory.
According to one embodiment, the script 508 is generated from the dynamic document template 506 by interpreting each line in the dynamic document template 506 according to the syntax delimiters to append a new converted line to the interim script 508.
The method of 400 then continues to block 406 by executing the script 508 to generate document records, which may be appended to the output document 502. The document records may be, for example HTML or XML formatted document records. According to one embodiment, the document records are appended to a target dataset object as the script 508 executes such that if the script 508 exits after an error, the target dataset object contains generated document records up to the time the script 508 encounters the error.
According to one embodiment, the script 508 may be executed by a target Dataset object addByTemplate( ) function, which calls an entry-point function in the script 508 such as TEMPLATE( ) with optional passed arguments.
One example of the method 400 of
Another example of the method 400 of
Yet another example of the method 400 of
A further example of the method 400 of
Separating static data and dynamic data with a dynamic document template as described above improves usability of an application accessing the dynamic document template. The application may call the dynamic document template without having data not passed to the dynamic document template inadvertently altered. Additionally, the inclusion of dynamic document templates allows easy modification of an application accessing the dynamic document templates. For example, a user or administrator of an application may replace a first set of dynamic document templates with a second set of dynamic document templates without altering code in the application or operation of the application.
Although the present disclosure and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the disclosure as defined by the appended claims. Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the present invention, disclosure, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized according to the present disclosure. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.
Number | Name | Date | Kind |
---|---|---|---|
6263352 | Cohen | Jul 2001 | B1 |
6311058 | Wecker | Oct 2001 | B1 |
6449638 | Wecker | Sep 2002 | B1 |
7181734 | Swamy | Feb 2007 | B2 |
7313757 | Bradley | Dec 2007 | B2 |
7555707 | Labarge | Jun 2009 | B1 |
7725923 | Miyashita et al. | May 2010 | B2 |
7925966 | Kaler et al. | Apr 2011 | B2 |
8402357 | Norwood | Mar 2013 | B1 |
8413047 | Vick et al. | Apr 2013 | B2 |
8434000 | Cantwell et al. | Apr 2013 | B2 |
8799515 | Wu | Aug 2014 | B1 |
20010051961 | Duxbury | Dec 2001 | A1 |
20050066273 | Zacky | Mar 2005 | A1 |
20050125720 | Little et al. | Jun 2005 | A1 |
20050251742 | Mogilevsky | Nov 2005 | A1 |
20060059169 | Armishev | Mar 2006 | A1 |
20060095835 | Kennedy | May 2006 | A1 |
20060156224 | Sulistio et al. | Jul 2006 | A1 |
20060242563 | Liu et al. | Oct 2006 | A1 |
20060294451 | Kelkar | Dec 2006 | A1 |
20070028166 | Hundhausen | Feb 2007 | A1 |
20070162470 | Chang | Jul 2007 | A1 |
20070174814 | Komissarchik | Jul 2007 | A1 |
20070245232 | Wake | Oct 2007 | A1 |
20070258100 | Kano | Nov 2007 | A1 |
20070273936 | Fujimaki | Nov 2007 | A1 |
20070277095 | Ukigawa | Nov 2007 | A1 |
20070283246 | Wake | Dec 2007 | A1 |
20080005085 | Fujimaki | Jan 2008 | A1 |
20080005136 | Kano | Jan 2008 | A1 |
20080005659 | Fujimaki | Jan 2008 | A1 |
20080005662 | Kano | Jan 2008 | A1 |
20080010587 | Wake | Jan 2008 | A1 |
20080010588 | Wake | Jan 2008 | A1 |
20080040588 | Ukigawa | Feb 2008 | A1 |
20080065979 | Fujimaki | Mar 2008 | A1 |
20080133563 | Hironiwa | Jun 2008 | A1 |
20080134019 | Wake | Jun 2008 | A1 |
20080195626 | Ukigawa | Aug 2008 | A1 |
20080195950 | Fujimaki | Aug 2008 | A1 |
20080208790 | Oshima | Aug 2008 | A1 |
20080209572 | Kano | Aug 2008 | A1 |
20080250310 | Chen | Oct 2008 | A1 |
20080250311 | Mitsufuji | Oct 2008 | A1 |
20080262832 | Kano | Oct 2008 | A1 |
20080262833 | Kano | Oct 2008 | A1 |
20080263101 | Hara | Oct 2008 | A1 |
20080285064 | Ukigawa | Nov 2008 | A1 |
20080320412 | Wake | Dec 2008 | A1 |
20090019064 | Takafuji | Jan 2009 | A1 |
20090021767 | Fujimaki | Jan 2009 | A1 |
20090070295 | Otomori | Mar 2009 | A1 |
20090077369 | Fujimaki | Mar 2009 | A1 |
20090077462 | Kano | Mar 2009 | A1 |
20090083300 | Wake | Mar 2009 | A1 |
20090083617 | Hironiwa | Mar 2009 | A1 |
20090083620 | Fujimaki | Mar 2009 | A1 |
20090132906 | Aoki | May 2009 | A1 |
20090137202 | Fujimaki | May 2009 | A1 |
20090144753 | Morris | Jun 2009 | A1 |
20090235156 | Wake | Sep 2009 | A1 |
20090254803 | Bayne | Oct 2009 | A1 |
20090282333 | Olsen | Nov 2009 | A1 |
20090282349 | Olsen | Nov 2009 | A1 |
20100036860 | Hiura | Feb 2010 | A1 |
20100077295 | Ichino | Mar 2010 | A1 |
20100115394 | Oshima | May 2010 | A1 |
20100115395 | Matsumoto | May 2010 | A1 |
20100199167 | Uematsu | Aug 2010 | A1 |
20110161840 | Wong et al. | Jun 2011 | A1 |
20110209047 | Olsen | Aug 2011 | A1 |
20120054595 | Mylroie | Mar 2012 | A1 |
20130191723 | Pappas | Jul 2013 | A1 |
20130311875 | Pappas | Nov 2013 | A1 |
20130339841 | Petti | Dec 2013 | A1 |
20140047322 | Kim | Feb 2014 | A1 |
20140053053 | Hogue | Feb 2014 | A1 |
20140089782 | Cook | Mar 2014 | A1 |
20140101287 | Wu | Apr 2014 | A1 |
20140129924 | Le Bescond de Coatpont | May 2014 | A1 |
20140237352 | Sriganesh | Aug 2014 | A1 |
20140282125 | Duneau | Sep 2014 | A1 |
20140310591 | Nguyen | Oct 2014 | A1 |
20150169533 | Michael | Jun 2015 | A1 |
Number | Date | Country | |
---|---|---|---|
20120131439 A1 | May 2012 | US |