4.Delete the repeating data in each TemplateRegion. In our example, we have to delete the repeating records of customers to keep only one. (See Example 7-5.)

5.Parameterized each data item using this format: {tagName}. The tagName will be used in the resulting XML and XSL files.

Example 7-5 cus-template.xhtml

<?HTMLTemplate version="0.1"?> <TemplateRegion name="Root"> <HTML>

<HEAD>

<META name="Generator" content="IBM WebSphere Studio"/> <META http-equiv="Content-Style-Type" content="text/css"/>

<LINK href="/Travel/theme/Master.css" rel="stylesheet" type="text/css"/> <TITLE>Customer.html</TITLE>

</HEAD>

<BODY>

<DIV align="center">

<TABLE border="1" width="524"> <TBODY>

<TR>

<TD width="133">

<FONT color="#000000" size="3" face="Times New Roman"> <B>Firstname</B></FONT></TD>

<TD width="123">

<FONT color="#000000" size="3" face="Times New Roman"> <B>Lastname</B></FONT></TD>

<TD width="123">

<FONT color="#000000" size="3" face="Times New Roman"> <B>Email</B></FONT></TD>

<TD width="133">

<FONT color="#000000" size="3" face="Times New Roman"> <B>Membership</B></FONT></TD>

</TR>

<TemplateRegion name="Customer"> <TR>

<TD width="133">

<FONT color="#000000" size="2" face="Times New Roman"> {Firstname}

</FONT>

</TD>

<TD width="123">

<FONT color="#000000" size="2" face="Times New Roman"> {Lastname}

</FONT>

</TD>

<TD width="123">

158 The XML Files: Development of XML/XSL Applications Using WebSphere Studio

Page 174
Image 174
IBM Version 5 manual Example 7-5 cus-template.xhtml