Skip to main content
Jump to: navigation, search

Difference between revisions of "MoDisco/Components/JSP/Architecture/0.9"

(Updating the Grammar)
Line 11: Line 11:
 
Example :  
 
Example :  
 
<code> <img src="./img/myImage.png"> </code>
 
<code> <img src="./img/myImage.png"> </code>
 +
 +
In order to build the inheritance tree, we had to store all the founded tags, and each time closing one is detected, re build the inheritance tree.
 +
 +
Example :
 +
<code>
 +
<p>
 +
<img src="./img/myImage.png">
 +
</p>
 +
</code>
 +
 +
This fragment of code will add the <img> tag to the children of the <p> on when </p> is detected, and so on.

Revision as of 09:46, 20 April 2010

JSP Parser

Modisco JSP Parser has been developed using an ANTLR grammar It can support JSP file, as well as HTML files, TAG files, and JSP/TAG fragment files

Updating the Grammar

The ANTLR Grammar take in consideration the non XML conformity of a JSP file. Knowing that it can contain html or javascript tags, an opened tag is not necessarily closed by one

Example : <img src="./img/myImage.png">

In order to build the inheritance tree, we had to store all the founded tags, and each time closing one is detected, re build the inheritance tree.

Example :

<img src="./img/myImage.png">

This fragment of code will add the <img> tag to the children of the

on when

is detected, and so on.

Back to the top