Prepare manual for rebranding

This commit is contained in:
Lukas Eder 2013-08-05 11:54:51 +02:00
parent 458306b656
commit 0dd9d87e18
4 changed files with 407 additions and 342 deletions

View File

@ -58,38 +58,48 @@ function getH1() {
return "The jOOQ User Manual. Single Page";
}
function getActiveMenu() {
return "learn";
return "learn";
}
function printContent() {
global $root;
?>
</xsl:text>
<div id="manual">
<!-- Display the main section's content -->
<div class="row col col-100 col-white">
<xsl:apply-templates select="/manual/section/content"/>
</div>
<!-- Display the overall table of contents -->
<h2 id="toc"><a href="#toc" name="toc">#</a> Table of contents</h2>
<div class="row col col-100 col-white">
<h2 id="toc"><a href="#toc" name="toc">Table of contents</a></h2>
<xsl:apply-templates select="/manual/section" mode="toc"/>
</div>
<xsl:for-each select="/manual/section//section">
<xsl:variable name="id" select="@id"/>
<h2 id="{@id}">
<xsl:for-each select="//redirect[@redirect-to = $id]">
<a id="{@id}" name="{@id}"/>
</xsl:for-each>
<a name="{@id}" href="#{@id}">#</a>
<xsl:text> </xsl:text>
<xsl:apply-templates select="." mode="chapter-number"/>
<xsl:text> </xsl:text>
<xsl:value-of select="title"/>
</h2>
<xsl:apply-templates select="content" />
<section>
<div class="row col col-100 col-white">
<h2 id="{@id}">
<xsl:for-each select="//redirect[@redirect-to = $id]">
<a id="{@id}" name="{@id}"/>
</xsl:for-each>
<a name="{@id}" href="#{@id}">
<xsl:apply-templates select="." mode="chapter-number"/>
<xsl:text> </xsl:text>
<xsl:value-of select="title"/>
</a>
</h2>
<xsl:apply-templates select="content" />
</div>
</section>
</xsl:for-each>
</div>
<xsl:text disable-output-escaping="yes">
&lt;?php
}

View File

@ -36,172 +36,178 @@
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="src/main/resources/html-util.xsl"/>
<xsl:import href="src/main/resources/html-util.xsl"/>
<xsl:output encoding="UTF-8" method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:param name="sectionID"/>
<xsl:param name="relativePath"/>
<xsl:param name="root"/>
<xsl:output encoding="UTF-8" method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:param name="sectionID"/>
<xsl:param name="relativePath"/>
<xsl:param name="root"/>
<xsl:variable name="apos">&apos;</xsl:variable>
<xsl:variable name="apos">&apos;</xsl:variable>
<!-- Main match -->
<!-- Main match -->
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">
<xsl:template match="/">
<xsl:text disable-output-escaping="yes">
&lt;?php
// The following content has been XSL transformed from manual.xml using html-pages.xsl
// Please do not edit this content manually
require '</xsl:text>
<xsl:value-of select="$relativePath"/>
<xsl:value-of select="$relativePath"/>
<xsl:text disable-output-escaping="yes">frame.php';
function getH1() {
return "</xsl:text>
<xsl:value-of select="//section[@id = $sectionID]/title"/>
<xsl:value-of select="//section[@id = $sectionID]/title"/>
<xsl:text disable-output-escaping="yes">";
}
function getActiveMenu() {
return "learn";
return "learn";
}
function printContent() {
global $root;
?&gt;
</xsl:text>
<xsl:apply-templates select="//section[@id = $sectionID]" mode="content"/>
<xsl:text disable-output-escaping="yes">
<div id="manual">
<xsl:apply-templates select="//section[@id = $sectionID]" mode="content"/>
</div>
<xsl:text disable-output-escaping="yes">
&lt;?php
}
?&gt;
</xsl:text>
</xsl:template>
</xsl:template>
<!-- matching templates -->
<!-- matching templates -->
<xsl:template match="h3" mode="content">
<xsl:variable name="id" select="generate-id(.)"/>
<xsl:variable name="id" select="generate-id(.)"/>
<h2 id="{$id}">
<a href="#{$id}" name="{$id}">#</a>
<xsl:text> </xsl:text>
<xsl:apply-templates mode="content"/>
<a href="#{$id}" name="{$id}">
<xsl:apply-templates mode="content"/>
</a>
</h2>
</xsl:template>
<xsl:template match="//section[@id = $sectionID]" mode="content">
<xsl:apply-templates select="." mode="navigation"/>
<xsl:apply-templates select="content"/>
<xsl:template match="//section[@id = $sectionID]" mode="content">
<section>
<div class="row col col-100 col-white">
<xsl:apply-templates select="." mode="navigation"/>
<xsl:apply-templates select="content"/>
<xsl:if test="count(sections/section) &gt; 0">
<h2 id="toc"><a href="#toc" name="toc">Table of contents</a></h2>
</xsl:if>
<xsl:apply-templates select="." mode="toc"/>
<br/>
<xsl:apply-templates select="." mode="navigation"/>
</div>
</section>
</xsl:template>
<xsl:if test="count(sections/section) &gt; 0">
<h2 id="toc"><a href="#toc" name="toc">#</a> Table of contents</h2>
</xsl:if>
<xsl:apply-templates select="." mode="toc"/>
<xsl:template match="section" mode="navigation">
<table cellpadding="0" cellspacing="0" border="0" width="936">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="." mode="breadcrumb"/>
</td>
<td align="right" valign="top" style="white-space: nowrap">
<xsl:apply-templates select="." mode="prev-next"/>
</td>
</tr>
</table>
</xsl:template>
<br/>
<xsl:apply-templates select="." mode="navigation"/>
</xsl:template>
<xsl:template match="section" mode="breadcrumb">
<xsl:if test="name(../..) = 'section'">
<xsl:apply-templates select="../.." mode="breadcrumb"/>
<xsl:text> : </xsl:text>
</xsl:if>
<xsl:template match="section" mode="navigation">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td align="left" valign="top">
<xsl:apply-templates select="." mode="breadcrumb"/>
</td>
<td align="right" valign="top" style="white-space: nowrap">
<xsl:apply-templates select="." mode="prev-next"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:variable name="href">
<xsl:apply-templates select="." mode="href"/>
</xsl:variable>
<xsl:template match="section" mode="breadcrumb">
<xsl:if test="name(../..) = 'section'">
<xsl:apply-templates select="../.." mode="breadcrumb"/>
<xsl:text> : </xsl:text>
</xsl:if>
<a href="{$href}">
<xsl:value-of select="title"/>
</a>
</xsl:template>
<xsl:variable name="href">
<xsl:apply-templates select="." mode="href"/>
</xsl:variable>
<xsl:template match="section" mode="href">
<xsl:choose>
<xsl:when test="name(../..) = 'section'">
<xsl:apply-templates select="../.." mode="href"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>&lt;?=$root?&gt;/</xsl:text>
<xsl:value-of select="$root"/>
</xsl:otherwise>
</xsl:choose>
<a href="{$href}">
<xsl:value-of select="title"/>
</a>
</xsl:template>
<xsl:value-of select="@id"/>
<xsl:text>/</xsl:text>
</xsl:template>
<xsl:template match="section" mode="href">
<xsl:choose>
<xsl:when test="name(../..) = 'section'">
<xsl:apply-templates select="../.." mode="href"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>&lt;?=$root?&gt;/</xsl:text>
<xsl:value-of select="$root"/>
</xsl:otherwise>
</xsl:choose>
<xsl:template match="section" mode="prev-next">
<xsl:variable name="prev" select="(preceding::section | ancestor::section)[last()]"/>
<xsl:variable name="prevhref">
<xsl:apply-templates select="$prev" mode="href"/>
</xsl:variable>
<xsl:value-of select="@id"/>
<xsl:text>/</xsl:text>
</xsl:template>
<xsl:variable name="next" select="(following::section | descendant::section)[1]"/>
<xsl:variable name="nexthref">
<xsl:apply-templates select="$next" mode="href"/>
</xsl:variable>
<xsl:template match="section" mode="prev-next">
<xsl:variable name="prev" select="(preceding::section | ancestor::section)[last()]"/>
<xsl:variable name="prevhref">
<xsl:apply-templates select="$prev" mode="href"/>
</xsl:variable>
<xsl:if test="$prev">
<a href="{$prevhref}" title="Previous section: {$prev/title}">previous</a>
</xsl:if>
<xsl:variable name="next" select="(following::section | descendant::section)[1]"/>
<xsl:variable name="nexthref">
<xsl:apply-templates select="$next" mode="href"/>
</xsl:variable>
<xsl:if test="$prev and $next">
<xsl:text> : </xsl:text>
</xsl:if>
<xsl:if test="$prev">
<a href="{$prevhref}" title="Previous section: {$prev/title}">previous</a>
</xsl:if>
<xsl:if test="$next">
<a href="{$nexthref}" title="Next section: {$next/title}">next</a>
</xsl:if>
</xsl:template>
<xsl:if test="$prev and $next">
<xsl:text> : </xsl:text>
</xsl:if>
<xsl:template match="section" mode="prev-id">
<xsl:variable name="id" select="@id"/>
<xsl:if test="$next">
<a href="{$nexthref}" title="Next section: {$next/title}">next</a>
</xsl:if>
</xsl:template>
<xsl:variable name="position">
<xsl:for-each select="//section">
<xsl:if test="@id = $id">
<xsl:value-of select="position()"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:template match="section" mode="prev-id">
<xsl:variable name="id" select="@id"/>
<xsl:for-each select="//section">
<xsl:if test="position() = $position - 1">
<xsl:value-of select="@id"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:variable name="position">
<xsl:for-each select="//section">
<xsl:if test="@id = $id">
<xsl:value-of select="position()"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:template match="section" mode="next-id">
<xsl:variable name="id" select="@id"/>
<xsl:for-each select="//section">
<xsl:if test="position() = $position - 1">
<xsl:value-of select="@id"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:variable name="position">
<xsl:for-each select="//section">
<xsl:if test="@id = $id">
<xsl:value-of select="position()"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:template match="section" mode="next-id">
<xsl:variable name="id" select="@id"/>
<xsl:variable name="position">
<xsl:for-each select="//section">
<xsl:if test="@id = $id">
<xsl:value-of select="position()"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="//section">
<xsl:if test="position() = $position + 1">
<xsl:value-of select="@id"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:for-each select="//section">
<xsl:if test="position() = $position + 1">
<xsl:value-of select="@id"/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

View File

@ -36,215 +36,265 @@
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:output encoding="UTF-8" method="html" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match="html-only" mode="content">
<xsl:apply-templates mode="content"/>
</xsl:template>
<xsl:template match="html-only" mode="content">
<xsl:apply-templates mode="content"/>
</xsl:template>
<xsl:template match="section" mode="toc">
<xsl:if test="count(sections/section) &gt; 0">
<dl class="toc">
<xsl:apply-templates select="." mode="toc-contents"/>
</dl>
</xsl:if>
</xsl:template>
<xsl:template match="section" mode="toc-contents">
<xsl:if test="count(sections/section) &gt; 0">
<xsl:for-each select="sections/section">
<xsl:variable name="class">
<xsl:if test="../../@id = 'manual'">toc-main</xsl:if>
</xsl:variable>
<dt class="{$class}">
<xsl:apply-templates select="." mode="chapter-number"/>
</dt>
<dd class="{$class}">
<xsl:variable name="href">
<xsl:apply-templates select="." mode="href"/>
</xsl:variable>
<a href="{$href}" title="{title}">
<xsl:value-of select="title"/>
</a>
</dd>
<xsl:apply-templates select="." mode="toc-contents"/>
</xsl:for-each>
</xsl:if>
</xsl:template>
<xsl:template match="content">
<xsl:apply-templates select="@*|node()" mode="content"/>
</xsl:template>
<xsl:template match="@*|node()" mode="content">
<xsl:choose>
<xsl:when test="name(.) = 'reference'">
<xsl:variable name="id" select="@id"/>
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@id">
<xsl:apply-templates select="//section[@id = $id]" mode="href"/>
<xsl:value-of select="@anchor"/>
<xsl:if test="not(//section[@id = $id])">
<xsl:message>
<xsl:text>Reference not found: </xsl:text>
<xsl:value-of select="$id"/>
</xsl:message>
</xsl:if>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq.test')">
<xsl:text>https://github.com/jOOQ/jOOQ/blob/master/jOOQ-test/src/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.java</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq.debug')">
<xsl:text>https://github.com/jOOQ/jOOQ/blob/master/jOOQ-console/src/main/java/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.java</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq')">
<xsl:text>http://www.jooq.org/javadoc/latest/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.html</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and (starts-with(@class, 'javax.persistence'))">
<xsl:text>http://docs.oracle.com/javaee/6/api/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.html</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and (starts-with(@class, 'java') or starts-with(@class, 'org.w3c.dom'))">
<xsl:text>http://download.oracle.com/javase/6/docs/api/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.html</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@ticket">
<xsl:text>https://github.com/jOOQ/jOOQ/issues/</xsl:text>
<xsl:value-of select="@ticket"/>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>Reference not supported</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="@id">
<xsl:text>jOOQ Manual reference: </xsl:text>
<xsl:value-of select="//section[@id = $id]/title"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq')">
<xsl:text>Internal API reference: </xsl:text>
<xsl:value-of select="@class"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'java')">
<xsl:text>External API reference: </xsl:text>
<xsl:value-of select="@class"/>
</xsl:when>
<xsl:when test="@ticket">
<xsl:text>GitHub issue: #</xsl:text>
<xsl:value-of select="@ticket"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@title">
<xsl:value-of select="@title"/>
</xsl:when>
<xsl:when test="@id">
<xsl:value-of select="//section[@id = $id]/title"/>
</xsl:when>
<xsl:when test="@class">
<xsl:value-of select="@class"/>
</xsl:when>
<xsl:when test="@ticket">
<xsl:text>#</xsl:text>
<xsl:value-of select="@ticket"/>
</xsl:when>
</xsl:choose>
</a>
</xsl:when>
<xsl:when test="name(.) = 'java'">
<pre class="prettyprint lang-java">
<xsl:value-of select="text()"/>
</pre>
</xsl:when>
<xsl:when test="name(.) = 'scala'">
<pre class="prettyprint lang-scala">
<xsl:value-of select="text()"/>
</pre>
</xsl:when>
<xsl:when test="name(.) = 'sql'">
<pre class="prettyprint lang-sql">
<xsl:value-of select="text()"/>
</pre>
</xsl:when>
<xsl:when test="name(.) = 'xml'">
<pre class="prettyprint lang-xml">
<xsl:value-of select="text()"/>
</pre>
</xsl:when>
<xsl:when test="name(.) = 'config'">
<pre class="prettyprint">
<xsl:value-of select="text()"/>
</pre>
</xsl:when>
<xsl:when test="name(.) = 'text'">
<pre>
<xsl:value-of select="text()"/>
</pre>
</xsl:when>
<xsl:when test="name(.) = 'code-pair'">
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" class="left">
<xsl:apply-templates select="./*[position() = 1]" mode="content"/>
</td>
<td width="50%" class="right">
<xsl:apply-templates select="./*[position() = 2]" mode="content"/>
</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="content"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
<xsl:template match="section" mode="toc">
<xsl:if test="count(sections/section) &gt; 0">
<dl class="toc">
<xsl:apply-templates select="." mode="toc-contents"/>
</dl>
</xsl:if>
</xsl:template>
<xsl:template match="section" mode="chapter-number">
<xsl:if test="@id != 'manual'">
<xsl:apply-templates select="../.." mode="chapter-number"/>
<xsl:template match="section" mode="toc-contents">
<xsl:if test="count(sections/section) &gt; 0">
<xsl:for-each select="sections/section">
<xsl:variable name="class">
<xsl:if test="../../@id = 'manual'">toc-main</xsl:if>
</xsl:variable>
<dt class="{$class}">
<xsl:apply-templates select="." mode="chapter-number"/>
</dt>
<dd class="{$class}">
<xsl:variable name="href">
<xsl:apply-templates select="." mode="href"/>
</xsl:variable>
<xsl:value-of select="count(preceding-sibling::section) + 1"/>
<xsl:text>.</xsl:text>
</xsl:if>
</xsl:template>
<a href="{$href}" title="{title}">
<xsl:value-of select="title"/>
</a>
</dd>
<xsl:apply-templates select="." mode="toc-contents"/>
</xsl:for-each>
</xsl:if>
</xsl:template>
<xsl:template match="content">
<xsl:apply-templates select="@*|node()" mode="content"/>
</xsl:template>
<xsl:template match="@*|node()" mode="content">
<xsl:param name="colwidth" select="'100'"/>
<xsl:param name="col1" select="false()"/>
<xsl:param name="col2" select="false()"/>
<xsl:choose>
<xsl:when test="name(.) = 'reference'">
<xsl:variable name="id" select="@id"/>
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="@id">
<xsl:apply-templates select="//section[@id = $id]" mode="href"/>
<xsl:value-of select="@anchor"/>
<xsl:if test="not(//section[@id = $id])">
<xsl:message>
<xsl:text>Reference not found: </xsl:text>
<xsl:value-of select="$id"/>
</xsl:message>
</xsl:if>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq.test')">
<xsl:text>https://github.com/jOOQ/jOOQ/blob/master/jOOQ-test/src/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.java</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq.debug')">
<xsl:text>https://github.com/jOOQ/jOOQ/blob/master/jOOQ-console/src/main/java/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.java</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq')">
<xsl:text>http://www.jooq.org/javadoc/latest/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.html</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and (starts-with(@class, 'javax.persistence'))">
<xsl:text>http://docs.oracle.com/javaee/6/api/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.html</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@class and (starts-with(@class, 'java') or starts-with(@class, 'org.w3c.dom'))">
<xsl:text>http://download.oracle.com/javase/6/docs/api/</xsl:text>
<xsl:value-of select="translate(@class, '.', '/')"/>
<xsl:text>.html</xsl:text>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:when test="@ticket">
<xsl:text>https://github.com/jOOQ/jOOQ/issues/</xsl:text>
<xsl:value-of select="@ticket"/>
<xsl:value-of select="@anchor"/>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>Reference not supported</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="@id">
<xsl:text>jOOQ Manual reference: </xsl:text>
<xsl:value-of select="//section[@id = $id]/title"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'org.jooq')">
<xsl:text>Internal API reference: </xsl:text>
<xsl:value-of select="@class"/>
</xsl:when>
<xsl:when test="@class and starts-with(@class, 'java')">
<xsl:text>External API reference: </xsl:text>
<xsl:value-of select="@class"/>
</xsl:when>
<xsl:when test="@ticket">
<xsl:text>GitHub issue: #</xsl:text>
<xsl:value-of select="@ticket"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@title">
<xsl:value-of select="@title"/>
</xsl:when>
<xsl:when test="@id">
<xsl:value-of select="//section[@id = $id]/title"/>
</xsl:when>
<xsl:when test="@class">
<xsl:value-of select="@class"/>
</xsl:when>
<xsl:when test="@ticket">
<xsl:text>#</xsl:text>
<xsl:value-of select="@ticket"/>
</xsl:when>
</xsl:choose>
</a>
</xsl:when>
<xsl:when test="name(.) = 'java'">
<xsl:if test="not($col2)">
<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
</xsl:if>
<div class="row col col-{$colwidth} col-darkgrey">
<pre class="prettyprint lang-java">
<xsl:value-of select="text()"/>
</pre>
</div>
<xsl:if test="not($col1)">
<xsl:text disable-output-escaping="yes"><![CDATA[<div class="row col col-100 col-white">]]></xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="name(.) = 'scala'">
<xsl:if test="not($col2)">
<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
</xsl:if>
<div class="row col col-{$colwidth} col-darkgrey">
<pre class="prettyprint lang-scala">
<xsl:value-of select="text()"/>
</pre>
</div>
<xsl:if test="not($col1)">
<xsl:text disable-output-escaping="yes"><![CDATA[<div class="row col col-100 col-white">]]></xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="name(.) = 'sql'">
<xsl:if test="not($col2)">
<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
</xsl:if>
<div class="row col col-{$colwidth} col-black">
<pre class="prettyprint lang-sql">
<xsl:value-of select="text()"/>
</pre>
</div>
<xsl:if test="not($col1)">
<xsl:text disable-output-escaping="yes"><![CDATA[<div class="row col col-100 col-white">]]></xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="name(.) = 'xml'">
<xsl:if test="not($col2)">
<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
</xsl:if>
<div class="row col col-{$colwidth} col-grey">
<pre class="prettyprint lang-xml">
<xsl:value-of select="text()"/>
</pre>
</div>
<xsl:if test="not($col1)">
<xsl:text disable-output-escaping="yes"><![CDATA[<div class="row col col-100 col-white">]]></xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="name(.) = 'config'">
<xsl:if test="not($col2)">
<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
</xsl:if>
<div class="row col col-{$colwidth} col-green">
<pre class="prettyprint">
<xsl:value-of select="text()"/>
</pre>
</div>
<xsl:if test="not($col1)">
<xsl:text disable-output-escaping="yes"><![CDATA[<div class="row col col-100 col-white">]]></xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="name(.) = 'text'">
<xsl:if test="not($col2)">
<xsl:text disable-output-escaping="yes"><![CDATA[</div>]]></xsl:text>
</xsl:if>
<div class="row col col-{$colwidth} col-red">
<pre>
<xsl:value-of select="text()"/>
</pre>
</div>
<xsl:if test="not($col1)">
<xsl:text disable-output-escaping="yes"><![CDATA[<div class="row col col-100 col-white">]]></xsl:text>
</xsl:if>
</xsl:when>
<xsl:when test="name(.) = 'code-pair'">
<xsl:apply-templates select="./*[position() = 1]" mode="content">
<xsl:with-param name="colwidth" select="'50'"/>
<xsl:with-param name="col1" select="true()"/>
</xsl:apply-templates>
<xsl:apply-templates select="./*[position() = 2]" mode="content">
<xsl:with-param name="colwidth" select="'50'"/>
<xsl:with-param name="col2" select="true()"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:copy>
<xsl:apply-templates select="@*|node()" mode="content"/>
</xsl:copy>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="section" mode="chapter-number">
<xsl:if test="@id != 'manual'">
<xsl:apply-templates select="../.." mode="chapter-number"/>
<xsl:value-of select="count(preceding-sibling::section) + 1"/>
<xsl:text>.</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View File

@ -38,7 +38,7 @@
<section id="manual">
<title>The jOOQ User Manual. Multiple Pages</title>
<content>
<h2 id="Overview"><a href="#Overview" name="Overview">#</a> Overview</h2>
<h2 id="Overview"><a href="#Overview" name="Overview">Overview</a></h2>
<p>This manual is divided into six main sections:</p>
<ul>
@ -11090,7 +11090,6 @@ Condition condition3 = BOOK.TITLE.isNotDistinctFrom(possiblyNull);]]></java>
jOOQ lives in a very challenging ecosystem. The Java to SQL interface is still one of the most important system interfaces. Yet there are still a lot of open questions, best practices and no "true" standard has been established. This situation gave way to a lot of tools, APIs, utilities which essentially tackle the same problem domain as jOOQ. jOOQ has gotten great inspiration from pre-existing tools and this section should give them some credit. Here is a list of inspirational tools in alphabetical order:
</p>
<ul>
<li><a href="http://avaje.org">Avajé EBean</a>: Play! Framework's preferred ORM has a feature called asynchronous query execution. This idea made it into jOOQ as <reference class="org.jooq.ResultQuery" anchor="#fetchLater()"/></li>
<li><a href="http://www.hibernate.org">Hibernate</a>: The de-facto standard (JPA) with its useful table-to-POJO mapping features have influenced jOOQ's <reference class="org.jooq.ResultQuery" anchor="#fetchInto(java.lang.Class)"/> facilities</li>
<li><a href="http://www.h2database.com/html/jaqu.html">JaQu</a>: H2's own fluent API for querying databases</li>
<li><a href="http://www.oracle.com/technetwork/java/javaee/tech/persistence-jsp-140049.html">JPA</a>: The de-facto standard in the javax.persistence packages, supplied by Oracle. Its annotations are useful to jOOQ as well.</li>