From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: appendices/devbook-guide/
Date: Wed, 15 Jan 2020 21:29:59 +0000 (UTC) [thread overview]
Message-ID: <1579123724.a8c06515b2da4df8a858e21c72ce446dd6abd998.ulm@gentoo> (raw)
commit: a8c06515b2da4df8a858e21c72ce446dd6abd998
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 11 08:33:46 2020 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 15 21:28:44 2020 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=a8c06515
devbook-guide: Update basic document structure for DevBook XML.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
appendices/devbook-guide/text.xml | 150 +++++++++++++-------------------------
1 file changed, 51 insertions(+), 99 deletions(-)
diff --git a/appendices/devbook-guide/text.xml b/appendices/devbook-guide/text.xml
index 453820e..025a8b1 100644
--- a/appendices/devbook-guide/text.xml
+++ b/appendices/devbook-guide/text.xml
@@ -39,135 +39,87 @@ tags used in a GuideXML document:
<codesample lang="sgml"><!-- The initial part of a guide XML document -->
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header$ -->
-
-<guide lang="en">
-<title>Gentoo Documentation Guide</title>
-
-<author title="Author">
- <mail link="yourname@gentoo.org">Your Name</mail>
-</author>
-
-<abstract>
-This guide shows you how to compose web documentation using
-our new lightweight Gentoo GuideXML syntax. This syntax is the official
-format for Gentoo web documentation, and this document itself was created
-using GuideXML.
-</abstract>
-
-<!-- The content of this document is licensed under the CC-BY-SA license -->
-<!-- See https://creativecommons.org/licenses/by-sa/3.0 -->
-<license version="3.0"/>
-
-<version>1</version>
-<date>2011-11-29</date>
+<guide self="appendices/devbook-guide/">
+<chapter>
+<title>Gentoo GuideXML Guide</title>
</codesample>
<p>
On the first lines, we see the requisite tag that identifies this as an XML
-document and specifies its DTD. The <c><!-- $Header$ --></c> line
-will be automatically modified by the CVS server and helps to track revisions.
-Next, there's a <c><guide></c> tag <d/> the entire guide document is
-enclosed within a <c><guide> </guide></c> pair.
-</p>
-
-<p>
-The <c>lang</c> attribute should be used to specify the language code of your
-document. It is used to format the date and insert strings like "<e>Note</e>",
-"<e>Content</e>", etc. in the specified language. The default is English.
-</p>
-
-<p>
-Next, there's a <c><title></c> tag, used to set the title for the entire
-guide document.
+document. Next, there's a <c><guide></c> tag <d/> the entire document is
+enclosed within a <c><guide> </guide></c> pair. Its <c>self</c>
+attribute must point to the relative path of the document from the root node;
+in the example above the path is <c>appendices/devbook-guide/</c>. An exception
+is the root node itself, which has <c><guide root="true"></c> instead.
</p>
<p>
-Then, we come to the <c><author></c> tags, which contain information
-about the various authors of the document. Each <c><author></c> tag
-allows for an optional <c>title</c> element, used to specify the author's
-relationship to the document (author, co-author, editor, etc.). In this
-particular example, the authors' names are enclosed in another tag <d/> a
-<c><mail></c> tag, used to specify an email address for this particular
-person. The <c><mail></c> tag is optional and can be omitted, and at
-least one <c><author></c> element is required per guide document.
+Next, there is a <c><chapter></c> tag. Every document must have exactly
+one chapter. Its <c><title></c> is used to set the title for the entire
+document.
</p>
-<p>
-Next, we come to the <c><abstract></c>, <c><version></c> and
-<c><date></c> tags, used to specify a summary of the document, the
-current version number, and the current version date (in YYYY-MM-DD format)
-respectively. Dates that are invalid or not in the YYYY-MM-DD format will
-appear verbatim in the rendered document.
-</p>
+<important>
+The <c><title></c> element cannot contain any newlines. Make sure it is
+in one line, including its opening and closing tags.
+</important>
<p>
-This sums up the tags that should appear at the beginning of a guide document.
-Besides the <c><title></c> and <c><mail></c> tags, these tags
-shouldn't appear anywhere else except immediately inside the
-<c><guide></c> tag, and for consistency it's recommended (but not
-required) that these tags appear before the content of the document.
+All tags must be closed of course, so the document ends with:
</p>
-<p>
-Finally we have the <c><license version="3.0"/></c> tag, used to publish
-the document under the <uri link="https://creativecommons.org/licenses/by-sa/3.0/">Creative
-Commons - Attribution / Share Alike</uri> license as required by the <uri
-link="/proj/en/gdp/doc/doc-policy.xml">Documentation Policy</uri>. Historically,
-the tag <c><license /></c> was used, which denoted the 2.5 version of the
-license. This is still accepted/allowed.
-</p>
+<codesample lang="sgml">
+</chapter>
+</guide>
+</codesample>
</body>
</subsection>
<subsection>
-<title>Chapters and sections</title>
+<title>Sections and subsections</title>
<body>
<p>
Once the initial tags have been specified, you're ready to start adding the
-structural elements of the document. Guide documents are divided into
-chapters, and each chapter can hold one or more sections. Every chapter and
-section has a title. Here's an example chapter with a single section,
-consisting of a paragraph. If you append this XML to the XML in the <uri
-link="#doc_chap2_pre1">previous excerpt</uri> and append a
-<c></guide></c> to the end of the file, you'll have a valid (if minimal)
-guide document:
+structural elements of the document. Chapters are divided into sections;
+each section can hold zero or more subsections, which can contain zero or more
+subsubsections. Section, subsection and subsubsection elements must have a
+title. Here's an example section with a single subsection, consisting of a
+paragraph:
</p>
<codesample lang="sgml"><!-- Minimal guide example -->
-<chapter>
-<title>This is my chapter</title>
<section>
-<title>This is section one of my chapter</title>
+<title>This is my section</title>
+<subsection>
+<title>This is subsection one of my section</title>
<body>
<p>
-This is the actual text content of my section.
+This is the actual text content of my subsection.
</p>
</body>
+</subsection>
</section>
-</chapter>
</codesample>
<p>
-Above, I set the chapter title by adding a child <c><title></c>
-element to the <c><chapter></c> element. Then, I created a section by
-adding a <c><section></c> element. If you look inside the
-<c><section></c> element, you'll see that it has two child elements <d/> a
-<c><title></c> and a <c><body></c>. While the <c><title></c>
-is nothing new, the <c><body></c> is <d/> it contains the actual text
-content of this particular section. We'll look at the tags that are allowed
-inside a <c><body></c> element in a bit.
+Above, I set the section title by adding a child <c><title></c> element
+to the <c><section></c> element. Then, I created a subsection by adding
+a <c><subsection></c> element. If you look inside the
+<c><subsection></c> element, you'll see that it has two child elements
+<d/> a <c><title></c> and a <c><body></c>. While the
+<c><title></c> is nothing new, the <c><body></c> is <d/>
+it contains the actual text content of this particular subsection. We'll look
+at the tags that are allowed inside a <c><body></c> element in a bit.
</p>
<note>
-A <c><guide></c> element must contain at least one <c><chapter></c>
-elements, a <c><chapter></c> must contain at least one
-<c><section></c> elements and a <c><section></c> element must
-contain at least one <c><body></c> element.
+The <c><chapter></c>, <c><section></c>, <c><subsection></c>
+and <c><subsubsection></c>) elements contain a <c><body></c> and/or
+any number of section elements of the next lower level. Skipping of levels is
+not allowed, e.g., a subsection cannot be directly below a chapter.
</note>
</body>
@@ -502,10 +454,10 @@ GuideXML-tag (both opening as closing), except for:
<p>
<b>Blank lines</b> must be placed immediately after <e>every</e>
<c><body></c> (opening tag only) and before <e>every</e>
-<c><chapter></c>, <c><p></c>, <c><table></c>,
-<c><author></c> (set), <c><pre></c>, <c><ul></c>,
-<c><ol></c>, <c><warning></c>, <c><note></c> and
-<c><important></c> (opening tags only).
+<c><section></c>, <c><p></c>, <c><pre></c>,
+<c><codesample></c>, <c><figure;></c>, <c><table></c>,
+<c><ul></c>, <c><ol></c>, <c><dl></c>, <c><note></c>
+<c><important></c> and <c><warning></c> (opening tags only).
</p>
<p>
@@ -520,10 +472,10 @@ columns to help console users.
<p>
<b>Indentation</b> may not be used, except with the XML-constructs of which the
parent XML-tags are <c><tr></c> (from <c><table></c>),
-<c><ul></c>, <c><ol></c>, <c><dl></c>, and
-<c><author></c>. If indentation is used, it <e>must</e> be two spaces for
-each indentation. That means <e>no tabs</e> and <e>not</e> more spaces.
-Besides, tabs are not allowed in GuideXML documents.
+<c><ul></c>, <c><ol></c> and <c><dl></c>. If indentation
+is used, it <e>must</e> be two spaces for each indentation. That means
+<e>no tabs</e> and <e>not</e> more spaces. Besides, tabs are not allowed in
+GuideXML documents.
</p>
<p>
next reply other threads:[~2020-01-15 21:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-15 21:29 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-31 18:59 [gentoo-commits] proj/devmanual:master commit in: appendices/devbook-guide/ Ulrich Müller
2024-10-25 11:21 Ulrich Müller
2024-05-08 5:57 Ulrich Müller
2023-11-05 16:48 Ulrich Müller
2023-11-05 16:45 Ulrich Müller
2023-10-05 20:29 Ulrich Müller
2022-02-16 18:56 Ulrich Müller
2021-07-31 17:59 Ulrich Müller
2021-03-19 19:23 Ulrich Müller
2021-03-19 19:23 Ulrich Müller
2021-03-19 19:22 Ulrich Müller
2021-03-12 19:32 Ulrich Müller
2021-03-11 11:24 Ulrich Müller
2020-12-14 19:35 Ulrich Müller
2020-08-21 16:53 Ulrich Müller
2020-03-06 16:30 Ulrich Müller
2020-03-06 16:30 Ulrich Müller
2020-03-01 12:32 Ulrich Müller
2020-02-22 21:27 Ulrich Müller
2020-01-28 5:55 Ulrich Müller
2020-01-16 18:50 Ulrich Müller
2020-01-15 22:36 Ulrich Müller
2020-01-15 22:14 Ulrich Müller
2020-01-15 21:30 Ulrich Müller
2020-01-15 21:30 Ulrich Müller
2020-01-15 21:29 Ulrich Müller
2020-01-15 21:29 Ulrich Müller
2020-01-15 21:29 Ulrich Müller
2020-01-15 21:29 Ulrich Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1579123724.a8c06515b2da4df8a858e21c72ce446dd6abd998.ulm@gentoo \
--to=ulm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox