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

Generate proper table of contents for PDF

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