diff --git a/src/main/java/w2phtml/xhtml/content/Separator.java b/src/main/java/w2phtml/xhtml/content/Separator.java index a2885d2..877ab47 100644 --- a/src/main/java/w2phtml/xhtml/content/Separator.java +++ b/src/main/java/w2phtml/xhtml/content/Separator.java @@ -4,6 +4,8 @@ import static w2phtml.util.Misc.*; import java.util.LinkedList; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -39,6 +41,7 @@ public class Separator { private static Converter converter = null; private Node prevPageContainer = null; private PageContainer pageContainer = null; + private static final Logger logger = LoggerFactory.getLogger(Separator.class); public Separator(XhtmlConfig config, Converter converter) { this.converter = converter; @@ -157,8 +160,26 @@ public class Separator { } private boolean noSplitNeeded(int pageNum, int curLevel) { - return !greenstoneSeparation && !pagination && !isSplitTime(curLevel,pageNum); + return !greenstoneSeparation && !needPageSplits() && !isSplitTime(curLevel,pageNum); } + + private boolean needChapterSplits() { + if (greenstoneSeparation) { + return true; + } + if (rdfSeparation) { + return true; + } + return false; + } + + private boolean needPageSplits() { + if (pagination) { + return true; + } + return false; + } + private void addToCommentStack(String sLevel) { greenstoneStack.offerFirst(Integer.parseInt(sLevel));