IBM Version 5 manual Example 11-13 Result XSL

Models: Version 5

1 340
Download 340 pages 15.44 Kb
Page 291
Image 291

</xsl:template>

Also, result XSL needs a modification. As we mentioned about the SQLResult element, the result document’s root is also SQLResult. You need to modify the result XSL to match the document, and all returned tags are capitalized as we mentioned. Complete Result XSL is as follows (Figure 11-13).

Example 11-13 Result XSL

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns="http://www.w3.org/1999/xhtml">

<xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

<xsl:template match="/SQLResult/"> <html>

<head>

<title>Registration Result</title> <style type="text/css">

<![CDATA[ body

{

background-color: #ffffff;

}

h3

{

color: #0000ff; text-align: center;

}

]]>

</style>

</head>

<body>

<xsl:apply-templates select="CUSTOMER"/> </body>

</html>

</xsl:template>

<xsl:template match="CustomerCUSTOMER"> <h3>Registration Result</h3>

<table border="0" cellpadding="2" cellspacing="0"> <xsl:apply-templates select="firstNameFIRSTNAME"/>

Chapter 11. Light weight XML-based Enterprise Application 275

Page 291
Image 291
IBM Version 5 manual Example 11-13 Result XSL