Query modes for translation-enabled XML documents
AssigneeOracle International Corporation
InventorsNipun Agarwal, Sanket Malde, Bhushan Khaladkar, Ravi Murthy, Sivasankaran Chandrasekar
Life of this patent
Estimating the term…
Abstract
Systems, methods, and other embodiments associated with providing query modes for translation-enabled XML documents are described. One method embodiment includes receiving an XPath query to an XML document that may store a translation for a data element. The method embodiment may also include automatically selecting a query mode for the XPath query. The method embodiment may also include querying the XML document using the XPath query and the selected query mode. The query mode may control, at least in part, the operation of an XML database logic.
Claims24
A method, comprising:
- receiving a query to an XML document, where the XML document stores a translation for a data element;
- determining if the query includes identifying elements that identify the query as being configured to act on a translation-enabled database and, if the query includes identifying elements, selecting an explicit query mode that controls an XPath logic to use a normalized translation function to process the query;
- determining whether a terminal node in an XPath associated with the query refers to a translatable element, and if the terminal node in the XPath associated with the query is determined to refer to a translatable element, selecting an implicit query mode for querying the XML document, wherein the query is rewritten for use by a translate function;
- and
- querying the XML document using the query and the selected query mode.
A non-transitory computer-readable medium storing computer-executable instructions that when executed by a computer cause the computer to perform a method, the method comprising:
- receiving an XPath query to an XML document that may store a translation for a data element, where the XML document conforms to a translation-enabling XML schema, where the XML document includes a first element that stores a first text string in a first language, and where the XML document includes one or more second elements that store one or more corresponding second text strings in one or more second languages, the second text strings being translations of the first text string, the first element including an identifier that identifies the first text string as storing a string for which a translation may be available, a second element including an identifier that identifies the second element as storing a corresponding translation string;
- automatically selecting a query mode for querying the XML document based, at least in part, on one or more of, whether a terminal node in an XPath associated with the XPath query refers to a translatable element, and whether the XPath query includes one or more explicit query mode elements, the query mode being one of, an explicit query mode, and an implicit query mode;
- and
- querying the XML document using the XPath query and the selected query mode, where the query mode controls, at least in part, the operation of one or more XML-enabled database logics including an XPath logic, and an XQuery logic,
- where querying the XML document using the explicit query mode includes controlling the XPath logic to use a translate function that accepts a parent node list and a name of a translated child as inputs and that provides as output a node list having one node per parent in the parent node list, where the one node per parent corresponds to the translated child, and where the one node per parent has a language setting that matches one of, a session language, and a language of a node that matches a source language, and where querying the XML document using the implicit query mode includes, upon determining that the terminal node in the XPath associated with the XPath query refers to a translatable element, selectively rewriting the XPath query to use the translate function.
A system, comprising:
- a logic, embodied as a non-transitory computer-readable medium storing computer-executable instructions, that controls selecting one query mode of two or more query modes for a dynamically customizable application that queries a translation-enabled XML document, the two or more query modes including an explicit query mode and an implicit query mode, the selecting being based, at least in part, on query elements described in a translation-enabling XML schema;
- wherein the logic is configured to determine if the query elements are described in the translation-enabling XML schema and if the query elements are described in the translation-enabling schema, selecting an explicit query mode that controls an XPath logic to use a normalized translation function to process the query;
- further wherein the logic is configured to determine if a terminal node in an XPath associated with the query refers to a translatable element, and if the terminal node in the XPath associated with the query is determined to refer to a translatable element, selecting an implicit query mode for querying the XML document, wherein the query is rewritten for use by a translate function;
- and
- a data store to store the translation-enabled XML document.
A non-transitory computer-readable medium storing computer-executable instructions that when executed by a computer cause the computer to perform a method, the method comprising:
- receiving a query to an XML document,
- determining if the query includes identifying elements that identify the query as being configured to act on a translation-enabled database and, if the query includes identifying elements, selecting an explicit query mode that controls an XPath logic to use a normalized translation function to process the query;
- determining whether a terminal node in an XPath associated with the query refers to a translatable element, and if the terminal node in the XPath associated with the query is determined to refer to a translatable element, selecting an implicit query mode for querying the XML document, wherein the query is rewritten for use by a translate function;
- and
- querying the XML document using the query and the selected query mode.
Dependencies are inferred from the claim text.