A document may include a significant amount of information and may be used for multiple purposes. A first set of elements in the document may be determined to be important with respect to a first purpose and a second set of elements in the document may be determined to be important with respect to a second purpose. For example, a customer representative may pull up a document that includes information about a customer when the customer calls with a problem. The customer may need to authenticate the customer by verifying information such as account number and password. As the document may include a significant amount of information about the customer, the customer representative may find it difficult to quickly locate the required information in the document. After authentication, the customer representative may need to locate other information on the same document for another purpose. While different versions of the document may be maintained, each version including information required for a particular purpose, such a solution may be inefficient.
The following detailed description refers to the accompanying drawings. The same reference numbers in different drawings identify the same or similar elements.
An implementation described herein may relate to context-dependent styling of elements in a document. An element in a document may include a styling expression that includes a style definition expression and a style activation expression. The style definition expression may define a particular style for the element and the style activation expression may define a particular condition that, if satisfied, causes the particular style to be applied to the element. The document may include a reference to a set of instructions (e.g., a script file) that applies the particular style to the element by processing the style definition expression. Moreover, the document may include a reference to a set of instructions (e.g., a script file) that determines values for one or more variables associated with the particular condition. For example, the particular condition may be met if one of the variables corresponds to a particular value.
A document, as the term is used herein, is to be broadly interpreted to include any machine-readable and machine-storable work product. A document may include, for example, an e-mail, a web page or a web site, a file, a combination of files, one or more files with embedded links to other files, a news group posting, a news article, a blog, a business listing, an electronic version of printed text, a web advertisement, etc. In the context of the web (i.e., the Internet), a common document may be a web page. Documents often include textual information and may include embedded information (such as meta information, images, hyperlinks, etc.) and/or embedded instructions (such as Javascript, etc.).
A document element may include any part of a document included within a tag, such a Hypertext Markup Language (HTML) tag or an Extensible Markup Language (XML) tag. A tag may enclose, for example, text, such as a label, heading, paragraph, anchor text of a hyperlink, and/or another type of text; an input element such as a text box, a button, a radio button, a menu, a slider, a scroll bar, and/or another type of input element; an image, video, graphic, icon, and/or another type of graphical element; a tag defining a document property, such as background color, default text style, and/or another type of document property; and/or any other document element that may be enclosed by a tag.
A style specification may express how a particular element, or a particular attribute, of a document is presented to a user. For example, a style specification may define a font, text size, color, layout, text effect, highlighting, lowlighting, whether an element should be displayed, and/or another attribute by relating the attribute to a particular value. In one embodiment, the style may be specified in a style sheet language, such as, for example, the Cascading Style Sheets language. In another embodiment, the style may be specified using another technique.
Client device 110 may include any device capable of accessing a document across a network using, for example, a browser application (e.g., Internet Explorer, Mozilla Firefox, Google Chrome, Apple Safari, Opera, etc.). Client device 110 may access a document hosted by document hosting system 130. Client device 110 may include a desktop computer; a laptop computer; a tablet computer; a mobile communication device, such as a mobile phone, a smart phone, a tablet computer, a laptop, a personal digital assistant (PDA), or another type of portable communication device; and/or another type of computation and/or communication device.
Network 120 may enable client device 110, document hosting system 130, and document styling system 140 to communicate with each other. Network 120 may include one or more wired and/or wireless networks. For example, network 120 may include a cellular network, the Public Land Mobile Network (PLMN), a second generation (2G) network, a third generation (3G) network, a fourth generation (4G) network (e.g., a long term evolution (LTE) network), a fifth generation (5G) network, a code division multiple access (CDMA) network, a global system for mobile communications (GSM) network, a general packet radio services (GPRS) network, a combination of the above networks, and/or another type of wireless network. Additionally, or alternatively, network 120 may include a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), an ad hoc network, an intranet, the Internet, a fiber optic-based network (e.g., a fiber optic service network), a satellite network, a television network, and/or a combination of these or other types of networks.
Document hosting system 130 may include one or more computing devices, such as server devices, that host documents. For example, document hosting system 130 may include a server device that stores a document that includes one or more interactive elements. The document may be accessed by a user of client device 110 using a browser application, provided to client device 110, and displayed by client device 110 to the user. The user may provide input in connection with an interactive element in the document (e.g., by entering text into a text box) and client device 110 may send information associated with the input to document hosting system 130. Document hosting system 130 may store the received information and associate the received information with the interactive element and with client device 110.
Document styling system 140 may include one or more computing devices, such as server devices, that create and/or modify a document, hosted by document hosting system 130, to include one or more elements with context-dependent styling. For example, document hosting system 130 may provide an interface that allows a user to select a document, determine context specifications for the document, identify elements in the document that are associated with the determined context specifications, and select styling specifications for the identified elements. Document styling system 140 may modify the selected document to include context-dependent styling for the identified elements in the document, based on the determined context specifications and based on the selected styling specifications.
Although
Bus 210 may include a path that permits communication among the components of device 200. Processor 220 may include any type of single-core processor, multi-core processor, microprocessor, latch-based processor, and/or processing logic (or families of processors, microprocessors, and/or processing logics) that interprets and executes instructions. In other embodiments, processor 220 may include an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), and/or another type of integrated circuit or processing logic.
Memory 230 may include any type of dynamic storage device that may store information and/or instructions, for execution by processor 220, and/or any type of non-volatile storage device that may store information for use by processor 220. For example, memory 230 may include a random access memory (RAM) or another type of dynamic storage device, a read-only memory (ROM) device or another type of static storage device, a content addressable memory (CAM), a magnetic and/or optical recording memory device and its corresponding drive (e.g., a hard disk drive, optical drive, etc.), and/or a removable form of memory, such as a flash memory.
Input device 240 may allow an operator to input information into device 200. Input device 240 may include, for example, a keyboard, a mouse, a pen, a microphone, a remote control, an audio capture device, an image and/or video capture device, a touch-screen display, and/or another type of input device. In some embodiments, device 200 may be managed remotely and may not include input device 240. In other words, device 200 may be “headless” and may not include a keyboard, for example.
Output device 250 may output information to an operator of device 200. Output device 250 may include a display, a printer, a speaker, and/or another type of output device. For example, device 200 may include a display, which may include a liquid-crystal display (LCD) for displaying content to the customer. In some embodiments, device 200 may be managed remotely and may not include output device 250. In other words, device 200 may be “headless” and may not include a display, for example.
Communication interface 260 may include a transceiver that enables device 200 to communicate with other devices and/or systems via wireless communications (e.g., radio frequency, infrared, and/or visual optics, etc.), wired communications (e.g., conductive wire, twisted pair cable, coaxial cable, transmission line, fiber optic cable, and/or waveguide, etc.), or a combination of wireless and wired communications. Communication interface 260 may include a transmitter that converts baseband signals to radio frequency (RF) signals and/or a receiver that converts RF signals to baseband signals. Communication interface 260 may be coupled to an antenna for transmitting and receiving RF signals.
Communication interface 260 may include a logical component that includes input and/or output ports, input and/or output systems, and/or other input and output components that facilitate the transmission of data to other devices. For example, communication interface 260 may include a network interface card (e.g., Ethernet card) for wired communications and/or a wireless network interface (e.g., a WiFi) card for wireless communications. Communication interface 260 may also include a universal serial bus (USB) port for communications over a cable, a Bluetooth™ wireless interface, a radio-frequency identification (RFID) interface, a near-field communications (NFC) wireless interface, and/or any other type of interface that converts data from one form to another form.
As will be described in detail below, device 200 may perform certain operations relating to context-dependent styling of elements in a document. Device 200 may perform these operations in response to processor 220 executing software instructions contained in a computer-readable medium, such as memory 230. A computer-readable medium may be defined as a non-transitory memory device. A memory device may be implemented within a single physical memory device or spread across multiple physical memory devices. The software instructions may be read into memory 230 from another computer-readable medium or from another device. The software instructions contained in memory 230 may cause processor 220 to perform processes described herein. Alternatively, hardwired circuitry may be used in place of, or in combination with, software instructions to implement processes described herein. Thus, implementations described herein are not limited to any specific combination of hardware circuitry and software.
Although
Element selection unit 312 may enable the user to select an element or to select, a particular category of document elements, and/or a document attribute (e.g., background color) of a document.
Context specification unit 314 may enable the user to select a context specification for a selected element. For example, the user may select a variable and a particular value or range of values for the variable. Context specification unit 314 may add a set of instructions, such as a script file, to determine a value for the variable. The value for the variable may be stored remotely to the document and the script file may retrieve the value for the variable from a remote location. For example, the variable may correspond to a type of user accessing the document. The type of user may be determined by another document and stored with connection with the other document. Context specification unit 314 may generate a script file that retrieves the value of the variable, associated with the type of user, from the other document.
Style implementation unit 316 may enable a user to specify a particular style for the particular element and covert the particular style, specified by the user, into a particular format (e.g., into a style language expression). For example, the user may be provided with an interface that allows the user to select a style from a set of menus or radio buttons that enable the user to select a color, font, text style, etc. and the user's selections may be converted into a style language expression.
Although
Styling expression processing script 410 may include a script, or reference an external script, that processes a context-dependent styling specification, associated with document element 430, and determines whether a particular condition, associated with the context-dependent styling specification, is satisfied. If the particular condition is satisfied, styling expression processing script 410 may process a style definition expression included in the context-dependent styling specification and may apply a particular style to the element based on the style definition expression. In one implementation, styling expression processing script 410 may include a Javascript. Additionally or alternatively, styling expression processing script 410 may reference a jQuery library. In another implementation, styling expression processing script 410 may include a different type of script.
Context determining script 420 may include a script, or reference an external script, that determines a particular context for document file 401. For example, context determining script 420 may determine a value for a particular variable. In one implementation, context determining script 420 may include instructions to retrieve the value from a particular data structure. In another implementation, context determining script 420 may include instructions to prompt the user accessing the document to enter the value. In yet another implementation, context determining script 420 may determine the value using another technique. In one implementation, context determining script 420 may include a Javascript. In another implementation, context determining script 420 may include a different type of script.
Each document element 430 may include an element of document file 401 enclosed by a set of tags (e.g., HTML tags, XML tags, etc.). Document element 430 may include element content 432 and a context-dependent styling specification 434. Element content 432 may include the content of the document element (e.g., text, link, image, video, a storage location for content that is to be retrieved, etc.). Context-dependent styling specification 434 may specify a particular style that is to be applied to the document when a particular condition is met. Context-dependent styling specification 434 may include a style activation expression 436 and a style definition expression 438.
Style activation expression 436 may specify a particular condition that must be satisfied in order for the style defined by style definition expression 438 to be applied to document element 430. Style definition expression 438 may define a particular style that is to be applied to document element 430. For example, if document file 401 corresponds to a document used by a customer representative to process a customer call, style activation expression 436 may indicate that the style is to be applied if a call type variable corresponds to a billing topic and style definition expression 438 may specify a yellow background for document element 430. Thus, in this example, if the call type corresponds to a billing topic, document element 430 may be highlighted.
Although
The process of
Context specifications may be determined (block 520). For example, context specification unit 314 of document styling generator 310 may prompt the user to enter context specifications for the selected document. In one implementation, the user may enter text and document styling generator 310 may search document hosting system 130 for documents and/or data structures that include a variable (e.g., an element associated with an input type) that matches the entered text. For example, the user may type in “user type” and document styling generator 310 may identify a data structure that stores a user type. In another implementation, the user may enter an address of a storage location (e.g., a Uniform Resource Identifier) of a variable. In yet another implementation, a user may be provided with a list of variables and may select a particular variable from the list. In yet another implementation, the user may indicate that the context specifications may be determined dynamically when a document is accessed. For example, the user may indicate that the context specifications may depend on user input in connection with a particular element 430 of document file 401.
After selecting a variable, the user may be prompted to select a value or a set of values for the variable. For example, if the variable corresponds to a user type, the user may select “customer representative” as the value for the variable. Document styling generator 310 may generate style activation expression 436 based on the received user input. For example, if the user selected user type as the variable and “customer representative” as the value for the variable, the generated style activation expression 436 may correspond to ‘style_on=‘user_type=customer_representative.’”
An element in the document associated with the determined context specifications may be identified (block 530). For example, element selection unit 312 of document styling generator 310 may display elements of the document and may prompt the user to select an element of the document. As another example, the user may enter an identifier associated with an element of the document.
Styling for the element may be selected (block 540). For example, style implementation unit 316 of document styling generator 310 may prompt the user to enter a particular style for the selected element. In one example, the user may enter text specifying the particular style. In another example, the user may be provided with a set of style options and may select one or more of the options. For example, the user may select that the styling for the element should include yellow highlighting. Document styling generator 310 may convert the user selection of the particular style into an expression in a style language (e.g., CSS) and may generate a style definition expression 438 that includes the expression in the style language. For example, if the user selected yellow highlighting, the generated style definition expression 438 may correspond to ‘style_def=‘color: #FFFF00; background-color: #FF0000.’”
An indication may be added to the element in the document that the selected styling is to be applied if context matches the determined context specifications (block 550). For example, document styling generator 310 may add style activation expression 436 and style definition expression 438 to document element 430.
A determination may be made about whether there are additional elements to be processed (block 560). For example, element selection unit 312 of document styling generator 310 may prompt to user to select another element or to indicate that element selection has been completed. If it is determined that there are additional elements to be processed (block 560—YES), processing may return to block 530 to identify another element associated with the determined context specifications.
If it is determined that there are no additional elements to be processed (block 560—NO), a determination may be made as to whether there are additional context specifications to be processed (block 570). For example, context specification unit 314 of document styling generator 310 may prompt the user to indicate whether additional context specifications are to be processed for the document. If it is determined that there are additional context specifications (block 570—YES), processing may return to block 520 to determine another set of context specifications. If it is determined that there are no additional context specifications (block 570—NO), the document that includes context-dependent styling may be stored (block 580). For example, document styling generator 310 may store the modified document in document hosting system 130.
The process of
Context-sensitive elements in the document that match the context information may be identified (block 630). For example, when the browser application retrieves document file 401, the browser application may run styling expression processing script 410. Styling expression processing script 410 may cause the browser application to identify document elements 430 that include style activation expressions 436.
Context-sensitive styling for the identified elements may be determined (block 640). For example, styling expression processing script 410 may cause the browser application to determine whether each of the identified document elements 430 includes a style activation expression 436 that matches the determined context information. If the style activation expression 436 matches the determined context information, styling expression processing script 410 may cause the browser application to determine context-sensitive styling for each of the identified document elements by analyzing style definition expressions 438 associated with each of the identified document elements 430.
Context-sensitive styling may be applied to the identified elements (block 650). For example, styling expression processing script 410 may cause the browser application to apply the context-sensitive styling, specified by style definition expression 438, to document element 430. An exemplary process for applying context-sensitive styling to document element 430 is described below with reference to
The process of
A style definition expression associated with the identified styling specification may be identified (block 720). For example, styling expression processing script 410 may cause the browser application to identify style definition expression 438 by identifying a style definition term included in styling expression processing script 410. For example, the style definition term may correspond to the term “highlightstyle” and the browser application may identify the style definition expression 438 by locating the term “highlightstyle” in document element 430.
Arguments of a style definition expression may be parsed out in a styling expression (block 730). For example, styling expression processing script 410 may parse out arguments of style definition expression 438 based on one or more delimiting characters identified in styling expression processing script 410. For example, if style definition expression 438 corresponds to ‘highlightstyle=“color: #FFFF00; background-color: #FF0000,” styling expression processing script 410 may parse out a first argument “color” with a value of “FFF00” and a second argument “background-color” with a value of “FF0000.”
A call to a library of style manipulation functions may be executed to apply the parsed out arguments to the element (block 740). For example, styling expression processing script 410 may call a style manipulation function to apply each of the arguments to the element. In one implementation, the library of style manipulation functions may include a jQuery library. For example, if the parsed out arguments for an element with an identifier of “first_element” include a first argument “color” with a value of “FFF00” and a second argument “background-color” with a value of “FF0000,” and if the style manipulation function corresponds to a jQuery library function, styling expression processing script 410 may execute a first function call corresponding to “$(first_element).css(‘color’, ‘FFFF00’)” and a second function call corresponding to “$(first_element).css(‘background-color’, ‘FFF00))’).”
The call may be forwarded to a customer representative and the customer representative may open the document to process the call (block 814). The document may be provided to the customer representative with element styling generated based on the determined topic (block 816).
A document element with an identifier of “account_pin” may include highlight activation expression 828 and highlight definition expression 830. Highlight activation expression 828 may indicate that if the call topic corresponds to a “billing” topic or to a “customer complaint” topic, or if a call type variable corresponds to an “at_risk” type, then highlighting should be turned on for the “account_pin” element. Highlight definition expression 830 may indicate that the highlight style that is to be applied includes yellow text (#FFFF00) with a red background (#FF0000).
A document element with an identifier of “account_no” may include hidestyle expression 956, a hideon expression 958, and a hideoff expression 959. Hidestyle expression 956 may indicate that if hiding is activated for the element, the element will not be displayed. Hideon expression 958 may indicate that hiding will be activated if the authorization type corresponds to a business representative and hideoff expression 959 may indicate that hiding will not be activated if the authorization type corresponds to a customer representative. That is, a customer representative may be authorized to view an account number of a customer while a business representative may only be authorized to view statistics associated with a customer without being authorized to view any information identifying the customer.
Hidefield script 952 may process the document to identify elements that include a “hideon” or a “hideoff” term, may determine whether a condition associated with the “hideon” or “hideoff” term is satisfied, and may apply the style indicated by a “hidestyle” expression, if the condition associated with the “hideon” or “hideoff” term is satisfied.
A skin type may be identified based on the determined device type (block 1030) and the document may be provided to the device with element styling generated based on the determined skin type (block 1040). For example, a “skin” variable may be assigned a value based on the determined device type and a style for an element may be selected based on the value assigned to the “skin” variable.
In the preceding specification, various preferred embodiments have been described with reference to the accompanying drawings. It will, however, be evident that various modifications and changes may be made thereto, and additional embodiments may be implemented, without departing from the broader scope of the invention as set forth in the claims that follow. The specification and drawings are accordingly to be regarded in an illustrative rather than restrictive sense.
For example, while series of blocks have been described with respect to
As another example, while in the examples of
As yet another example, instead of highlighting a first set of elements, all elements in the document not included in the first set may be lowlighted (e.g., dimmed). Elements may be lowlighted by setting an opacity style attribute to a particular value if the context specifications are not met.
It will be apparent that systems and/or methods, as described above, may be implemented in many different forms of software, firmware, and hardware in the implementations illustrated in the figures. The actual software code or specialized control hardware used to implement these systems and methods is not limiting of the embodiments. Thus, the operation and behavior of the systems and methods were described without reference to the specific software code—it being understood that software and control hardware can be designed to implement the systems and methods based on the description herein.
Further, certain portions, described above, may be implemented as a component that performs one or more functions. A component, as used herein, may include hardware, such as a processor, an ASIC, or a FPGA, or a combination of hardware and software (e.g., a processor executing software).
It should be emphasized that the terms “comprises”/“comprising” when used in this specification are taken to specify the presence of stated features, integers, steps or components but does not preclude the presence or addition of one or more other features, integers, steps, components or groups thereof.
No element, act, or instruction used in the present application should be construed as critical or essential to the embodiments unless explicitly described as such. Also, as used herein, the article “a” is intended to include one or more items. Further, the phrase “based on” is intended to mean “based, at least in part, on” unless explicitly stated otherwise.