Systems and methods for converting a formatted document to a web page

Systems and methods for transforming a document to a web page can include a mapping module programmed to map document styles of a document to styles of a web page. The system can also include a conversion module programmed to convert contents of the document into hypertext markup language based on the map of the mapping module, and a rendering module programmed to render the web page based on the hypertext markup language. A method can include mapping document styles in a document to styles of a web page, converting contents of the document into hypertext markup language based on the mapping, and rendering the web page based on the hypertext markup language.

TECHNICAL FIELD

Embodiments of the present invention relate to systems and methods for transforming a document to a web page.

BACKGROUND

Many computer users are familiar with and adept at using word processing applications such as Microsoft® Word to create documents. Such documents can include various styles to create desired formatting, as well as other elements such as tables, lists, and embedded resources like images and binary files.

While a document created using a word processing application can easily be converted to a printed form that closely approximates the styles and elements selected by the user to create the document, such a document may not be easily publishable on a web site. For example, the various document styles, elements, and resources embedded in a document may not be compatible with the format used to present content on a web page.

Further, while word processing applications allow for flexibility in the styles and elements that are used to create a document, web pages that are created by simply converting a document to a web-compatible format such as hypertext markup language (HTML) may not fit into the “look and feel” of the pages for a particular web site. For example, many web sites have a consistent format (e.g., font types and sizes, colors, image locations, etc.) that is used for each page so that the look and feel of the site is relatively uniform as a user navigates through the site's pages. However, a page created through simple conversion of a document created by a word processing application may not fit into the style of a particular web site.

For example, a user can use a word processing application to create a document that subsequently needs to be added to a web site. The document can include various styles and elements available in the word processing application. To convert the document to a web page, typically the contents of the document is copied into a text editing program to remove all formatting, and the contents is then copied into an HTML editor such as Microsoft® FrontPage® so that the contents can be formatted as desired to reflect the site's formatting. In addition, any resources (e.g., images, binary files) embedded in the document are manually copied to a desired location on the web server, and links to the resources are manually recreated on the web page using the HTML editor. Such a process for manually converting a document to a web page can be cumbersome and time-consuming.

It is therefore desirable to provide systems and methods that can transform documents to web pages that can be displayed using a web browser.

SUMMARY

Embodiments of the present invention relate to systems and methods for transforming a document to a web page.

One example embodiment of the invention relates to a computing system including a mapping module programmed to map document styles of a document to styles of a web page, a conversion module programmed to convert contents of the document into hypertext markup language based on the map of the mapping module, and a rendering module programmed to render the web page based on the hypertext markup language.

Another example embodiment of the invention relates to a method for transforming a document to a web page, the method including mapping document styles in a document to styles of a web page, converting contents of the document into hypertext markup language based on the mapping, and rendering the web page based on the hypertext markup language.

Yet another example embodiment of the invention relates to a computer-readable medium having computer-executable instructions for performing steps including mapping document styles in a document to styles of a web page, converting contents of the document into hypertext markup language based on the mapping, and rendering the web page based on the hypertext markup language.

DETAILED DESCRIPTION

Embodiments of the present invention relate to systems and methods for transforming a document to a web page.

In example embodiments, a document including styles and elements is transformed into a web-compatible format such as hypertext markup language (HTML) so that the contents of the document can be displayed as a web page. This transformation can be accomplished by mapping styles in the document to styles for the web page.

Referring now toFIG. 1, a document including styles and elements such as tables, lists, and embedded resources can be created on an example computer system100. For example, the document can be created on computer system100using application programs128such as Microsoft® Word, Excel, or PowerPoint®. Other applications can also be used to create the document.

Computer system100can take a variety of forms such as, for example, a desktop computer, a laptop computer, and a hand-held computer. In addition, although computer system100is illustrated, the systems and methods disclosed herein can be implemented in various alternative computer systems as well.

The system100includes a processor unit102, a system memory104, and a system bus106that couples various system components including the system memory104to the processor unit102. The system bus106can be any of several types of bus structures including a memory bus, a peripheral bus and a local bus using any of a variety of bus architectures. The system memory includes read only memory (ROM)108and random access memory (RAM)110. A basic input/output system112(BIOS), which contains basic routines that help transfer information between elements within the computer system100, is stored in ROM108.

The computer system100further includes a hard disk drive112for reading from and writing to a hard disk, a magnetic disk drive114for reading from or writing to a removable magnetic disk116, and an optical disk drive118for reading from or writing to a removable optical disk119such as a CD ROM, DVD, or other optical media. The hard disk drive112, magnetic disk drive114, and optical disk drive118are connected to the system bus106by a hard disk drive interface120, a magnetic disk drive interface122, and an optical drive interface124, respectively. The drives and their associated computer-readable media provide nonvolatile storage of computer readable instructions, data structures, programs, and other data for the computer system100.

Although the example environment described herein can employ a hard disk112, a removable magnetic disk116, and a removable optical disk119, other types of computer-readable media capable of storing data can be used in the example system100. Examples of these other types of computer-readable mediums that can be used in the example operating environment include magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, random access memories (RAMs), and read only memories (ROMs).

A number of program modules can be stored on the hard disk112, magnetic disk116, optical disk119, ROM108, or RAM110, including an operating system126, application programs128, other program modules130, and program data132.

A user may enter commands and information into the computer system100through input devices such as, for example, a keyboard134, mouse136, or other pointing device. Examples of other input devices include a toolbar, menu, touch screen, microphone, joystick, game pad, pen, satellite dish, and scanner. These and other input devices are often connected to the processing unit102through a serial port interface140that is coupled to the system bus106. Nevertheless, these input devices also may be connected by other interfaces, such as a parallel port, game port, or a universal serial bus (USB). An LCD display142or other type of display device is also connected to the system bus106via an interface, such as a video adapter144. In addition to the display142, computer systems can typically include other peripheral output devices (not shown), such as speakers and printers.

The computer system100may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer146. The remote computer146may be a computer system, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer system100. The network connections include a local area network (LAN)148and a wide area network (WAN)150. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets, and the Internet.

When used in a LAN networking environment, the computer system100is connected to the local network148through a network interface or adapter152. When used in a WAN networking environment, the computer system100typically includes a modem154or other means for establishing communications over the wide area network150, such as the Internet. The modem154, which can be internal or external, is connected to the system bus106via the serial port interface140. In a networked environment, program modules depicted relative to the computer system100, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are examples and other means of establishing a communications link between the computers may be used.

The embodiments described herein can be implemented as logical operations in a computing system. The logical operations can be implemented (1) as a sequence of computer implemented steps or program modules running on a computer system and (2) as interconnected logic or hardware modules running within the computing system. This implementation is a matter of choice dependent on the performance requirements of the specific computing system. Accordingly, the logical operations making up the embodiments described herein are referred to as operations, steps, or modules. It will be recognized by one of ordinary skill in the art that these operations, steps, and modules may be implemented in software, in firmware, in special purpose digital logic, and any combination thereof without deviating from the spirit and scope of the present invention as recited within the claims attached hereto. This software, firmware, or similar sequence of computer instructions may be encoded and stored upon computer readable storage medium and may also be encoded within a carrier-wave signal for transmission between computing devices.

Referring now toFIGS. 2-4, an example system200is illustrated. System200includes a computer system210and a server220. System210, which can be configured in a manner similar to computer system100described above, includes an application212and a document215. In example embodiments, application212is Microsoft® Word, Excel, or PowerPoint®. Other applications can also be used.

For example, Microsoft® Word can be used to create document215. Document215includes content217and metadata218. Document215can include certain styles that are used to define how content such as text, tables, and lists is formatted. In addition, document215can include embedded resources, such as images and binary files.

Once document215is created and saved by application212on computer system210, document215can be uploaded to server220as document225. In example embodiments, server220is a Microsoft® SharePoint™ Portal Server. Other types of servers can also be used.

Once document225is on server220, document225can be transformed to a web page320. For example, a transform module310can be used to transform document225to HTML content227that can be displayed as web page320, and any resources are extracted by a resource extraction module330to a resource library229, as described further below. In example embodiments, the transformation module310is configured so that the resulting web page320has formatting similar to that of other web pages on the specific web site.

Referring now toFIG. 5, an example method400is illustrated for creating a document and transforming the document to a web page. Generally, method400includes creation of a content type and document template at operation500. The content type defines the document properties available to a particular document, such as metadata, workflow required to approve documents of this type, retention policies for this type of document, etc. One property of the content type is the document template that is used to create items of the given content type. The document template is the starting instance of a document in a given format that is created when a user selects the document template associated with a given content type.

A document is created using, for example, the template at operation600. For example, the document can be created using an application such as Microsoft® Word, Excel, or PowerPoint®. When a new document is created for a specified content type, the template associated with the content type is used to define the styles available for the document. In some embodiments, the template includes default styles and other components associated with the documents (e.g., required images like a banner).

In example embodiments, at least some of these default components cannot be modified by the user. For example, in some embodiments, the template selected to create the document can restrict the document author to certain formatting styles (e.g., Heading1, Heading2, Body Text, and Bullet List) to assist in transformation, as described further below. The template can also define certain in-line named fields having names like Title and Abstract. As described in detail below, these styles and/or in-line fields can be used during transformation to convert the document to a web page.

In other embodiments, the document can be created without the use of a template.

Next, the document is saved in a document repository at operation700. Finally, the document is transformed at operation800to create HTML for a web page.

Each of the steps of method400is described in greater detail below.

I. Content Type and Template Definitions

Referring now toFIG. 6, an example user interface502is shown for setting up transformation for a content type. User interface502includes an enable page creation section510including a check box512. If the check box512is selected, the remaining options presented by user interface502are enabled and transformation can be implemented as described below. If the check box512is not selected, the remaining options presented by user interface502are disabled. In addition, transformation for the content type cannot be conducted when the check box512is not selected. In one example, the check box512is unselected by default.

A document type section514of user interface502allows the user to select which document types can be transformed. In the example shown, check box516is selected so that Microsoft® Word documents with the “.xml” extension can be transformed. In other embodiments, additional document types can be listed or removed. Other example document types include “.xls” document extensions associated with documents created using Microsoft® Excel, and “.ppt” document extensions associated with documents created by Microsoft® PowerPoint®.

A conversion section520of user interface502allows the user to configure how the document is transformed into HTML. In the example shown, the user can select between radio buttons522,524, and526. If radio button522is selected, the styles associated with the document are transformed to HTML without alterations. In other words, formatting in the document is carried over into the HTML so that the web page closely approximates the formatting in the document. If radio button524is selected, the styles in the document are mapped to particular styles for the HTML, as described further below. Finally, if radio button526is selected, a user can select a custom extensible stylesheet language (XSL) file that is used to transform an extensible markup language (XML) document to HTML. In alternative embodiments, an additional option can be provided to allow for the use of additional conversion modules that can be plugged into the transformation module.

If radio button524is selected, the user is allowed to define how styles and elements associated with a document template used to create a document are transformed into HTML. For example, in the illustrated embodiment, a dialog box521(as shown inFIG. 7) appears when the user selects the “map styles” button in conversion section520. Dialog box521includes a column527enumerating a list of document styles and other common elements523(e.g., tables, lists, hyperlinks, images, and body text) associated with the document template, and how each style or element is mapped to a cascading style sheet (CSS) class529when transformation occurs. Dialog box521also includes a column528enumerating a list of the available HTML styles that can be selected for a document style or element, as well as two options labeled “<keep existing style>” and “<clear style>”. If the user selects “<keep existing style>” in column528for a particular style or element in column527, the style or element in the document is maintained when transformation occurs. If the user selects “<clear style>” in column528for a particular style or element in column527, the style in the document is stripped out and replaced with no style when transformation occurs. In some embodiments, the list in column528is sorted alphabetically, and only those HTML styles that can be applied to the particular selected document style or element are listed in column528.

For example, if document style “Heading1” in list523of column527is selected as shown inFIG. 7, CSS class “.ms-header” is listed in list529to indicate that the style “Heading1” will be mapped to the CSS class “.ms-header” when transformation is performed. In addition, column528lists the HTML styles available for mapping of the document style or element selected in column527and the currently selected style is highlighted. The user can change how the document style “Heading1” is mapped by selecting a different HTML style from column528. For example, if CSS class “.ms-footer” is selected, any content in the document associated with the document style “Heading1” will be mapped to HTML style “.ms-footer” during transformation.

Referring back toFIG. 6, a resource extraction configuration section530of user interface502allows the user to select a radio button532that specifies that extracted resources such as images and binary files embedded in the document are to be saved into a subfolder associated with the web page during transformation. If the user instead selects radio button534, the user is allowed to specify a particular path location (typically on a server) to which the resources are to be extracted. As described further below, the extracted resources are automatically linked in the HTML that is created during transformation so that the resources are properly referenced in the resulting web page.

In addition, the user can select a check box536to have image resources converted to HTML-compatible format when extracted. For example, image resources in formats such as Bitmap (BMP) and Tagged Image File Format (TIFF) can be automatically converted upon extraction to an HTML-compatible format such as a Portable Network Graphics (PNG) or Joint Photographic Experts Group (JPEG) format. In example embodiments, the image dimensions as displayed in the document are preserved upon extraction. For example, if the original image dimensions are 1000×1000 pixels, but the image is scaled to a size of 200×300 pixel size in the document, the link to the image in the resulting HTML is configured to display the image in the 200×300 pixel size. In some embodiments, the resolution of the image is reduced so that the resulting image is smaller to allow for more efficient downloading when accessed on the web page.

A page layout section540of user interface502allows the user to define how the web pages for the content type are rendered after transformation. The page layouts listed in section540define how the contents of the page are laid out using a set of field controls. A drop down menu542allows the user to select among different page layout templates that define how the resulting web page is displayed.

A default creation location section550of user interface502allows the user to define a default location where page creation will occur upon transformation. The user can set a default path in box552if check box551is selected. In some embodiments, if the user selects a path that is not valid for hosting of a web page, a warning message is provided and the user can select a different path. In addition, if check box554is selected, the user will not be allowed to select a different location for a web page created during transformation, as described below.

II. Document Creation and Saving in Library

Referring now toFIG. 8, documents can be created using a variety of applications. If a new document is created having a content type that supports transformation, the document can be transformed. In the illustrated example, a document625is created using Microsoft® Word. The document includes content such as text630and embedded image635. The text630is formatted according to various styles640.

In some embodiments, only styles640that are mapped in accordance with the content type to an HTML style are provided so that each document style can be mapped during transformation. In other embodiments, additional documents styles that have not been mapped to HTML styles can be provided. Upon transformation, these document styles can be stripped or mapped to a default HTML style.

Referring now toFIG. 9, when the document is complete, the document625is saved in a document library710, such as a Microsoft® Windows® SharePoint™ Services document library.

Referring now toFIG. 10, once the document625is saved in library710, transformation can be started by selecting an example drop down menu720associated with document625. Menu720includes an entry730that allows the user to create a web page from the document625. If the user selects entry730, the transformation begins. In other embodiments, transformation can be started in other ways, such as automatically upon loading of the document into the library, as described further below.

Referring now toFIG. 11, an example method802for transformation is illustrated. At operation810, transformation is initiated. In some embodiments, transformation is supported only for certain document content types. Therefore, an error message is displayed and transformation does not occur if an attempt is made to transform an unsupported document content type.

In addition, when transformation is initiated, an example a user interface805, illustrated inFIG. 12, is shown to the user. User interface805includes a page location section807and a page title and description section809. Page location section807allows the user to choose to create the web page in the current publishing site or to select a publishing site. In some embodiments, if check box554in user interface502(seeFIG. 6) was selected when defining the content type, the user is not allowed to select a page location but is instead presented with the default location. The page title and description section809allows the user to provide a title and description for the page. Once the user completes sections807and809and selects “Save”, transformation can begin.

Referring back to method802shown inFIG. 11, control is next passed to operation820and any embedded resources (e.g., image635) in the document are extracted and saved at the location defined by the content type (see section530of user interface502). In one embodiment, the extracted resources are each given a name according to a naming convention to uniquely identify each resource. For example, each resource can be named according to the naming convention “<page URL name>_<ID>.<extension>”. If the location for saving the resources defined by the content type cannot be accessed or otherwise will not allow the resources to be saved, an error message can be displayed and the user can define a different location for saving the extracted resources by editing the content type using section530of user interface502(seeFIG. 6).

Next, in operation830, any image resources are processed as needed to create HTML-compatible images. Control is then passed to operation840, and document styles are mapped to HTML styles as defined by the content type (see section520of user interface502).

Next, in operation850, links are created in the HTML to resources that have been extracted. For example, if the resource is an image, a reference link is provided so that the image is displayed in on the web page as desired. If the resource is an embedded binary file such as a document, a link to the document is provided. In some embodiments, the relationship between the web page and the resources is tracked as described below so that, for example, the resources can be deleted upon deletion of the document and/or web page.

Finally, in operation860, the web page is rendered. An example web page870, shown inFIG. 13, is created from transformation of document625.

In some embodiments, the user can edit either the document or web page after transformation. If the user edits the document, the user can then proceed with transformation again to have the changes to the document be reflected in the web page. In some embodiments, if the user attempts to edit the web page itself, a warning is provided indicating that edits to the web page can be lost if the web page is edited and subsequently the source document is transformed again to create a new web page. In other embodiments, a back link between the page and source document is created so that, if the user attempts to edit the web page itself, the user is automatically referred back to the source document that is opened for editing in the application that was used to create the document. In other embodiments, the user is restricted from editing the web page and must instead edit the source document and then retransform the document. In yet other embodiments, when the user edits a web page created by transformation, the edits are automatically reflected in the source document.

In some embodiments, when the user edits a document that has already been transformed, once the user saves and closes the document, the document is automatically retransformed so that the changes are reflected in the web page. In other embodiments, if the user deletes the source document, the web page associated with the document is also automatically deleted. In other embodiments, if a web page is deleted, the extracted resources associated with the web page are deleted as well.

In some embodiments, transformation is configured to automatically run whenever a document is loaded into the document library or according to certain rules defined by the user. In other embodiments, the user is prompted regarding whether not to run transformation upon loading a document into the document library. In yet other embodiments, the user can perform transformation on a set of documents in a library at one time.

In other embodiments, transformation can be done without first uploading a document into a document library. For example, in one embodiment, transformation can be done on a client computer. In another embodiment, transformation can be started while the document resides on a client computer, and a first part of the transformation process involves automated uploading of the document to a desired document library.

In alternative embodiments, a preview transformation process is provided that allows the user to preview transformation. The example preview process does not result in creation of a web page that is accessible by others, but instead allows the user to preview how the transformed web page looks before actually proceeding with the entire transformation process.

In some embodiments, the transformation module is extendable such that additional document converters can be added to allow for the transformation of additional document types. In other embodiments, additional image converters can be added to the transformation module to allow the transformation module to convert additional types of images into web-compliant image types.