Scripting language blocks to support multiple scripting languages in a single web page
First Claim
1. A data structure in a computer readable medium for use in a data processing system, the data structure comprising:
- source code authored according to a markup language;
a first code block written in a first scripting language;
a second code block written in a second scripting language;
data identifying a start and an end of each of the first and second code blocks;
for each node in the data structure identifying a given code block;
a new node created to represent a Java method definition as a child node of a root element;
a node representing a Java method call to the Java method definition replacing the node that identifies the given code block with a node representing a Java method call to the Java method definition; and
the given code block'"'"'s child nodes moved under the new node representing the Java method definition.
3 Assignments
0 Petitions
Accused Products
Abstract
Different scripting languages may reside side-by-side or nested within each other on the same web page. Thus, a new author may add code to the page, and he or she is not tied to any given subset of languages supported by the web server. Multiple scripting languages are supported by identifying a start and an end of each scripting language code block authored into the web page markup language. When the web page is later compiled into an XML Document Object Model (DOM) tree, the routine examines the DOM to identify any nodes that identify a given code block. Upon encountering a node that identifies a given code block, the DOM is adjusted to account for the script code within the given code block.
-
Citations
24 Claims
-
1. A data structure in a computer readable medium for use in a data processing system, the data structure comprising:
-
source code authored according to a markup language;
a first code block written in a first scripting language;
a second code block written in a second scripting language;
data identifying a start and an end of each of the first and second code blocks;
for each node in the data structure identifying a given code block;
a new node created to represent a Java method definition as a child node of a root element;
a node representing a Java method call to the Java method definition replacing the node that identifies the given code block with a node representing a Java method call to the Java method definition; and
the given code block'"'"'s child nodes moved under the new node representing the Java method definition. - View Dependent Claims (2, 3, 4)
-
-
5. A method for compiling a web page into an XML Document Object Model (DOM), the web page having at least first and second code blocks having script code written in different scripting languages, comprising the steps of:
-
examining the DOM to identify any nodes that identify a given code block;
for each node identifying a given code block;
creating a new node representing a Java method definition as a child node of a root element;
replacing the node that identifies the given code block with a node representing a Java method call to the Java method definition; and
moving the given code block'"'"'s child nodes under the new node representing the Java method definition. - View Dependent Claims (6, 7, 8, 9, 10, 11)
-
-
12. A computer program product in a computer-readable medium for compiling a web page into an XML Document Object Model (DOM), the web page having at least first and second code blocks having script code written in different scripting languages, comprising:
-
means for examining the DOM to identify any nodes that identify a given code block; and
means for adjusting the DOM for each node identifying a given code block, the adjusting means comprising;
means for creating a new node representing a Java method definition as a child node of a root element;
means for replacing the node that identifies the given code block with a node representing a Java method call to the Java method definition; and
means for moving the given code block'"'"'s child nodes under the new node representing the Java method definition. - View Dependent Claims (13, 14, 15, 16, 17, 18)
means for generating Java servlet code under the Java method definition to pass script code contained in the given code block to an appropriate interpreter.
-
-
16. The computer program product as described in claim 13 wherein an innermost code block is processed before an outermost code block.
-
17. The computer program product as described in claim 12 wherein each of the first and second code blocks include custom tags identifying a start and an end of each of the code blocks.
-
18. The computer program product as described in claim 17 wherein the custom tags include the tag set <
- BLOCK>
<
/BLOCK>
.
- BLOCK>
-
19. A computer system comprising:
-
a processor;
system memory;
means for examining the DOM to identify any nodes that identify a given code block; and
means for adjusting the DOM for each node identifying a given code block, the adjusting means comprising;
means for creating a new node representing a Java method definition as a child node of a root element;
means for replacing the node that identifies the given code block with a node representing a Java method call to the Java method definition; and
means for moving the given code block'"'"'s child nodes under the new node representing the Java method definition. - View Dependent Claims (20, 21, 22, 23, 24)
means for generating Java servlet code under the Java method definition to pass script code contained in the given code block to an appropriate interpreter.
-
-
24. The computer system as described in claim 19 wherein each of the first and second code blocks include custom tags identifying a start and an end of each of the code blocks.
Specification