sample.jsp
Alexander Hristov
 
0001
<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
0002
<html
xmlns="
http://www.w3.org/1999/xhtml
"> 0003
<head
> 0004
<!-- Comment -->
0005
<meta
http-equiv="
Content-Type
" content="
text/html; charset=iso-8859-15
" /> 0006
<!--
0007
Multine comment with "tags" inside
0008
0009
<meta name="lang" content="es" />
0010
<meta name="author" content="Planetalia" />
0011
0012
-->
0013 0014 0015Comment
<!-- in the middle -->
of text 0016 0017
<!-- element with no attributes, closed in same line -->
0018
<element
>
</element>
0019 0020
<!-- element with no attributes, closed in different line -->
0021
<element
> 0022
</element>
0023 0024
<element
> 0025
</element>
0026 0027
<element
0028 > 0029
</element
0030
>
0031 0032
<!-- element with no attributes, closed in different line, with contents and whitespaces -->
0033
<element
> 0034 This is a sample text 0035
</element>
0036 0037
<!-- Shorthand empty element notation -->
0038
<br/>
0039
<br />
0040 0041 0042
<!-- Shorthand with attributes. Using " as delimiter -->
0043
<element
foo="
bar
"> Hello
</element>
0044
<element
foo="
bar
" > Hello
</element>
0045
<element
foo="
bar
" foo1="
bar2
" foo3="
bar3
" > Hello
</element>
0046
<element
foo = "
bar
"> Hello
</element>
0047 0048
<element
foo 0049= 0050"
bar
"> Hello
</element>
0051 0052 0053
<element
foo ="
bar
"> Hello
</element>
0054 0055
<element
foo= 0056"
bar
"> Hello
</element>
0057 0058
<!-- Shorthand with attributes. Using ' as delimiter -->
0059
<element
foo='
bar
'> Hello
</element>
0060
<element
foo='
bar
' > Hello
</element>
0061
<element
foo='
bar
' foo1='
bar
' foo3='
bar3
' > Hello
</element>
0062
<element
foo = '
bar
'> Hello
</element>
0063 0064
<element
foo 0065= 0066'
bar
'> Hello
</element>
0067 0068 0069
<element
foo ='
bar
'> Hello
</element>
0070 0071
<element
foo= 0072"
bar
"> Hello
</element>
0073 0074 0075
<!-- Shorthand with attributes. Using no delimiter -->
0076
<element
foo=
bar
> Hello
</element>
0077 0078
<element
foo= 0079
bar
> Hello
</element>
0080 0081
<element
foo = 0082
bar
> Hello
</element>
0083 0084
<!-- Entities in PCDATA -->
0085
&ntilde;
0086 0087
<element
> this is an
&amp;
entity
</element>
0088 0089
<!-- Entities in attributes -->
0090 0091
<element
name="
this is
&amp;
entity
" /> 0092
<element
name='
this is
&amp;
entity
' /> 0093 0094
<!-- Entities in &ntilde; attributes should stay as is -->
0095 0096
<!-- JSP In ordinary text-->
0097This is
<%= some %>
text with
<% foo %>
jsp
<%! int a = 3; %>
declarations 0098 0099
<!-- JSP Tags -->
0100
<c2w:convert
attrib="
<%=whatever%>
" attrib2="
fixed
" attrib3='
apostrophes
' attrib4='
<%=whatever%>
' /> 0101 0102 0103
<!-- JSP in attributes delimited with " -->
0104
<element
value="
some attribute
<%= expression %>
text with
<%= 'a' %>
jsp expressions
" /> 0105
<element
value="
<%= at_start %>
some attribute
<%= expression %>
text with
<%= 'a' %>
jsp expressions
" /> 0106
<element
value="
some attribute
<%= expression %>
text with
<%= 'a' %>
jsp expressions
<%=at_end%>
" /> 0107 0108 0109
<!-- JSP in attributes delimited with ' -->
0110 0111
<element
value='
some attribute
<%= expression %>
text with
<%= "a" %>
jsp expressions
' /> 0112
<element
value='
<%= at_start %>
some attribute
<%= expression %>
text with
<%= "a" %>
jsp expressions
' /> 0113
<element
value='
some attribute
<%= expression %>
text with
<%= "a" %>
jsp expressions
<%=at_end%>
' /> 0114 0115 0116
Coloring style :