DocBook, TOC for 2 different books?
Oxygen general issues.
DocBook, TOC for 2 different books?
Hi guys!
Question about DocBook. In our documentation project we have 2 books that output 2 different pdf files. In the that project, there is a XSL folder which contains the docbook.xsl file. That file helps format our TOC(Table of Content). We found out that when we added a line in the docbook.xsl to change the default section-level from 2 to 3, it of course changed both books to the section-level to 3 for the TOC.
Question: Can I have it so each book has its configuration for the TOC. . .one will have a section-level 3 and the other will be a section-level 2? Will both use the docbook.xsl or separate?
Thanks!
Question about DocBook. In our documentation project we have 2 books that output 2 different pdf files. In the that project, there is a XSL folder which contains the docbook.xsl file. That file helps format our TOC(Table of Content). We found out that when we added a line in the docbook.xsl to change the default section-level from 2 to 3, it of course changed both books to the section-level to 3 for the TOC.
Code: Select all
<xsl:param name="toc.section.depth">3</xsl:param>
Thanks!
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: DocBook, TOC for 2 different books?
Post by sorin_ristache »
Hi,
You can use the same docbook.xsl file for both books if you set the toc.section.depth parameter in each PDF transformation when you start it, in the process that calls the docbook.xsl file. In Oxygen that would be the Parameters dialog box. The value set in the docbook.xsl file is only a default value if no other value is set when the docbook.xsl file is called in the XSLT transformation.
Regards,
Sorin
You can use the same docbook.xsl file for both books if you set the toc.section.depth parameter in each PDF transformation when you start it, in the process that calls the docbook.xsl file. In Oxygen that would be the Parameters dialog box. The value set in the docbook.xsl file is only a default value if no other value is set when the docbook.xsl file is called in the XSLT transformation.
Regards,
Sorin
Re: DocBook, TOC for 2 different books?
Sori,sorin wrote:Hi,
You can use the same docbook.xsl file for both books if you set the toc.section.depth parameter in each PDF transformation when you start it, in the process that calls the docbook.xsl file. In Oxygen that would be the Parameters dialog box. The value set in the docbook.xsl file is only a default value if no other value is set when the docbook.xsl file is called in the XSLT transformation.
Regards,
Sorin
Thanks for the reply!
You mentioned the Parameters dialog box could be found in Oxygen. Oxygen XML Editor or Author. I'm using Author and I can also use Editor and view with Eclipse as well. As you probably know, we did set the toc.section.depth within our docbook.xsl file. to 3 and both book's TOC went to level 3. I did see there was a XSL and POM.xml file in our project.
Re: DocBook, TOC for 2 different books?
Below is one of my documents.
Can I set the level of toc in this xml document?
Can I set the level of toc in this xml document?
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<book version="5.0" xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Manager</title>
<subtitle>Description Document: Usage Rules, and Examples</subtitle>
<info>
<author>
<personname>Name</personname>
</author>
</info>
<xi:include href="overview.xml" />
<xi:include href="plan.xml"/>
<xi:include href="ListOfExamples.xml" />
</book>
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: DocBook, TOC for 2 different books?
Post by sorin_ristache »
Hello,
No, you can't set the toc.section.depth parameter in the Docbook XML document. It is an XSLT transformation parameter, so it must be set as an XSLT parameter.
The XSLT parameter can be set either in the XSLT file (in your docbook.xsl file), as you already did, or in the process that calls the XSLT transformation. If you run the Docbook transformation in an Oxygen application (Editor, Author or Developer) I recommend setting the value of the parameter with the second method (in the Parameters dialog box in the Docbook transformation), i.e. in the process that calls the XSLT transformation, which is the Oxygen application. This is preferrable in your case because it allows you to create two Oxygen transformation scenarios (by duplicating the Docbook PDF transformation) and set different values for the toc.section.depth parameter).
The first method (setting the value of the parameter directly in the XSLT file) does not allow you to run two different transformations with different values of the parameter, this is why I recommended the first method.
Regards,
Sorin
No, you can't set the toc.section.depth parameter in the Docbook XML document. It is an XSLT transformation parameter, so it must be set as an XSLT parameter.
The XSLT parameter can be set either in the XSLT file (in your docbook.xsl file), as you already did, or in the process that calls the XSLT transformation. If you run the Docbook transformation in an Oxygen application (Editor, Author or Developer) I recommend setting the value of the parameter with the second method (in the Parameters dialog box in the Docbook transformation), i.e. in the process that calls the XSLT transformation, which is the Oxygen application. This is preferrable in your case because it allows you to create two Oxygen transformation scenarios (by duplicating the Docbook PDF transformation) and set different values for the toc.section.depth parameter).
The first method (setting the value of the parameter directly in the XSLT file) does not allow you to run two different transformations with different values of the parameter, this is why I recommended the first method.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service