Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Book Image

JDBC 4.0 and Oracle JDeveloper for J2EE Development

Overview of this book

Table of Contents (20 chapters)
JDBC 4.0 and Oracle JDeveloper for J2EE Development
Credits
About the Author
About the Reviewer
Preface

Transforming XSQL Output


An XSQL page supports the transformation of query output using an XSLT. In this section, we will add XSLT transformation to the XML document generated with an XSQL query. Add an XSLT file with File | New. In the New Gallery window select General | XML in Categories and XSL Style Sheet in Items, and click on OK. In the Create XSL File frame, specify a file name and click on OK. An XSL stylesheet is added to XSQL project.

The XSLT, catalog.xsl, used to generate an HTML table from an XSQL query XML output is listed below:

<?xml version="1.0" encoding="UTF-8"?>
XSQLXSQL output transforming, XSLT used<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="ISO-8859-1" method="text/html" />
<xsl:template match="//page">
<html>
<head>
<title>Oracle Catalog</title>
</head>
<body>
<table border="1" cellspacing="0">
<tr>
<th>Journal</th>
<th...