Step 3: Formatted Source
The following are a few of the main features to be found in Polystyle's JSP formatter.
To see a preview of Polystyle in action, use the Step 1, 2, 3 links above.
The JSP formatter also benefits from the features of:
Polystyle keeps track of indentation from code braces as well as
from HTML tags. This makes the resulting source much easier to read.
Example:
<%
while (x)
{
%>
<table a = "b">
<td>
Text
<%
}
%>
|
|
|
Polystyle parses deeply into HTML tag values and correctly formats JSP expressions
it finds there.
Example:
<a href=/file_<%= getFileName(i + y)%>.html>
|
|
|
Sometimes JSP expressions need to remain merged with the surrounding
HTML. Polystyle understands this and will not insert whitespace
where it should not.
Example:
This is the <%= n %>th item in file_<%= fileNum %>.
|
|
|
Next, take a look at what Polystyle can do for you with this quick test case: