SYSTEMS, METHODS AND COMPUTER PROGRAM PRODUCTS THAT CAN REDUCE XML DATA TRANSFER THROUGH NETWORKS
Field of the Invention
The present invention relates generally to networks and, more particularly, to the transfer of data through networks .
Background of the Invention The Internet has gained broad recognition and acceptance as a viable medium for communicating and for conducting business. The World-Wide Web (Web) was created in the early 1990' s, and is comprised of server-hosting computers connected to the Internet that have hypertext documents (referred to as Web pages) and/or other applications stored therewithin (or accessible thereto) . Web pages and other applications are accessible by clients ( e . g. , Web browsers) utilizing the Hypertext Transfer Protocol (HTTP) via a Transmission Control Protocol/Internet Protocol (TCP/IP) connection with a server (also referred to as a Web server) . Extensible Markup Language (XML) is currently a formal recommendation from the World Wide Web
Consortium as a way to make the Web a more versatile
tool. XML syntax guidelines and the definition of XML entities are presented in the Extensible Markup Language (XML) 1.0 Specification, February 10, 1998, which is incorporated herein by reference in its entirety and which is available from the World Wide Web Consortium (www.w3. org) and specifically at (www.w3.org/TR/l998/REC-xml-19980210) .
XML is similar to HTML in that both languages are subsets of Standard Generalized Markup Language (SGML) and both utilize tags to describe the contents of a page or file. HTML, however, describes Web page content ( e . g. , text and graphics) in terms of how the content is to be displayed and interacted with. XML describes content in terms of what data is being described. For example, a <PHONE UM> tag could indicate that the data following the tag is a phone number. As such, an XML file can be processed purely as data by a program, or it can be stored with similar data on another computer, or it can be displayed like an HTML file. For example,' depending -on how an application program in a receiving computer wanted to handle a phone number between a set of <PHONENUM> tags, the phone number could be stored, displayed, or dialed..XML is "extensible" because, unlike HTML, XML markup tags can be unlimited and can be self-defining.
Extensible Style sheet Language (XSL) is a language for creating style sheets that describe how XML data sent over the Web is to be presented to users . A style sheet is a definition of an XML document's appearance in terms of such elements as typeface, size,
and color for headings and body text; layouts of individual sections { e . g. , number of columns); line spacing, and margins; and the like. Conventionally, a style sheet is specified at the beginning of an XML document, either by embedding the style sheet in the XML document or by a link to the style sheet. A Web browser may allow users to override some or all of the definitions within a style sheet.
For example, in an XML document that describes the characteristics of one or' more- wines sold by a wine merchant, a set of <REGION> tags might contain the name of a geographic region from where a particular wine is made. Using XSL, a Web browser can be notified that the region name should be displayed with a particular wine, where to display the region name on a. page, and that it should be displayed in a particular style and/or format.
XSLT (XSL Transformation) is a standard way to describe how to transform (change) the structure of an XML document into an XML document with a different structure. XSLT currently is a Recommendation of the World Wide Web Consortium (W3C) , dated November 16, 1999, and can be found at www.w3.org/TR/xslt. XSLT is used to describe how to transform the data structure of an XML document into a different data structure. The coding for XSLT is also referred to as a style sheet and can be combined with an XSL style sheet or be used independently.
Increasingly, companies and businesses are opening their back-end computer systems to customers
and/or partners to facilitate information transfer. One popular method is to provide an interface that supports XML requests and responses embedded in some communication mechanism, such as HTTP, CORBA (Common Object Request Broker Architecture) , and COM (Component Object Model) .
XML servers conventionally do not know the format that a client process desires XML data to be in. Moreover, XML servers conventionally do not know what specific set of data may be required or .desired by a client. As a result, XML data is simply returned to a client and XSLT is utilized at the client to transform the data into a usable/desired format . Unfortunately, this may result in large amounts of unwanted (and unnecessary) data being transferred over a network, which may cause network delays, and which may require additional memory and/or disk space by client devices.
As an example, a company called "Packaged Meals" provides access to their suite of products, pre- packaged frozen meals, via an interface that supports XML requests and responses. One of Packaged Meals' customers is "Low-Cal Restaurant", which periodically updates their menu with items purchased from Packaged Meals. Referring to Fig. 1, Low-Cal Restaurant wants to update their breakfast menu with items that have less than 600 calories. The client 10 (Low-Cal Restaurant client) sends an XML request 12 (having a size of 192 bytes) to retrieve all breakfast items from the Packaged Meals server 20. An exemplary XML data
request 12 from the Low-Cal Restaurant client 10 is illustrated in Fig. 2A. The XML response 14 (having a size of 2534 bytes) contains a list of all breakfast items, but which is not (or is more than) the set of data that the client 10 desires. (The Low-Cal
Restaurant client 10 wants only a list of breakfast items that have less than 600 calories.) An exemplary XML response from the Packaged Meals server 20 to the Low-Cal Restaurant client 10 is illustrated in Fig. 2B. An exemplary XSL style sheet for transforming the XML data received from the Packaged Meals server 320 is illustrated in Fig. 2C. The XML data from the Packaged Meals server 20 may need to be transformed to an XML format supported by the client 10. Moreover, it is desired that the XML data be limited to a listing of breakfast items having less than 600 calories. Accordingly, upon receiving the XML response from the Packaged Meals server 20, the Low-Cal Restaurant client 10 uses an XSL style sheet to transform the XML response into a desired format and to limit the XML response to only breakfast items having less than 600 calories . The XML response 14 that has been transformed by the Low-Cal Restaurant client 10 using the XSL style sheet of Fig. 2C is illustrated in Fig. 2D. Table 1 below provides a brief description of exemplary XML requests/responses and XSL definitions, along with their sizes, for the above example.
Table 1
As can be seen, a total of 2726 bytes of data was transmitted over a network (XML request + XML response) when only 417 bytes of data (XML request + transformed XML response) was actually necessary. Accordingly, a need exists for reducing the amount of data transferred in XML requests and responses. Moreover, a need exists for transferring XML data to clients in client-desired formats.
Summary of the Invention
In view of the above discussion, the present invention provides systems, methods, and computer program products that can reduce the amount of data transferred over a network. According to embodiments of the present invention, a server receives a request from a client for XML data. The client request is accompanied by an XSL style sheet that can be used to transform XML data into an XML format preferred by the
client. The XSL style sheet may also be accompanied by information for modifying the XSL style sheet. Using, the XSL style sheet, the server transforms the requested XML data into a format preferred by the client, into a preferred format having a reduced amount of data, or a reduced amount of data. The preferred format preferably has a reduced amount of data, but need not have. The server serves the transformed XML data to the client via the network. Preferably, the server stores the received XSL style sheet for use in transforming XML data in response to future requests from the client.
According to other embodiments of the present invention, a server receives a request from a client for XML data, wherein the client request is accompanied by information that identifies an XSL style sheet for modifying XML data into a format preferred by the client. Using the identification information, the server retrieves an XSL style sheet that is either locally stored or that is stored on a remotely-located data processing system. The client request may be accompanied by information for modifying the retrieved XSL style sheet. Accordingly, prior to transforming the requested XML data into a preferred format for the client, the server may modify the retrieved XSL style sheet using the received information. The server then transforms the requested XML data into a preferred format using the retrieved XSL style sheet. The server serves the transformed XML data to the client via the network.
Embodiments of the present invention may facilitate the reduction of data transferred through a network. Moreover, embodiments of the present invention may facilitate providing XML data to requesting clients in client-preferred formats without requiring clients to transform received XML data.
Brief Description of the Drawings Fig. 1 is a block diagram that illustrates a conventional XML request from a client and a conventional XML response from a server.
Fig. 2A is an exemplary XML data request. Fig. 2B is an XML response to the XML data request of Fig. 2A. Fig. 2C is an exemplary XSL style sheet for use in transforming XML data according to a client- preferred format .
Fig. 2D is the XML response of Fig. 2B transformed using the XSL style sheet of Fig. 2C. Fig. 3 is a block diagram of a network having a server and one or more clients in communication via the network .
Fig. 4 is a flow chart of systems, methods and/or computer program products that can reduce the amount of data transferred in response to a client request for XML data according to embodiments of the present invention.
Fig. 5 is a block diagram of systems, methods and/or computer program products that can reduce the amount of data transferred over a network, according to
embodiments of the present invention illustrated in Fig. 4.
Fig. 6 is a flow chart of systems, methods and/or computer program products that can reduce the amount of data transferred in response to a client request for XML data according to other embodiments of the present invention.
Fig. .7 contains exemplary information for modifying a retrieved XSL style sheet according to an embodiment of the present invention.
Fig. 8 is a block diagram of systems, methods and/or computer program products that can reduce the amount of data transferred over a network, according to embodiments of the present invention illustrated in Fig. 6.
Fig. 9A is an exemplary XSL style sheet identifier response according to an embodiment of the present invention.
Fig. 9B is an exemplary XML data request from a client that includes an XSL style sheet identifier and modification parameters for modifying the identified XSL style sheet.
Detailed Description of the Invention The present invention now is described more fully hereinafter with reference to the accompanying drawings, in which preferred embodiments of the invention are shown. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth
herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. As will be appreciated by one of skill in the art, the present invention may be embodied as methods, data processing systems, and/or computer program products. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product on a computer-usable storage medium having computer-usable program code embodied in the medium. Any suitable computer readable medium may be utilized including hard disks, CD-ROMs, optical storage devices, or magnetic storage devices.
Computer program code for carrying out operations of the present invention may be written in an object oriented programming language such as JAVA®, Smalltalk or C++. The computer program code for carrying out operations of the present invention may also be written in conventional procedural programming languages, such as "C", JavaScript, Visual Basic, TSQL, Perl, or in various other programming languages.
Software embodiments of the present invention do not depend on implementation with a particular programming language. Portions of the program code may execute entirely on one or more data processing systems. Program code for carrying out aspects of the
present invention may execute entirely on one or more servers, or it may execute partly on a server and partly on a client within a client device (i.e., a user's Web client) , or as a proxy server at an intermediate point in a communications network. In the latter scenario, a client device may be connected to a server through a LAN or a WAN (e.g., an intranet), or the connection may be made through the Internet (e.g., via an Internet Service Provider) . It is understood that the present invention is not TCP/lP-specific or Internet-specific. The present invention may be embodied using various protocols over various types of computer networks .
The present invention is described below with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and computer program products according to embodiments of the invention. It is understood that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in' the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions . These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the block diagrams and/or flowchart block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the block diagrams and/or flowchart block or blocks .
The computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the block diagrams and/or flowchart block or blocks .
A Web server (also referred to as an HTTP server) is a computer program that utilizes HTTP to serve files that form Web pages to Web clients. Exemplary Web servers are International Business Machines Corporation's family of Lotus Domino® servers, the Apache server (available from ww . apache . org) , and Microsoft's Internet Information Server (IIS), available from Microsoft Corporation, Redmond, Washington.
A Web client is a requesting program that also utilizes HTTP. A browser is an exemplary Web client for use in requesting Web pages and files from Web servers. A Web server waits for a Web client, such
as a browser, to open a connection and to request a specific Web page or application. The Web server then sends a copy of the requested item to the Web client, closes the connection with the Web client, and waits for the next connection.
HTTP allows a browser to request a specific item, which a Web server then returns and the browser renders . To ensure that browsers and Web servers can interoperate unambiguously, HTTP defines the exact format of requests (HTTP requests) sent from a browser to a Web server as well as the format of responses (HTTP responses) that the Web server returns to the browser. Exemplary browsers include Netscape Navigator® (America Online, Inc., Dulles, VA) and Internet Explorer® (Microsoft Corporation, Redmond, WA) .
Browsers typically provide a graphical user interface for retrieving and viewing Web pages, applications, and other resources served by Web servers .
Exemplary client devices executing a browser that may be utilized with embodiments of the present invention may include, but are not limited to, personal .computers, wireless communications devices, personal digital assistants (PDAs) , hand-held computers, Internet-ready phones, and WebTVs . Browsers running on various client devices may communicate with a Web server via communications networks, including the Internet, wide area networks, private networks (e.g., intranets) , cellular radiotelephone networks and/or satellite radiotelephone networks. Referring now to Fig. 3, a block diagram of
systems, methods and/or computer program products for reducing the amount of data transferred over a network, according to embodiments of the present invention is illustrated. As shown in Fig. 3, at least one client hosting device 30, 30' and a server hosting device 40 are coupled to one another via a network 50. Each client hosting device 30, 30' and the server hosting device 40 may be embodied as one or more enterprise, personal, palm-top and/or pervasive computing devices. The client hosting devices 30, 30" and server hosting device 40 are interconnected by a network 50 that may be a public and/or private computer network, including local area networks, wide area networks, wireless radiotelephone networks, the Internet, intranets and extranets. As shown in Fig. 3, connections to the network 50 may be wire connections 32 and/or wireless connections 34.
Referring now to Fig. 4, a flow chart of systems, methods and/or computer program products for reducing the amount of data transferred through a network in response to a client request for XML data, according to embodiments of the present invention, is illustrated. A server receives a request from a client for XML data (Block 100) . The client request is accompanied by an XSL style sheet configured to transform XML data into an XML format preferred by the client and, preferably, having a reduced amount of data. The XSL style sheet may also be accompanied by information for modifying the XSL style sheet. Preferably, the server stores the received
XSL style sheet for use in transforming XML data in response to future requests from the client (Block 110) . Using, the XSL style sheet, the server transforms the requested XML data into a preferred format (Block 120) . The preferred format, preferably, has a reduced amount of data compared with the format in which the requested XML data would otherwise have been sent to the requesting client. However, the transformation may provide only a preferred format of the client or only a reduced amount of data. Prior to transforming the XML data, the server may modify the received XSL style sheet if the client request includes modification information. The server serves the transformed XML data to the client via the network (Block 130) . Referring now to Fig. 5, a block diagram of systems, methods and/or computer program products for reducing the amount of data transferred through a network in response to a client request for XML data, according to embodiments of the present invention shown with respect to Fig. 4, is illustrated. The Low-Cal
Restaurant client 310 sends an XML data request 312 for all breakfast items to the Packaged Meals server 320. The XML data request includes an XSL style sheet for transforming XML data into a format preferred by the Low-Cal Restaurant client 310. The size of the request and XSL style sheet is 750 bytes.
The Packaged Meals server 320 transforms the requested XML data using the received XSL style sheet and serves the resulting XML response 314 to the Low- Cal Restaurant client 310. The resulting XML response
314 contains only the breakfast items with less than 600 calories and has a size of 225 bytes. Accordingly, the amount of data transferred through the network is reduced compared with conventional methods wherein transformation of XML data occurs at the client (Fig. 1) . Moreover, the XML response is in a format that can be used readily by the Low-Cal Restaurant client 310. Referring back to Fig. 1, the combined size of the conventional client request and server response was 2726 bytes (192 bytes + 2534 bytes) . By transforming the requested XML data at the Packaged Meals server 320, the combined size of the client request and server response according to the embodiment of the present invention illustrated with respect to Figs. 4 and 5 is 975 bytes (750 bytes + 225 bytes) . As such, the amount of data transmitted through the network has been reduced by 64% (1751 bytes) .
Referring now to Fig. 6, a flow chart of systems, methods and/or computer program products for reducing the amount of data transferred through a network in response to a client request for XML data, according to additional embodiments of the present invention, is illustrated. A server receives a request from a client for XML data (Block 200) . The client request is accompanied by information that identifies an XSL style sheet for modifying XML data into a format preferred by the client. Using the identification information, the server retrieves an XSL style sheet that is either locally stored or that is stored on a remotely-located data processing system in
communication with the network (Block 210) .
The client request may be accompanied by information for modifying the retrieved XSL style sheet. Accordingly, prior to transforming the requested XML data into a preferred format for the client, the server may modify the retrieved XSL style sheet using the received information (Block 220) . Exemplary information for modifying the retrieved XSL style sheet is set forth in Fig. 7. The server then transforms the requested XML data into a preferred format using the retrieved (and maybe modified) XSL style sheet (Block 230) . The server serves the transformed XML data to the client via the network (Block 240) .
Referring now to Fig. 8, a block diagram of systems, methods and/or computer program products for reducing the amount of data transferred through a network in response to a client request for XML data, according to embodiments of the present invention shown with respect to Fig. 6, is illustrated. Prior to sending an initial XML data request (or at the same time of sending an initial XML data request) to the Packaged Meals server 320, the Low-Cal Restaurant client 310 transmits an XSL style sheet (indicated by 306) to the Packaged Meals server 320. An exemplary XSL style sheet is illustrated in Fig. 2C. The Packaged Meals server 320 stores the received XSL style sheet and sends the Low-Cal Restaurant client 310 an identifier via response 308 to be used in subsequent client requests for identifying the stored XSL style sheet. An exemplary XSL style sheet identifier response
308 is illustrated in Fig. 9A. The size of the XSL style sheet is 558 bytes and the size of the server response containing an identifier of the XSL style sheet is 87 bytes. Subsequently, the Low-Cal Restaurant client
310 sends an XML data request 312 for all breakfast items having less than 600 calories to the Packaged Meals server 320. Included with the XML data request is the identifier of the XSL style sheet previously transmitted to the Packaged Meals server 320 and modification parameters for modifying the XSL style sheet. The size of the request, including the identifier and modification parameters is 400 bytes. An exemplary XML data request from the Low-Cal Restaurant client 310 that includes an XSL style sheet identifier and modification parameters for modifying the XSL style sheet is illustrated in Fig. 9B.
The Packaged Meals server 320 retrieves the XSL style sheet using the identifier in the received XML data request 312. The Packaged Meals server 320 uses the modification parameters in the received XML data request 312 to modify the XSL style sheet, and then transforms the requested XML data using the modified XSL style sheet. The Packaged Meals server 320 then serves the resulting XML response to the Low-Cal Restaurant client 310. The resulting XML response contains only the breakfast items with less than 600 calories and has a size of 225 bytes. The combined size of the client request 312 and server response 314 is 665 bytes. As such, the amount of data transmitted
through the network, compared with the conventional client request and server response of Fig. 1, has been reduced by 68% (2061 bytes) .
As with the previous example illustrated with respect to Fig. 4, the amount of data transferred through the network is reduced and the XML data is in a format that can be used readily by the Low-Cal Restaurant client 310. Although the initial transmittal of the XSL style sheet to the Packaged Meals server 320 (and the subsequent transmittal of an identifier to the Low-Cal Restaurant client 310) utilizes 645 bytes, subsequent XML data requests (and XML responses from the Packaged Meals server 320) will have smaller data sizes since the XSL style sheet does not have to be transmitted to the Packaged Meals server 320 more than once .
The foregoing is illustrative of the present invention and is not to be construed as limiting thereof . Although a few exemplary embodiments of this invention have been described, those skilled in the art will readily appreciate that many modifications are possible in the exemplary embodiments without materially departing from the novel teachings and advantages of this invention. Accordingly, all such modifications are intended to be included within the scope of this invention as defined in the claims . Therefore, it is to be understood that the foregoing is illustrative of the present invention and is not to be construed as limited to the specific embodiments disclosed, and that modifications to the disclosed
embodiments, as well as other embodiments, are intended to be included within the scope of the appended claims . The invention is defined by the following claims, with equivalents of the claims to be included therein.