7.5
Actions
The syntax for action elements is based on XML; the only transformations needed are due to 
quoting conventions and the syntax of request time attribute expressions.
7.6
Transforming a JSP Page into an XML 
Document
The standard XML document for a JSP page is defined by transformation of the JSP page.
Add a 
 element as the root. Enable a  jsp  namespace prefix for the standard 
tags within this root.
Convert all the <% elements into valid XML elements as described in Section 7.4.1 and 
following sections.
Convert the quotation mechanisms appropriately.
Convert the 
taglib
 directive into namespace attributes of the 
 element.
Create CDATA elements for all segments of the JSP page that do not correspond to JSP 
elements.
A quick summary of the transformation is shown in 
TABLE 7 1
:
TABLE 7 1 
XML standard tags for directives and scripting elements
JSP page element
XML equivalent
<%@ page ... %> 
<%@ taglib ... %>
jsp:root element is annotated with namespace information.
<%@ include ... %>
<%! ... %>
 .... 
<% ... %>
 .... 
<%= .... %>
 .... 
Chapter 7
JSP Pages as XML Documents
128




JSP Web Hosting JavaServer Pages Specifications JSP Hosting




 
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved.