tailieunhanh - WebSphere Studio Application Developer Version 5 Programming Guide part 40

WebSphere Studio Application Developer part 40 provides integrated development tools for all e-business development roles, including Web developers, Java developers, business analysts, architects, and enterprise programmers. The customizable, targeted, role-based approach of WebSphere Studio Application Developer will be characteristic of all new products built on the WebSphere Studio Workbench. It is well integrated with WebSphere Application Server and provides built-in server test environments that can be used for testing and profiling Web applications | Figure 11-18 XSL menu XSL menu with code wizards To prepare the style sheet that can be used to generate a HTML file we have to add some HTML code. First we add an HTML template. This basically generates an HTML code skeleton and add it to the XSL file. To use the HTML Template wizard place the cursor in a new line right after the stylesheet tag Figure 11-19 and select XSL - HTML Template from the menu bar. Note that Application Developer immediately adds the HTML code to the file without bringing up a dialog. Figure 11-19 Place cursor in XML editor A new code fragment has been added to the XSL file as shown in Figure 11-20. 364 WebSphere Studio Application Developer Version 5 Programming Guide Figure 11-20 HTML template code in XSL file Next delete the xsl apply-templates line from the code and place the cursor in this line Figure 11-21 . Figure 11-21 XSL code ready for insert Note In the absence of a select attribute the xsl apply-templates instruction processes all of the children of the current node including text nodes. Next we add a select attribute which can be used to process nodes selected by an expression instead of all children. Therefore we remove this instruction. Chapter 11. Developing XML applications 365 In the menu bar select XSL - HTML Table to bring up the HTML Table wizard to add a HTML table that displays the content of an XML file in a table when applying the XSL to the XML file Figure 11-22 . Note As we have specified the corresponding XML file when creating the style sheet Application Developer does not bring up the XML file selection dialog. This would be the case if no XML file had been selected when creating new style sheets. Figure 11-22 Add a table to the XSL Expand EJBBANKITSO ACCOUNT_TABLE and select the EJBBANKITSO ACCOUNT node. We want to display all accounts later when we apply this style sheet. Also select the check box Include Header. This option includes a for each element inside the content node. 366 WebSphere Studio .

TÀI LIỆU LIÊN QUAN
TỪ KHÓA LIÊN QUAN