提交 f9afc84b authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Generate proper table of contents for PDF

上级 abf01ddf
......@@ -52,7 +52,7 @@ syntax-end -->
<!-- railroad-end -->
<c:forEach var="item" items="dataTypes">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<h2 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h2>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
......
......@@ -164,7 +164,92 @@ syntax-end -->
<p>Click on the header to switch between railroad diagram and BNF.</p>
<!-- railroad-end -->
<c:forEach var="item" items="functionsAll">
<h2>Aggregate Functions</h2>
<c:forEach var="item" items="functionsAggregate">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>Numeric Functions</h2>
<c:forEach var="item" items="functionsNumeric">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>String Functions</h2>
<c:forEach var="item" items="functionsString">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>Time and Date Functions</h2>
<c:forEach var="item" items="functionsTimeDate">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>System Functions</h2>
<c:forEach var="item" items="functionsSystem">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
......
......@@ -170,7 +170,30 @@ syntax-end -->
<p>Click on the header to switch between railroad diagram and BNF.</p>
<!-- railroad-end -->
<c:forEach var="item" items="commands">
<h2>Commands (Data Manipulation)</h2>
<c:forEach var="item" items="commandsDML">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">
${item.example}</p>
</c:forEach>
<h2>Commands (Data Definition)</h2>
<c:forEach var="item" items="commandsDDL">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
......@@ -191,6 +214,29 @@ syntax-end -->
${item.example}</p>
</c:forEach>
<h2>Commands (Other)</h2>
<c:forEach var="item" items="commandsOther">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
<pre name="bnf" style="display: none">
${item.syntax}
</pre>
<div name="railroad">
${item.railroad}
</div>
<!-- railroad-end -->
<!-- syntax-start
<pre>
${item.syntax}
</pre>
syntax-end -->
<p>${item.text}</p>
<p>Example:</p>
<p class="notranslate">
${item.example}</p>
</c:forEach>
<h2>Datetime fields</h2>
<c:forEach var="item" items="datetimeFields">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
......@@ -212,6 +258,7 @@ syntax-end -->
${item.example}</p>
</c:forEach>
<h2>Other Grammar</h2>
<c:forEach var="item" items="otherGrammar">
<h3 id="${item.link}" class="notranslate" onclick="switchBnf(this)">${item.topic}</h3>
<!-- railroad-start -->
......@@ -227,6 +274,8 @@ syntax-end -->
<p class="notranslate">${item.example}</p>
</c:forEach>
<h2>System Tables</h2>
<h3 id="information_schema" class="notranslate">Information Schema</h3>
<p>
The system tables in the schema <code>INFORMATION_SCHEMA</code> contain the meta data
......
......@@ -70,30 +70,26 @@ public class GenerateDoc {
// String help = "SELECT * FROM INFORMATION_SCHEMA.HELP WHERE SECTION";
String help = "SELECT ROWNUM ID, * FROM CSVREAD('" +
IN_HELP + "', NULL, 'lineComment=#') WHERE SECTION ";
map("commands",
help + "LIKE 'Commands%' ORDER BY ID", true);
map("commandsDML",
help + "= 'Commands (DML)' ORDER BY ID", false);
help + "= 'Commands (DML)' ORDER BY ID", true);
map("commandsDDL",
help + "= 'Commands (DDL)' ORDER BY ID", false);
help + "= 'Commands (DDL)' ORDER BY ID", true);
map("commandsOther",
help + "= 'Commands (Other)' ORDER BY ID", false);
help + "= 'Commands (Other)' ORDER BY ID", true);
map("datetimeFields",
help + "= 'Datetime fields' ORDER BY ID", true);
map("otherGrammar",
help + "= 'Other Grammar' ORDER BY ID", true);
map("functionsAggregate",
help + "= 'Functions (Aggregate)' ORDER BY ID", false);
help + "= 'Functions (Aggregate)' ORDER BY ID", true);
map("functionsNumeric",
help + "= 'Functions (Numeric)' ORDER BY ID", false);
help + "= 'Functions (Numeric)' ORDER BY ID", true);
map("functionsString",
help + "= 'Functions (String)' ORDER BY ID", false);
help + "= 'Functions (String)' ORDER BY ID", true);
map("functionsTimeDate",
help + "= 'Functions (Time and Date)' ORDER BY ID", false);
help + "= 'Functions (Time and Date)' ORDER BY ID", true);
map("functionsSystem",
help + "= 'Functions (System)' ORDER BY ID", false);
map("functionsAll",
help + "LIKE 'Functions%' ORDER BY SECTION, ID", true);
help + "= 'Functions (System)' ORDER BY ID", true);
map("dataTypes",
help + "LIKE 'Data Types%' ORDER BY SECTION, ID", true);
map("informationSchema", "SELECT TABLE_NAME TOPIC, " +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论