Skip to content

Commit

Permalink
Fixes #119.
Browse files Browse the repository at this point in the history
* Add "set" rootelement to the DAPS User Guide.
* Add "set" rootelement to daps-init.
* Add set templates for Daps.
* Mention "set" in the help of daps-init.

Signed-off-by: Fabian Baumanis <fabian.baumanis@suse.com>
  • Loading branch information
Fabian Baumanis committed Apr 11, 2018
1 parent 864a2b4 commit dd7549c
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 8 deletions.
8 changes: 4 additions & 4 deletions bin/daps-init
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ Options:
the subtitle of the document (<productnumber/> in the document's info
section). Requires --productname.
--rootelement=<article|book>
--rootelement=<article|book|set>
DocBook root element of the example document. Currently supported
are \"book\" and \"article\" (default).
are \"book\", \"article\" (default) and \"set\".
--title=<TITLE>
Title of the document. Default: "DAPS Example"
Expand Down Expand Up @@ -163,10 +163,10 @@ while true ; do
shift 2
;;
--rootelement|-r)
if [[ article = "$2" || book = "$2" ]]; then
if [[ article = "$2" || book = "$2" || "set" = "$2" ]]; then
ROOTELEMENT="$2"
else
exit_on_error "Rootelement must be either \"article\" or \"book\""
exit_on_error "Rootelement must be either \"article\", \"book\" or \"set\""
fi
shift 2
;;
Expand Down
8 changes: 4 additions & 4 deletions doc/xml/daps_user_create.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet
href="urn:x-daps:xslt:profiling:docbook45-profile.xsl"
href="urn:x-daps:xslt:profiling:docbook45-profile.xsl"
type="text/xml"
title="Profiling step"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.docbook.org/xml/4.5/docbookx.dtd"
Expand Down Expand Up @@ -44,9 +44,9 @@
</listitem>
</itemizedlist>
<para>
By default, the initialization script creates a <sgmltag>book</sgmltag> as
example document. With the <option>-r</option> option, you can also set
another root element, such as <sgmltag>article</sgmltag>, for example.
By default, the initialization script creates a <sgmltag>article</sgmltag> as
example document. With the <option>--rootelement</option> option, you can also set
another root element, such as an <sgmltag>book</sgmltag> or a <sgmltag>set</sgmltag>, for example.
</para>
<procedure>
<step>
Expand Down
63 changes: 63 additions & 0 deletions init_templates/MAIN.db4-set.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<set lang="en"><title>Example Set</title>

<book id="book.a">
<title>Example Book 1</title>
<subtitle>generated by DAPS</subtitle>

<bookinfo>
<releaseinfo>Version 0.1</releaseinfo>
<releaseinfo>Revision: 0</releaseinfo>
<date>§§DATE§§</date>
<legalnotice>
<para>
<ulink url="http://www.gnu.org/licenses/fdl-1.3-standalone.html">GNU
Free Documentation License</ulink>
</para>
</legalnotice>
</bookinfo>
<!-- -->
<chapter id="cha.template.examples"><chapterinfo>
<abstract>
<para> You may use this file as a template. For a complete
DocBook reference, see
<citetitle>DocBook: The Definitive Guide</citetitle>
(<ulink url="http://www.docbook.org/tdg51/en/html/docbook.html"/>).
</para>
</abstract>
</chapterinfo>
<title>Examples: the most commonly used DocBook XML constructs</title>
<para>This is an example paragraph.</para>
</chapter>
</book>

<book id="book.b">
<title>Example Book 2</title>
<subtitle>generated by DAPS</subtitle>

<bookinfo>
<releaseinfo>Version 0.1</releaseinfo>
<releaseinfo>Revision: 0</releaseinfo>
<date>§§DATE§§</date>
<legalnotice>
<para>
<ulink url="http://www.gnu.org/licenses/fdl-1.3-standalone.html">GNU
Free Documentation License</ulink>
</para>
</legalnotice>
</bookinfo>
<!-- -->
<chapter id="cha.template.another_example"><chapterinfo>
<abstract>
<para> You may use this file as a template as well. For a complete
DocBook reference, see
<citetitle>DocBook: The Definitive Guide</citetitle>
(<ulink url="http://www.docbook.org/tdg51/en/html/docbook.html"/>).
</para>
</abstract>
</chapterinfo>
<title>Examples: More commonly used DocBook XML constructs</title>
<para>This is an example paragraph.</para>
</chapter>
</book>
</set>
67 changes: 67 additions & 0 deletions init_templates/MAIN.db5-set.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<set xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.1"
xml:lang="en">
<title>Example Set</title>
<info/>

<book xml:id="book.a">
<info>
<title>Example Book 1</title>
<subtitle>generated by DAPS</subtitle>
<releaseinfo>Version 0.1</releaseinfo>
<releaseinfo>Revision: 0</releaseinfo>
<date>§§DATE§§</date>
<legalnotice>
<para>
<link xlink:href="http://www.gnu.org/licenses/fdl-1.3-standalone.html">GNU
Free Documentation License</link>
</para>
</legalnotice>
</info>
<!-- -->
<chapter xml:id="cha.template.examples">
<title>Examples: the most commonly used DocBook XML constructs</title>
<info>
<abstract>
<para> You may use this file as a template. For a complete
DocBook reference, see
<citetitle>DocBook: The Definitive Guide</citetitle>
(<link xlink:href="http://www.docbook.org/tdg51/en/html/docbook.html"/>).
</para>
</abstract>
</info>
<para>This is an example paragraph.</para>
</chapter>
</book>

<book xml:id="book.b">
<info>
<title>Example Book 2</title>
<subtitle>generated by DAPS</subtitle>
<releaseinfo>Version 0.1</releaseinfo>
<releaseinfo>Revision: 0</releaseinfo>
<date>§§DATE§§</date>
<legalnotice>
<para>
<link xlink:href="http://www.gnu.org/licenses/fdl-1.3-standalone.html">GNU
Free Documentation License</link>
</para>
</legalnotice>
</info>
<!-- -->
<chapter xml:id="cha.template.another_example">
<title>Examples: More commonly used DocBook XML constructs</title>
<info>
<abstract>
<para> You may use this file as a template as well. For a complete
DocBook reference, see
<citetitle>DocBook: The Definitive Guide</citetitle>
(<link xlink:href="http://www.docbook.org/tdg51/en/html/docbook.html"/>).
</para>
</abstract>
</info>
<para>This is an example paragraph.</para>
</chapter>
</book>
</set>

0 comments on commit dd7549c

Please sign in to comment.