Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DocBook 5.2 updates #106

Merged
merged 6 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 18 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ buildscript {

plugins {
id "groovy"
id "de.undercouch.download" version "4.0.4"
id 'com.nwalsh.gradle.saxon.saxon-gradle' version '0.9.3'
id "de.undercouch.download" version "5.3.1"
id 'com.nwalsh.gradle.saxon.saxon-gradle' version '0.10.0'
}

repositories {
Expand Down Expand Up @@ -137,6 +137,14 @@ task helloWorld() {

// ======================================================================

task downloadXslTNG(type: Download) {
src "https://github.com/docbook/xslTNG/releases/download/${docbookXsltVersion}/docbook-xslTNG-${docbookXsltVersion}.zip"
dest file("${buildDir}/docbook-xslTNG-${docbookXsltVersion}.zip")
onlyIf { !file("${buildDir}/docbook-xslTNG-${docbookXsltVersion}.zip").exists() }
}

// ======================================================================

task gitLogSummary(type: Exec) {
inputs.file "${projectDir}/tools/bin/git-log-summary"
outputs.file "${buildDir}/gitlog.xml"
Expand Down Expand Up @@ -306,15 +314,15 @@ books.each { vocab ->
}

task "${vocab}"(type: SaxonXsltTask,
dependsOn: ["${vocab}_xml",
dependsOn: ["downloadXslTNG",
"${vocab}_xml",
"${vocab}_copyresources"]) {
input "${buildDir}/${vocab}/book.xml"
stylesheet "${projectDir}/tools/xsl/book.xsl"
output "${buildDir}/${vocab}/html/index.html"
initializer "org.docbook.xsltng.extensions.Register"
entityResolverClass "org.xmlresolver.Resolver"
sourceParserClass "org.xmlresolver.tools.ResolvingXMLReader"
styleParserClass "org.xmlresolver.tools.ResolvingXMLReader"
input "file://${buildDir}/${vocab}/book.xml"
stylesheet "file://${projectDir}/tools/xsl/book.xsl"
output "file://${buildDir}/${vocab}/html/index.html"
arg '-init:org.docbook.xsltng.extensions.Register'
arg '-u'
arg "-catalog:jar:file:${buildDir}/docbook-xslTNG-${docbookXsltVersion}.zip!/docbook-xslTNG-${docbookXsltVersion}/xslt/catalog.xml"
parameters (
'rngfile': rndFile,
'docbookXsltVersion': docbookXsltVersion,
Expand Down
21 changes: 11 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
org.gradle.jvmargs=-Xmx16g -Dfile.encoding=UTF-8
#systemProp.xml.catalog.logging=cache:warn
systemProp.xml.catalog.additions=jar:file:build/docbook-xslTNG-2.0.10.zip!/docbook-xslTNG-2.0.10/xslt/catalog.xml
systemProp.test.this=myuser

docbookXsltVersion=2.0.10
docbookXsltVersion=2.0.16

xmlresolverVersion=5.1.0
xmlresolverVersion=5.2.2
xmlCalabashVersion=1.5.3-110

docbookBaseVersion=5.2
docbookVersion=5.2CR5
docbookVersion=5.2CS01

saxonVersion=11.5
saxonVersion=12.4
saxonEE=true

defguideBookVersion=5.2.16
defguideBookVersion=5.2.18
defguideRnd=src/lib/defguide.rnd

publishersBookVersion=1.3.10
publishersBookVersion=1.3.12
publishersRnd=src/lib/publishers.rnd

sdocbookBookVersion=0.9.7
sdocbookBookVersion=0.9.9
sdocbookRnd=src/lib/sdocbook.rnd

slidesBookVersion=0.9.7
slidesBookVersion=0.9.9
slidesRnd=src/lib/slides.rnd

websiteBookVersion=0.9.7
websiteBookVersion=0.9.9
websiteRnd=src/lib/website.rnd
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
9 changes: 9 additions & 0 deletions src/defguide/ch00-online.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
<citetitle>DocBook 5: The Definitive Guide</citetitle>. It describes
the DocBook V5.2 schema, currently version <?docbookVersion?>.</para>

<para>You can get the latest version of the DocBook reference books
and the DocBook sources for them from
<link xlink:href="https://github.com/docbook/defguide/"/>.</para>

<para>The current
<link xlink:href="http://oreilly.com/catalog/9780596805012/">O'Reilly
edition</link> covers DocBook V5.0, the OASIS Standard.</para>
Expand Down Expand Up @@ -524,6 +528,11 @@ that points to it.</para>
<para>The <tag>arc</tag> and <tag>locator</tag> elements will be dropped; instead
<tag>link</tag> will be allowed in <tag>extendedlink</tag>.</para>
</listitem>
<listitem>
<para>The <tag>indexterm</tag> elements will be removed from <tag>primary</tag>,
<tag>secondary</tag>, and <tag>tertiary</tag>. Nested index terms are not supported.
</para>
</listitem>
</orderedlist>
</section>

Expand Down
48 changes: 6 additions & 42 deletions src/defguide/ch00.xml
Original file line number Diff line number Diff line change
Expand Up @@ -299,55 +299,19 @@ is a complete reference to every element in the DocBook
<para>Safari offers a solution that’s better than e-books. It’s a virtual
library that lets you easily search thousands of top tech books, cut and
paste code samples, download chapters, and find quick answers when you
need the most accurate, current information. Try it for free at <link
role="orm:hideurl:ital"
xlink:href="http://my.safaribooksonline.com/?portal=oreilly">http://my.safaribooksonline.com</link>.</para>
need the most accurate, current information. Try it for free at
<link xlink:href="https://safaribooksonline.com/">https://safaribooksonline.com/</link>.</para>
</section>

<section>
<title>How to Contact Us</title>

<para>Please address comments and questions concerning this book to the
publisher:</para>

<simplelist type="vert">
<member>O’Reilly Media, Inc.</member>

<member>1005 Gravenstein Highway North</member>

<member>Sebastopol, CA 95472</member>

<member>800-998-9938 (in the United States or Canada)</member>

<member>707-829-0515 (international or local)</member>

<member>707 829-0104 (fax)</member>
</simplelist>

<para>We have a web page for this book, where we list errata, examples,
and any additional information. You can access this page at:</para>

<simplelist type="vert">
<member><link
xlink:href="http://www.oreilly.com/catalog/&lt;catalog page&gt;"></link></member>
</simplelist>

<remark>Don’t forget to update the &lt;url&gt; attribute, too.</remark>

<para>To comment or ask technical questions about this book, send email
to:</para>

<simplelist type="vert">
<member><email>[email protected]</email></member>
</simplelist>

<para>For more information about our books, conferences, Resource Centers,
and the O’Reilly Network, see our web site at:</para>

<simplelist type="vert">
<member><link xlink:href="http://www.oreilly.com"></link></member>
</simplelist>
author. If you believe you’ve found an error or ommission, please consider
<link xlink:href="https://github.com/docbook/defguide/issues">opening an issue</link>.
</para>
</section>

<section>
<title>Acknowledgments</title>

Expand Down
24 changes: 16 additions & 8 deletions src/refpages/elements/primary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,24 @@
<?tdg-refsynopsisdiv?>

<refsection condition="ref.description">
<title>Description</title><para>In an <tag>indexterm</tag>, <tag>primary</tag>
identifies the most significant word or words in the entry. All
<tag>indexterm</tag>s must have a
<tag>primary</tag>.</para>
<title>Description</title>

<refsection><info><title>Processing expectations</title></info>

<para>In an <tag>indexterm</tag>, <tag>primary</tag> identifies the
most significant word or words in the entry. All <tag>indexterm</tag>s
must have a <tag>primary</tag>.</para>

<important>
<para>In DocBook 5.x, a <tag>primary</tag> may contain nested
<tag>indexterm</tag> elements. This is unsupported and will be removed
in DocBook V6.0.</para>
</important>

<refsection>
<title>Processing expectations</title>

<para>Suppressed. This element provides data for processing but it is
not rendered in the primary flow of text.</para>

<para>Suppressed. This element provides data for processing but it is
not rendered in the primary flow of text.</para>
</refsection>

<?tdg-attributes?>
Expand Down
44 changes: 27 additions & 17 deletions src/refpages/elements/secondary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,33 @@
<?tdg-refsynopsisdiv?>

<refsection condition="ref.description">
<title>Description</title><para>A <tag>secondary</tag> contains a secondary word or phrase
in an <tag>indexterm</tag>. The text of a <tag role="keep-together">secondary</tag> term is less significant than
the <tag>primary</tag> term, but more significant than the
<tag role="keep-together">tertiary</tag> term for sorting and
display purposes.</para>

<para>In <tag>indexterm</tag>s, you can only have one primary,
secondary, and tertiary term. If you want to index multiple secondary
terms for the same primary, you must repeat the primary in another
<tag>indexterm</tag>. You cannot place several
<tag>secondary</tag>s in the same primary.</para>

<refsection><info><title>Processing expectations</title></info>


<para>Suppressed. This element provides data for processing but is not
rendered in the primary flow of text.</para>
<title>Description</title>

<para>A <tag>secondary</tag> contains a secondary word or phrase in an
<tag>indexterm</tag>. The text of a <tag
role="keep-together">secondary</tag> term is less significant than the
<tag>primary</tag> term, but more significant than the <tag
role="keep-together">tertiary</tag> term for sorting and display
purposes.</para>

<para>In <tag>indexterm</tag>s, you can only have one primary,
secondary, and tertiary term. If you want to index multiple secondary
terms for the same primary, you must repeat the primary in another
<tag>indexterm</tag>. You cannot place several
<tag>secondary</tag>s in the same primary.</para>

<important>
<para>In DocBook 5.x, a <tag>secondary</tag> may contain nested
<tag>indexterm</tag> elements. This is unsupported and will be removed
in DocBook V6.0.</para>
</important>

<refsection>
<title>Processing expectations</title>

<para>Suppressed. This element provides data for processing but is not
rendered in the primary flow of text.</para>

</refsection>

<?tdg-attributes?>
Expand Down
52 changes: 30 additions & 22 deletions src/refpages/elements/tertiary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,36 @@
<?tdg-refsynopsisdiv?>

<refsection condition="ref.description">
<title>Description</title><para>A <tag>tertiary</tag> element contains a third-level word
or phrase in an <tag>indexterm</tag>. The text of a
<tag>tertiary</tag> term is less significant than the
<tag>primary</tag> and <tag>secondary</tag> terms for
sorting and display purposes.</para>

<para>DocBook does not define any additional levels. You cannot use
<tag>indexterm</tag>s to construct indexes with more than three
levels without extending the schema.</para>

<para>In <tag>indexterm</tag>s, you can only have one primary,
secondary, and tertiary term. If you want to index multiple tertiary
terms for the same primary and secondary, you must repeat the primary
and secondary in another <tag>indexterm</tag>. You cannot place
several <tag>tertiary</tag>s in the same primary.</para>

<refsection><info><title>Processing expectations</title></info>


<para>Suppressed. This element provides data for processing but is not
rendered in the <phrase role="keep-together">primary</phrase> flow of
text.</para>
<title>Description</title>

<para>A <tag>tertiary</tag> element contains a third-level word or
phrase in an <tag>indexterm</tag>. The text of a <tag>tertiary</tag>
term is less significant than the <tag>primary</tag> and
<tag>secondary</tag> terms for sorting and display purposes.</para>

<para>DocBook does not define any additional levels. You cannot use
<tag>indexterm</tag>s to construct indexes with more than three
levels without extending the schema.</para>

<para>In <tag>indexterm</tag>s, you can only have one primary,
secondary, and tertiary term. If you want to index multiple tertiary
terms for the same primary and secondary, you must repeat the primary
and secondary in another <tag>indexterm</tag>. You cannot place
several <tag>tertiary</tag>s in the same primary.</para>

<important>
<para>In DocBook 5.x, a <tag>primary</tag> may contain nested
<tag>indexterm</tag> elements. This is unsupported and will be removed
in DocBook V6.0.</para>
</important>

<refsection>
<title>Processing expectations</title>

<para>Suppressed. This element provides data for processing but is not
rendered in the <phrase role="keep-together">primary</phrase> flow of
text.</para>

</refsection>

<?tdg-attributes?>
Expand Down
12 changes: 4 additions & 8 deletions src/refpages/examples/procedure.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@

<procedure><title>An Example Procedure</title>
<step>
<para> A Step
</para>
<para>A Step</para>
</step>
<step>
<para> Another Step
</para>
<para>Another Step</para>
<substeps>
<step>
<para> Substeps can be nested indefinitely deep.
</para>
<para>Substeps can be nested indefinitely deep.</para>
</step>
</substeps>
</step>
<step>
<para> A Final Step
</para>
<para>A Final Step</para>
</step>
</procedure>

Expand Down
23 changes: 23 additions & 0 deletions src/resources/css/defguide.css
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,10 @@ li .sincerev {
line-height: 1.25em;
}

.pagetoc .sincerev {
display: none;
}

/* ============================================================ */

.cmjs {
Expand Down Expand Up @@ -269,6 +273,25 @@ nav .title {
background-color: inherit;
}

html.js .pagetoc {
font-family: var(--title-family), sans-serif;
}

html.js .pagebody .tocwrapper {
font-size: 80%;
overflow: scroll;
margin-bottom: 6rem;
}

html.js .pagebody .pagetoc .ctrl {
top: 2rem;
}

.pagetoc a,
.pagetoc a:visited {
color: black;
}

.infofooter {
padding-top: 0.5rem;
font-size: 14px;
Expand Down
Loading