You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Brian Denny <br...@briandenny.net> on 2003/11/14 06:28:49 UTC
New [PATCH] Re: Suggestion for book TOC: one level deeper
On Tue, Nov 11, 2003 at 07:34:28PM -0800, Brian Denny wrote:
> My patch merely sets an XSL customization property that is already
> defined by the existing docbook-xsl stylesheets. However, it is
> possible to define an XSL customization layer that overrides entire
> XSL templates. I am 99% sure that it is possible to get what we want
> this way, without touching the XML. It's just a question of how (and
> how much work). If I knew more XSL I probably would have done it
> already. Maybe I'll look into it some more.
Okay, I looked into it some more. Revision 7740 paved the way for the
following patch, which I think does exactly what we want. (If we added
refentrys elsewhere that we *didn't* want to appear in the TOC, then we
would have to rethink this approach.) Opinions?
Log:
Customize the book's HTML stylesheets so that <refentry> elements
which are children of <sect1> or <sect2> elements are represented
in the Table of Contents.
Index: doc/book/tools/html-stylesheet.xsl
===================================================================
--- doc/book/tools/html-stylesheet.xsl (revision 7740)
+++ doc/book/tools/html-stylesheet.xsl (working copy)
@@ -3,5 +3,26 @@
<xsl:import href="xsl/html/docbook.xsl"/>
<xsl:param name="html.stylesheet">styles.css</xsl:param>
+ <xsl:param name="toc.section.depth">3</xsl:param>
+ <xsl:param name="annotate.toc">0</xsl:param>
+ <xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="sect2|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="sect2" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="sect3|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:template>
+
</xsl:stylesheet>
Index: doc/book/tools/chunk-stylesheet.xsl
===================================================================
--- doc/book/tools/chunk-stylesheet.xsl (revision 7740)
+++ doc/book/tools/chunk-stylesheet.xsl (working copy)
@@ -3,5 +3,26 @@
<xsl:import href="xsl/html/chunk.xsl"/>
<xsl:param name="html.stylesheet">styles.css</xsl:param>
+ <xsl:param name="toc.section.depth">3</xsl:param>
+ <xsl:param name="annotate.toc">0</xsl:param>
+ <xsl:template match="sect1" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="sect2|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:template>
+
+ <xsl:template match="sect2" mode="toc">
+ <xsl:param name="toc-context" select="."/>
+
+ <xsl:call-template name="subtoc">
+ <xsl:with-param name="toc-context" select="$toc-context"/>
+ <xsl:with-param name="nodes"
+ select="sect3|refentry|bridgehead[$bridgehead.in.toc != 0]"/>
+ </xsl:call-template>
+ </xsl:template>
+
</xsl:stylesheet>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Another book suggestion: an index, or an appendix of magic properties
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Nov 14, 2003, at 8:30 PM, Eric Hanchrow wrote:
>
> I'm constantly forgetting the proper spelling of certain magic
> properties -- is it "svn:eol-style" or "svn:eolstyle"; and are the
> magic values "native", "unix", or what? It'd be nice if there were
> an index in which I could look up "properties", or at least (yet)
> another appendix with all the magic properties.
How about the output of 'svn help pset'? It seems to contain what
you're looking for.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Another book suggestion: an index, or an appendix of magic properties
Posted by "B. W. Fitzpatrick" <fi...@red-bean.com>.
"John R. Daily" <jo...@geekhavoc.com> writes:
> At (time_t)758021483 Eric Hanchrow wrote:
>
> > ...It'd be nice if there were
> > an index in which I could look up "properties", or at least (yet)
> > another appendix with all the magic properties.
>
> Seems like a good time to ask: are there any plans for an index?
>
> Certainly it's a tedious task to add the markup, but the DocBook
> stylesheets I've used in the past do a nice job generating an
> index.
AFAIK, O'Reilly will do the indexing footwork for us, and we'll have to
integrate it back into our tree when they're done.
-Fitz
--
Brian W. Fitzpatrick <fi...@red-bean.com> http://www.red-bean.com/fitz/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Another book suggestion: an index, or an appendix of magic properties
Posted by "John R. Daily" <jo...@geekhavoc.com>.
At (time_t)758021483 Eric Hanchrow wrote:
> ...It'd be nice if there were
> an index in which I could look up "properties", or at least (yet)
> another appendix with all the magic properties.
Seems like a good time to ask: are there any plans for an index?
Certainly it's a tedious task to add the markup, but the DocBook
stylesheets I've used in the past do a nice job generating an
index.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Another book suggestion: an index, or an appendix of magic
properties
Posted by Eric Hanchrow <of...@blarg.net>.
I'm constantly forgetting the proper spelling of certain magic
properties -- is it "svn:eol-style" or "svn:eolstyle"; and are the
magic values "native", "unix", or what? It'd be nice if there were
an index in which I could look up "properties", or at least (yet)
another appendix with all the magic properties.
As it stands now, I point my browser to
http://svnbook.red-bean.com/book.html (600 Kb) and just search.
--
The whole point of loud music is to make it possible
to date without talking.
-- Roger Ebert
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: New [PATCH] Re: Suggestion for book TOC: one level deeper
Posted by Brian Denny <br...@briandenny.net>.
On Fri, Nov 14, 2003 at 09:49:03AM -0500, mark benedetto king wrote:
> > following patch, which I think does exactly what we want. (If we added
> > refentrys elsewhere that we *didn't* want to appear in the TOC, then we
> > would have to rethink this approach.) Opinions?
>
> +1
>
> This approach satisfies my earlier concerns (with the same caveat
> about future refentrys that you state above).
Committed in r7756.
-brian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: New [PATCH] Re: Suggestion for book TOC: one level deeper
Posted by mark benedetto king <mb...@lowlatency.com>.
On Thu, Nov 13, 2003 at 10:28:49PM -0800, Brian Denny wrote:
> On Tue, Nov 11, 2003 at 07:34:28PM -0800, Brian Denny wrote:
> > My patch merely sets an XSL customization property that is already
> > defined by the existing docbook-xsl stylesheets. However, it is
> > possible to define an XSL customization layer that overrides entire
> > XSL templates. I am 99% sure that it is possible to get what we want
> > this way, without touching the XML. It's just a question of how (and
> > how much work). If I knew more XSL I probably would have done it
> > already. Maybe I'll look into it some more.
>
> Okay, I looked into it some more. Revision 7740 paved the way for the
> following patch, which I think does exactly what we want. (If we added
> refentrys elsewhere that we *didn't* want to appear in the TOC, then we
> would have to rethink this approach.) Opinions?
+1
This approach satisfies my earlier concerns (with the same caveat
about future refentrys that you state above).
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org