Skip to content

Commit

Permalink
Rename "contentsTree" element to "contents"
Browse files Browse the repository at this point in the history
For consistency; this was the only element using camelCase.

Signed-off-by: Ulrich Müller <[email protected]>
  • Loading branch information
ulm committed Nov 9, 2024
1 parent 906455c commit 754d52d
Show file tree
Hide file tree
Showing 24 changed files with 34 additions and 34 deletions.
4 changes: 2 additions & 2 deletions appendices/devbook-guide/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ tag. Note that the trailing slash in the <c>href</c> value is mandatory.
</p>

<p>
A table of contents can be generated with <c>&lt;contentsTree&gt;</c>.
A table of contents can be generated with <c>&lt;contents/&gt;</c>.
Typically, this would be the only element in its own section body, as in
the following example:
</p>
Expand All @@ -134,7 +134,7 @@ the following example:
&lt;section&gt;
&lt;title&gt;Contents&lt;/title&gt;
&lt;body&gt;
&lt;contentsTree/&gt;
&lt;contents/&gt;
&lt;/body&gt;
&lt;/section&gt;
</codesample>
Expand Down
2 changes: 1 addition & 1 deletion appendices/editor-configuration/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ with ebuilds.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion appendices/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This section incorporates various auxiliary documents which may be useful as a r
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion appendices/todo-list/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
This TODO list is automatically generated from the <c>&lt;todo&gt;</c> directives in other documents.
</p>

<contentsTree root="" extraction="todo"/>
<contents root="" extraction="todo"/>
</body>
</chapter>
</devbook>
2 changes: 1 addition & 1 deletion archs/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ happens to work best in any situation.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion depend.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<xsl:template match="/">
<xsl:variable name="refs">
<!-- all descendants -->
<xsl:call-template name="contentsTree"/>
<xsl:call-template name="contents"/>
<!-- all ancestors -->
<xsl:call-template name="printParentDocs"/>
<!-- previous and next documents -->
Expand Down
4 changes: 2 additions & 2 deletions devbook.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ subsubsection = element subsubsection { title, body }
# Title texts are used as anchors, so allow only text attributes
title = element title { attrib }

body = element body { (authors | contentsTree | block.class)+ }
body = element body { (authors | contents | block.class)+ }

authors = element authors { author+ | authorlist+ }

Expand All @@ -48,7 +48,7 @@ authorlist = element authorlist {
attribute href { text }
}

contentsTree = element contentsTree {
contents = element contents {
attribute maxdepth { xsd:unsignedInt }?,
attribute root { text }?,
attribute extraction { text }?
Expand Down
6 changes: 3 additions & 3 deletions devbook.rng
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<oneOrMore>
<choice>
<ref name="authors"/>
<ref name="contentsTree"/>
<ref name="contents"/>
<ref name="block.class"/>
</choice>
</oneOrMore>
Expand Down Expand Up @@ -169,8 +169,8 @@
<attribute name="href"/>
</element>
</define>
<define name="contentsTree">
<element name="contentsTree">
<define name="contents">
<element name="contents">
<optional>
<attribute name="maxdepth">
<data type="unsignedInt"/>
Expand Down
12 changes: 6 additions & 6 deletions devbook.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@
</xsl:template>

<!-- TOC Tree -->
<xsl:template match="contentsTree" name="contentsTree">
<xsl:template match="contents" name="contents">
<xsl:param name="depth" select="0"/>
<xsl:param name="maxdepth">
<xsl:choose>
Expand Down Expand Up @@ -463,7 +463,7 @@
<xsl:for-each select="document($doc_self)/devbook/include">
<count value="{count(document(concat($path, @href, 'text.xml'))//*[name()=$extraction])}"
path="{concat($path, @href)}">
<xsl:call-template name="contentsTree">
<xsl:call-template name="contents">
<xsl:with-param name="depth" select="$depth + 1"/>
<xsl:with-param name="maxdepth" select="$maxdepth"/>
<xsl:with-param name="path" select="concat($path, @href)"/>
Expand All @@ -479,7 +479,7 @@
<ul>
<xsl:for-each select="document($doc_self)/devbook/include">
<xsl:variable name="extraction_counter_node">
<xsl:call-template name="contentsTree">
<xsl:call-template name="contents">
<xsl:with-param name="depth" select="$depth + 1"/>
<xsl:with-param name="maxdepth" select="$maxdepth"/>
<xsl:with-param name="path" select="concat($path, @href)"/>
Expand Down Expand Up @@ -513,7 +513,7 @@
</xsl:for-each>
</ul>
</xsl:if>
<xsl:call-template name="contentsTree">
<xsl:call-template name="contents">
<xsl:with-param name="depth" select="$depth + 1"/>
<xsl:with-param name="maxdepth" select="$maxdepth"/>
<xsl:with-param name="path" select="concat($path, @href)"/>
Expand Down Expand Up @@ -637,11 +637,11 @@
<xsl:if test="/devbook/include">
<li class="divider"><xsl:comment/></li>
<!-- List any sub-documents included at first level.
We cannot call "contentsTree" directly, because it would
We cannot call "contents" directly, because it would
insert another "ul" element. So, assign it to a variable,
then copy only the "li" nodes. -->
<xsl:variable name="contents">
<xsl:call-template name="contentsTree">
<xsl:call-template name="contents">
<xsl:with-param name="maxdepth" select="1"/>
</xsl:call-template>
</xsl:variable>
Expand Down
2 changes: 1 addition & 1 deletion ebuild-maintenance/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ familiar with.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/functions/src_compile/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ The following subsections cover different topics which often occur when writing
<c>src_compile</c> functions.
</p>

<contentsTree/>
<contents/>
</body>
</section>

Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/functions/src_configure/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ The following subsections cover different topics which often occur when writing
<c>src_configure</c> functions.
</p>

<contentsTree/>
<contents/>
</body>
</section>

Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/functions/src_install/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ The following subsections cover different topics which often occur when writing
<c>src_install</c> functions.
</p>

<contentsTree/>
<contents/>

</body>
</section>
Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/functions/src_prepare/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The following subsections cover different topics which often occur
when writing <c>src_prepare</c> functions.
</p>

<contentsTree/>
<contents/>
</body>
</section>

Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/functions/src_unpack/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ The following subsections cover different topics which often occur when writing
<c>src_unpack</c> functions.
</p>

<contentsTree/>
<contents/>
</body>
</section>

Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/functions/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ during the <c>src_compile</c> phase is equivalent to a call to the
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/misc-files/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This section contains some notes on various miscellaneous files.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion ebuild-writing/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ with some general notes and extended examples.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion function-reference/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following functions are available for use in ebuilds:
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion general-concepts/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ writing ebuilds or working with the Gentoo repository.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>

Expand Down
2 changes: 1 addition & 1 deletion profiles/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Portage-specific behaviour must not be relied upon in the repository.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion tasks-reference/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ebuilds.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
4 changes: 2 additions & 2 deletions text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ section lists specific contributions to this manual.
<section>
<title>Contents</title>
<body>
<contentsTree maxdepth="1"/>
<contents maxdepth="1"/>
</body>
</section>

<section>
<title>Full contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down
2 changes: 1 addition & 1 deletion tools-reference/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ when using these tools in ebuilds.
<section>
<title>Contents</title>
<body>
<contentsTree/>
<contents/>
</body>
</section>
</chapter>
Expand Down

0 comments on commit 754d52d

Please sign in to comment.