This invention relates in general to the field of information technology. More particularly, this invention relates to a computing environment context to facilitate the display of content by allowing runtime invocation of code included in content.
In many contexts in computer systems, information is stored and later presented to a user. In one such context, help systems for software applications, help information is stored and presented to a user. In such a help system, for example, a user may inquirer as to how to change a specific setting for a printer attached to an application. In response, the application's associated help system may provide the user with help information regarding changing the setting.
However, in prior art help contexts and in other information presentation contexts, the information stored and presented to the user is generally static information. Each time a specific help topic is displayed to the user, it contains the same actual content presented in the same way. This is a drawback for several reasons.
First, to use this help content, the user may need to have knowledge about and understand details about the setup and current functioning of the user's computer system. For example, the help content may ask how the printer is attached (e.g. local or networked), what version of some software application is running on the user's computer, or other details dependent on the setup and functioning of the user's computer, and may guide the user based on the answers to these questions. Providing help information in the alternative based on some detail of the user's computer system may be done by including all the information in the help content (e.g. “if the printer is a networked printer” will be followed by directions on changing the setting for a networked printer, but the same help screen may include “if the printer is a local printer” and directions on changing the setting for a local printer.) Providing help information in the alternative may also be accomplished by requesting that the user make a selection (e.g. “is the printer a networked or local printer?”) and then presenting the applicable help information to the user.
As another example, if a user is a novice user, a help topic may need to include very detailed help information on performing a certain change. However, if the user is an expert user, the same help topic may need to include only one sentence. As detailed above, in the prior art the flexibility which is required to present different information to the different types of users in this situation is limited and cumbersome to the user.
In either instance, the user in such a situation is required to have some sophistication in knowing the setup of their computer system and the current state of the computer system. This requirement produces some confusion and dissatisfaction with less sophisticated users and requires additional time for even sophisticated users who are consulting the help system.
In addition, there may be a need for content to be authored at one time, and for content to be adapted at a later time. For example, a mistake may be corrected, new information added, or new UI functionality incorporated. In order to make even minor adaptations, entire files or groups of files of content must be replaced. This replacement is resource intensive. For example, if help code relates to the name of a product, or to a help website or phone number, and that name, website, or phone number are changed, the replacement of the information with current information must occur at each point in which the outdated information appears.
In the prior art described above, content is limited to the static content which appears in the content files. There is no mechanism by which some content not appearing in the content files can be presented to the user.
While some earlier help systems did allow script to be included in the help content, code and content were not separated, which was led to inflexibility and insecurity in the provision of help content.
Thus, there is a need for a system and method to overcome these deficits in the prior art. The present invention addresses the aforementioned needs and solves them with additional advantages as expressed herein.
Dynamic flexible content is enabled by allowing content to be tailored at runtime instead of when it is authored. In order to allow content to be adapted the content contains at least one link to code (the code is also known as a “behavior”) which can be executed to modify or add content. This in-placed substitution is done at a transformation time, when the content is transformed from a format in which authoring is accomplished (for example, extensible markup language (XML)) to a presentation format, such as HTML (hypertext markup language) format or RTF (rich text format).
A generalized linking mechanism is used to link to and invoke behaviors in the content during the transformation of the content from the authoring format to the presentation format.
Other features of the invention are described below.
The foregoing summary, as well as the following detailed description of preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there is shown in the drawings exemplary constructions of the invention; however, the invention is not limited to the specific methods and instrumentalities disclosed. In the drawings:
Overview
A method of providing dynamic content to a user allows for dynamic flexible content that can be tailored at runtime instead of at authoring time. In one embodiment, an extensible markup language (XML) is used to author content. The content includes links. At runtime, when the content is to be displayed, the links are evaluated. If a link is found which links to a behavior tag is found, the tag is parsed and causes code to be executed.
A help system will be used in this specification to describe the invention, however, the invention is not limited to use in help systems, but rather can be more widely used, for example, in other systems where content is authored so that the presentation is dynamic and finalized at runtime instead of authoring time.
Exemplary Computing Environment
The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, embedded systems, distributed computing environments that include any of the above systems or devices, and the like.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network or other data transmission medium. In a distributed computing environment, program modules and other data may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media and communication media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CDROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 110. Communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media includes wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared and other wireless media. Combinations of any of the above should also be included within the scope of computer readable media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, 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 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
Content Transformation Engine
In one embodiment, content is translated from a semantic description of the content to a presentational version. This translation occurs in a content transformation engine.
An additional input to the structural transformation 300 is structural behavior 315. The structural behavior 315 provides state information and behavior information for the structural transform 300. This state information is information about the computing environment where the content transformation engine 220 resides. This state information is used for evaluating any conditional statements that are to be evaluated during the structural transformation stage. The behavior information is invoked, as described below, when behavior links are present in the content and evaluated at the structural transformation stage.
The state information may be provided by one or more monitors which monitor a system to provide context information. Each monitor tracks information about a particular state including whether it is currently true or false. Examples of states which may be useful in determining the context of a search include hardware, software, and user preferences and controls. Hardware states may include the type, model, make, and status of hardware attached to the user computing device. Internet connection state, the local network and the presence of a shared printer, multiple displays, and the type of network are also examples of states in a computing environment. Examples of software states may be the version of operating system used or the application being run and the mode of the application such as editing a document or creating an equation for calculation in a spreadsheet. Examples of user related states include user preferences and conditions such as whether the user is a system administrator, whether the user has selected specific styles or modes in the generation or viewing of documents. Additional states representative of the computing environment may be monitored as new content is downloaded or new applications are installed. The gathering of such state information is detailed in co-pending, co-assigned U.S. patent application Ser. No. 10/754,984 (attorney docket no.304117.01/MSFT-2861). The use of such state information is detailed in co-pending, co-assigned U.S. patent application Ser. No. YY/YYY,YYY (attorney docket no. MSFT-2901/305488.01), filed on the same date as the present application.
Another input to the structural transformation 300 is structural transform data 305. The structural transform data 305 includes data describing how the structural transformation should be accomplished. For example, where the pre-transformation content files 210 are in XML (extensible markup language), the format for the structural transform data 305 may be XSLT (extensible stylesheet language transform) which defines how a transformation should be applied to the XML-formatted pre-transformation content files 210.
A presentational transform 330 is then applied to the resulting structurally-transformed content file 320. Again, inputs to this include transform data (presentational transform data 340) and behavior information (presentational behavior 360). The final result of this presentation transform 330 is presentation content data 350. This presentation content data 350 is presentation data in a format which can be used on the user's computer system. For example, where the user's computer system has the ability to display data in HTML (hypertext markup language) format, the presentation content data may be in HTML format.
In-Place Content Substitution
The pre-transformation content files 210 may contain links to behavior tags. In one embodiment, pre-transformation content files are in an extensible markup language (XML) format which allows for the insertion of links. A specific link is defined, a behavior link. Such link is denoted by a behavior link tag. The target of these links can point to behaviors, code which can be executed and return supplemental content for insertion, or can modify existing content. At runtime, e.g. when the content transformation engine 220 transforms the content files 210 into presentation content data 240, each behavior link tag is followed to find the corresponding behavior. That behavior is parsed and, in certain situations, causes code to be executed. A link may also point to static content (not a behavior link) and in such a case, the static content is inserted into final content.
As seen in
If the link is a behavior link tag, the contents of the linked-to behavior are parsed, and the behavior is loaded, step 440. The behavior consists of executable code. For example, the behavior may be a .NET assembly. This executable code can return back content or modify the existing content. The executable code can do this by performing actions other than adding or selecting from the static content contained in the content or in the behavior. For example, the code can query the name the user has given to a peripheral device, or what the user's desktop currently looks like. This may be the content returned back from the behavior. Thus, a help topic can provide an accurate description of the peripheral to be used within a help topic, or can provide a graphic showing what the user's current desktop looks like, pointing at a relevant part of the user's desktop in order to provide guidance to the user.
After the behavior is loaded, a security check is then performed, to determine whether the behavior should be run, step 450. If it should be run, the behavior is run, step 460. If not, then the behavior is not run. The security check may determine that the behavior is a trusted behavior, and will not cause problems during execution or produce bogus data.
A link tag, in addition to specifying a link to a behavior, may also provide default content. Where the behavior is not run, this default content (if any was specified) is used, step 470. When the behavior is run, content results. This resulting content (returned content or default content with modifications made by the behavior) is examined. If the resulting content is useable, decision 480, the resulting content is used, step 490. If not, the default text is used, step 470.
With respect to decision 480, several reasons may make the resulting content of a behavior unusable. Resulting content may not be usable because, for example, it does not parse correctly, or if the code constituting the behavior does not execute correctly or exits with an error condition. Content resulting by a link which is not a behavior, from step 430, is also checked in step 480 to determine whether that content should be used, or whether default content (if any was specified) should be used instead.
The returned content or default content may include further behavior links. Additionally, more than one link may be present in the content. Thus, the process shown in
Authoring Content
In order to author content, initially, content is authored and at least one behavior is placed into the content along with some default content for that behavior.
In order to update content that has already been authored and in which a behavior is already included, an author includes a link to behavior code which modifies or supplants default content in the original content. This behavior code is invoked during a transformation, when the link is encountered. Thus, when the user transforms the content into presentation data, the behavior code will be run, and the new effect of the behavior will be seen.
It is noted that the foregoing examples have been provided merely for the purpose of explanation and are in no way to be construed as limiting of the present invention. While the invention has been described with reference to various embodiments, it is understood that the words which have been used herein are words of description and illustration, rather than words of limitations. Further, although the invention has been described herein with reference to particular means, materials and embodiments, the invention is not intended to be limited to the particulars disclosed herein; rather, the invention extends to all functionally equivalent structures, methods and uses, such as are within the scope of the appended claims. Those skilled in the art, having the benefit of the teachings of this specification, may effect numerous modifications thereto and changes may be made without departing from the scope and spirit of the invention in its aspects.
The subject matter described herein is related to the subject matter disclosed in co-pending application Ser. No. 10/754,984 (attorney docket no. 304117.01/MSFT-2861) filed on Jan. 9, 2004 entitled “System and Method for Context Sensitive Searching;” to co-pending U.S. patent application Ser. No. YY/YYY,YYY (attorney docket no. MSFT-2907/305488.01), entitled “Activating Content Based on State” filed on the same date as the present application; and to co-pending U.S. patent application Ser No. ZZ/ZZZ,ZZZ (attorney docket no. MSFT-2905/306009.01), entitled “Presentation-Independent Semantic Authoring of Content” filed on the same date as the present application.