Home
Transforming an XML file into an HTML file
We can now use the XSL stylesheet file to generate an HTML file from the sample XML file:
![]()
In the Enterprise Explorer, hold down the Ctrl key and select both the Accounts.xml and Accounts.xsl files.
![]()
Right-click and select Run As Æ XSL Transformation.
![]()
The resulting file name is _Accounts_transform.html. The file is automatically opened in the Page Designer.
![]()
Select the Split tab (Figure | 0-12).
![]()
Figure 10-12 XSL stylesheet transformation result
![]()
Notice the transformation messages in the Console view: XSL file name:
file:///E:\Workspaces\RAD75proguide\RAD75XMLBank\xml\Accounts.xsl
XML input file name:
file:///E:\Workspaces\RAD75proguide\RAD75XMLBank\xml\Accounts.xml
Result file name:
E:/Workspaces/RAD75proguide/RAD75XMLBank/xml/_Accounts_transform.html
Note: The Split tab in the Page Designer is new to Rational Application Developer v7.5. It is a combination of the Design and Source tabs where both the Design and the Source can be viewed simultaneously. The split between the two views can be either vertical or horizontal by clicking one of the icons in the tool bar
. Note that changing the source code automatically changes the design.
ibm.com/redbooks