[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [docbook-apps] Resetting TOCs in a book by article
Could this concept be possible on the fly in a single stylesheet. Basically, a stylesheet that would do matches on all elements which are used in generating the TOC (ie <title>) and despite its XML id value, assign one via the stylesheet as a temporary id in order to generate a valid TOC and leave the XML as-is? David White -----Original Message----- From: stavnstrup@gmail.com [mailto:stavnstrup@gmail.com] On Behalf Of Jens Stavnstrup Sent: Wednesday, February 15, 2006 12:54 PM To: David White Cc: docbook-apps@lists.oasis-open.org Subject: Re: [docbook-apps] Resetting TOCs in a book by article David, One approach, I have used in a slightly similar situation is first to create a merge stylesheet, which prefix each id with a unique tag for each book. I merged a number of books into a set. So all ids in a book was prefixed with bk1- for the first book etc. You can see the result in the generated HTMLHelp, which consist of a number of books. See: http://nc3ta.nc3a.nato.int/website/book.asp?menuid=15&vs=0 Regards, Jens On 2/15/06, Bob Stayton <bobs@sagehill.net> wrote: > Yes, that is the most likely cause. The stylesheets rely heavily on > IDs being unique. Duplicate IDs are not valid XML, of course. Do the > translated sections within the articles also have duplicate IDs? > > I think you will need to make unique IDs to get this to work. Can you > just add the lang to the end of each id attribute? > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "David White" <davidw@kencook.com> > To: "'Bob Stayton'" <bobs@sagehill.net>; > <docbook-apps@lists.oasis-open.org> > Sent: Wednesday, February 15, 2006 9:12 AM > Subject: RE: [docbook-apps] Resetting TOCs in a book by article > > > > Hi Bob, > > > > I've think I might have come to grips with our > situation regarding getting > > article TOCs to work in our book. > > > > All of our articles share the same id's thus there > are tons of duplicates > > the only difference between a french and english > chapter/title is the > > lang="en" or lang="de" attribute. > > > > <book> > > > > <article id="a-10c0fa7-103d1dd5236--7c1e" > lang="en"/> > > > > <article id="a-10c0fa7-103d1dd5236--7c1e" > lang="fr"/> > > > > <article id="a-10c0fa7-103d1dd5236--7c1e" > lang="de"/> > > > > <article id="a-10c0fa7-103d1dd5236--7c1e" > lang="hr"/> > > > > </book> > > > > Will having sevaral articles with matching id's cause > the TOC to not reset > > correctly? > > > > Thanks, > > > > David White > > > > -----Original Message----- > > From: Bob Stayton [mailto:bobs@sagehill.net] > > Sent: Wednesday, February 15, 2006 10:44 AM > > To: David White; docbook-apps@lists.oasis-open.org > > Subject: Re: [docbook-apps] Resetting TOCs in a book > by article > > > > The generate.toc parameter determines where TOCs are > produced. > > > > <xsl:param name="generate.toc"> > > article title,toc > > </xsl:param> > > > > This should produce a TOC for each article, listing > that article's sections. > > It also turns off the book's TOC. > > > > Bob Stayton > > Sagehill Enterprises > > DocBook Consulting > > bobs@sagehill.net > > > > > > ----- Original Message ----- > > From: "David White" <davidw@kencook.com> > > To: <docbook-apps@lists.oasis-open.org> > > Sent: Wednesday, February 15, 2006 8:25 AM > > Subject: [docbook-apps] Resetting TOCs in a book by > article > > > > > > > Hello, > > > > > > I have the following format: > > > > > > <book> > > > > > > <article lang="en"/> > > > > > > <article lang="fr"/> > > > > > > <article lang="de"/> > > > > > > <article lang="hr"/> > > > > > > </book> > > > > > > > > > > > > How can I get a generated TOC for each article to > use > > the corret page > > > numbers? Currently the first TOC generated is used > > for all articles. > > > > > > Any suggestions? > > > > > > David White > > > > > > > > > > > > > > ----------------------------------------------------- > ---------------- > > 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]