OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Multiple TOC's from a single DocBook XML set of books? One listing just the books, another listing the books with volumes, chapters and articles?


Hi,
The options with pure XML are too limited with set.   The templates that process set 
handle only the enumerated elements set, book, and setindex, as well as the automated 
TOC.  That gives few opportunities to insert any other content, even if it were 
invalid.

The closest I could come was to put a list of xrefs in a legalnotice inside setinfo, 
and change the titlepage handling to process legalnotice onto the second titlepage in 
FO output.  That does require customization of the titlepage template mechanism, which 
does not actually involve XSL programming, just some changes to the XML config file. 
Here are the specifics:

In the XML for the set element, I added this to setinfo:

<legalnotice><title>Book List</title>
  <literallayout>
    <xref linkend="firstbook"/>
    <xref linkend="secondbook"/>
    <xref linkend="thirdbook"/>
  </literallayout>
</legalnotice>

where "firstbook" is a reference to the id attribute on the first book, etc.  This 
will generate the book titles as a simple list when processed.

The default handling of setinfo/legalnotice is to put it on the first titlepage 
(recto).  If that is ok with you, then you are done.  If you want a separate page 
after the titlepage, then customize the titlepage spec file, regenerate the titlepage 
XSL module, and xsl:include that in your customization layer.  For set, that would 
look like:

1.  Remove <legalnotice/> from <t:titlepage-content t:side="recto">.

2.  Add it to verso:

  <t:titlepage-content t:side="verso">
    <legalnotice/>
  </t:titlepage-content>

3.  Create a page break before verso:

  <t:titlepage-before t:side="verso">
      <fo:block break-after="page"/>
  </t:titlepage-before>

The procedure for handling titlepage spec files is described here:

http://www.sagehill.net/docbookxsl/HTMLTitlePage.html

Bob Stayton
Sagehill Enterprises
bobs@sagehill.net


----- Original Message ----- 
From: "Aleksey Tsalolikhin" <atsaloli.tech@gmail.com>
To: <docbook-apps@lists.oasis-open.org>
Sent: Wednesday, December 08, 2010 6:43 PM
Subject: Re: [docbook-apps] Multiple TOC's from a single DocBook XML set of books? One 
listing just the books, another listing the books with volumes, chapters and articles?


Thanks very much for your answer, Bob!

What if I didn't care at all about how the data is presented?  I don't care if
the book TOC is on the same page as the detailed TOC; I don't care if there
are page numbers or not.

I just want a listing of the content; top-level and detailed.  Any way
to do that
with XML alone?

Truly,
-at


On Tue, Dec 7, 2010 at 9:21 AM, Bob Stayton <bobs@sagehill.net> wrote:
> Hi,
> I don't think you can completely avoid delving into XSL to get this done.
> Currently there is no option in the stylesheets to generate such a book
> list. The way you accomplish this depends somewhat on how you want it
> presented.
>
> I can't see how you could do it with XML in the set element. You could
> create xrefs to reference the book ids, but where would you put such xrefs?
> The content model of set is very simple. Also, if you wanted the book list
> in PDF output to have page numbers with dot leaders, then xrefs would not be
> sufficient.
>
> I presume you want the book toc on the same page as the regular toc in PDF
> output. Since the toc has its own page-sequence, you will have to break into
> that template in order to get a book toc on the same page.
>
> I think you will have to customize the template named set.toc in
> fo/autotoc.xsl for FO output, or html/autotoc.xsl for HTML output. I can
> provide more details if you decide to try that.
>
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
>
>
> ----- Original Message ----- From: "Aleksey Tsalolikhin"
> <atsaloli.tech@gmail.com>
> To: <docbook-apps@lists.oasis-open.org>
> Sent: Monday, December 06, 2010 3:23 PM
> Subject: [docbook-apps] Multiple TOC's from a single DocBook XML set of
> books? One listing just the books, another listing the books with volumes,
> chapters and articles?
>
>
>> Hi. I keep my sys admin documentation in a set of DocBook XML books.
>>
>> The default TOC gives me all the books and book parts and chapters and
>> articles and this is fine. I don't need to do anything maintain or
>> futz with the TOC, which is great, 'cause I'm the only sysadmin in my
>> shop and don't have time to mess with it, anyway.
>>
>> Is it possible to add a top-level TOC, to precede this full TOC?
>>
>> I just want the books listed; not the parts of the books; nor the
>> chapters nor articles inside the books. This is for a quick
>> orientation to the contents; THEN I want the full TOC to follow.
>>
>> Is there any way I can do this inside the DocBook XML? For example,
>> in my set.xml ?
>>
>> BTW, my set.xml consists of "setinfo" and lots of include statements,
>> one per book:
>>
>> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"; href="book1.xml"
>> />
>>
>> etc.
>>
>> I hope to avoid having to delve into stylesheet or templates or
>> whatever. I just want to define a 2nd TOC in the XML itself. I want
>> this 2nd TOC to appear both in my HTML and PDF outputs. Is this
>> possible? If not, what would I have to do to get the 2nd TOC?
>>
>> Thanks,
>> Aleksey
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>>
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]