From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: /, bin/
Date: Sat, 14 Dec 2019 10:46:40 +0000 (UTC) [thread overview]
Message-ID: <1576058540.12fb6e610b2ed3f486ff3a6eb397f5eae0811e5d.ulm@gentoo> (raw)
commit: 12fb6e610b2ed3f486ff3a6eb397f5eae0811e5d
Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 11 10:02:20 2019 +0000
Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Wed Dec 11 10:02:20 2019 +0000
URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=12fb6e61
devbook.xsl: Support class="list-group" in <ul> element.
This replaces <list-group-d>, which was only used for the list of
eclasses. Remove <list-group-u> which was unused.
Update devbook.dtd and bin/gen-eclass-html.sh accordingly.
Generated output in eclass-reference/index.html is identical as
before, except for an (intentionally) removed empty line before the
closing </div>.
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
bin/gen-eclass-html.sh | 8 ++++----
devbook.dtd | 9 ++++-----
devbook.xsl | 24 +++++++++++++++---------
3 files changed, 23 insertions(+), 18 deletions(-)
diff --git a/bin/gen-eclass-html.sh b/bin/gen-eclass-html.sh
index 9705d04..e7a72ab 100755
--- a/bin/gen-eclass-html.sh
+++ b/bin/gen-eclass-html.sh
@@ -135,16 +135,16 @@ installed by emerging <c>app-portage/eclass-manpages</c>.
<section>
<title>Contents</title>
<body>
-<list-group-d>
+<ul class="list-group">
EOF
for i in $(find $OUTPUTDIR/ -maxdepth 1 -mindepth 1 -type d | sort); do
- echo "<uri link=\"$(basename $i)/index.html\">$(basename $i) Reference</uri>" >> ${OUTPUTDIR}/text.xml
+ echo "<li><uri link=\"$(basename $i)/index.html\">$(basename $i) Reference</uri></li>" >> ${OUTPUTDIR}/text.xml
done
cat << EOF >> ${OUTPUTDIR}/text.xml
-
-</list-group-d></body>
+</ul>
+</body>
</section>
</chapter>
</guide>
diff --git a/devbook.dtd b/devbook.dtd
index 96d1c9d..dac1815 100644
--- a/devbook.dtd
+++ b/devbook.dtd
@@ -5,8 +5,7 @@
<!-- Based on common.dtd from GuideXML -->
<!ENTITY % block.class "p|pre|codesample|note|important|warning|todo
- |figure|table|ul|ol|dl
- |list-group-u|list-group-d">
+ |figure|table|ul|ol|dl">
<!ENTITY % inline.class "sup|sub|b|c|d|e|path|uri">
<!ENTITY % all.class "%block.class;|%inline.class;">
@@ -75,7 +74,10 @@
align (left|center|right) "left">
<!ELEMENT ul (li)+>
+<!ATTLIST ul class CDATA #IMPLIED>
+
<!ELEMENT ol (li)+>
+
<!ELEMENT li (#PCDATA|%all.class;)*>
<!ELEMENT dl (dt, dd)+>
@@ -83,9 +85,6 @@
<!-- The following is strange, but devbook.xsl expects only p elements -->
<!ELEMENT dd (p)+>
-<!ELEMENT list-group-u (#PCDATA|%all.class;)*>
-<!ELEMENT list-group-d (#PCDATA|%all.class;)*>
-
<!ELEMENT sup (#PCDATA|%inline.class;)*>
<!ELEMENT sub (#PCDATA|%inline.class;)*>
<!ELEMENT b (#PCDATA|%inline.class;)*>
diff --git a/devbook.xsl b/devbook.xsl
index cadd975..94cbf96 100644
--- a/devbook.xsl
+++ b/devbook.xsl
@@ -204,15 +204,21 @@
</xsl:template>
<xsl:template match="ul">
- <ul><xsl:apply-templates/></ul>
- </xsl:template>
-
- <xsl:template match="list-group-d">
- <div class="list-group"><xsl:apply-templates><xsl:with-param name="class">list-group-item</xsl:with-param></xsl:apply-templates></div>
- </xsl:template>
-
- <xsl:template match="list-group-u">
- <ul class="list-group"><xsl:apply-templates><xsl:with-param name="class">list-group-item</xsl:with-param></xsl:apply-templates></ul>
+ <xsl:choose>
+ <xsl:when test="@class='list-group'">
+ <div class="list-group">
+ <xsl:for-each select="li">
+ <xsl:apply-templates>
+ <xsl:with-param name="class">list-group-item</xsl:with-param>
+ </xsl:apply-templates>
+ <xsl:value-of select='$newline'/>
+ </xsl:for-each>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <ul><xsl:apply-templates/></ul>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- Definition Lists -->
next reply other threads:[~2019-12-14 10:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-14 10:46 Ulrich Müller [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-29 11:19 [gentoo-commits] proj/devmanual:master commit in: /, bin/ Ulrich Müller
2023-10-05 19:00 Ulrich Müller
2022-03-26 19:12 Ulrich Müller
2020-02-28 6:26 Ulrich Müller
2020-01-22 18:24 Ulrich Müller
2019-12-19 21:02 Göktürk Yüksek
2019-12-16 6:45 Ulrich Müller
2019-03-22 18:51 Brian Evans
2019-03-22 13:27 Brian Evans
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=1576058540.12fb6e610b2ed3f486ff3a6eb397f5eae0811e5d.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