Bug 1265487

Summary: DocBook 5 drupal-book ignores chunk_section_depth
Product: [Community] Publican Reporter: Lee Newson <lnewson>
Component: publicanAssignee: Nobody <nobody>
Status: POST --- QA Contact: Ruediger Landmann <rlandman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: futureCC: cbredesen, rlandman
Target Milestone: 4.4   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lee Newson 2015-09-23 05:03:49 UTC
Description of problem:
DocBook 5.0 drupal-book builds ignore whatever the chunk_section_depth setting is and always chunk at the chapter/part/appendix level.

Version-Release number of selected component (if applicable):
4.3.2 (I imagine this has existed since DocBook 5.0 support was added)

How reproducible:
Always

Steps to Reproduce:
1. Create a DocBook 5.0 book: publican create --name "Test" --dtdver "5.0"
2. Set the chunk_section_depth to say "1"
3. Build using the drupal-book format: publican build --langs en-US --formats drupal-book
4. Inspect the files created under tmp/en-US/drupal-book/ and notice the aren't any files for the top level sections (there should be two as per Chapter.xml).

Actual results:
The chunk_section_depth is ignored and chunking is always done at the chapter level.

Expected results:
Chunking should respect the chunk_section_depth value in publican.cfg

Comment 1 Lee Newson 2015-09-23 05:07:11 UTC
This occurs because the chunk xsl template in drupal-book.xsl looks to have been copied from the non namespaced version of the stylesheets. Adding the "d:" namespace prefix before each section/sect* in the chunk template appears to fix this issue (ie "ancestor::d:section").

See https://git.fedorahosted.org/cgit/publican.git/tree/datadir/Common_Content/common-db5/xsl/drupal-book.xsl?h=devel#n121

Comment 2 Lee Newson 2015-10-19 00:38:29 UTC
Fixed up the missing namespace declarations.

To ssh://git.fedorahosted.org/git/publican.git
   7f39a6a..02e2e5c  devel -> devel

Comment 3 Mike McCune 2016-03-28 22:57:02 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions