Iterator iter = tree.getBookmarks().iterator();
while (iter.hasNext()) {
Bookmark b = (Bookmark)iter.next();
- serializeBookmark(b);
+ if (b.getAction() != null) {
+ serializeBookmark(b);
+ }
}
handler.endElement(DocumentNavigationExtensionConstants.BOOKMARK_TREE);
} catch (SAXException e) {
}
private void serializeBookmark(Bookmark bookmark) throws SAXException, IFException {
- if (bookmark.getAction() != null) {
- noteAction(bookmark.getAction());
- }
+ noteAction(bookmark.getAction());
AttributesImpl atts = new AttributesImpl();
atts.addAttribute(null, "title", "title", XMLUtil.CDATA, bookmark.getTitle());
atts.addAttribute(null, "starting-state", "starting-state",
XMLUtil.CDATA, bookmark.isShown() ? "show" : "hide");
handler.startElement(DocumentNavigationExtensionConstants.BOOKMARK, atts);
- if (bookmark.getAction() != null) {
- serializeXMLizable(bookmark.getAction());
- }
+ serializeXMLizable(bookmark.getAction());
Iterator iter = bookmark.getChildBookmarks().iterator();
while (iter.hasNext()) {
Bookmark b = (Bookmark)iter.next();
- serializeBookmark(b);
+ if (b.getAction() != null) {
+ serializeBookmark(b);
+ }
}
handler.endElement(DocumentNavigationExtensionConstants.BOOKMARK);
-
}
/** {@inheritDoc} */
</fo:bookmark>
<!-- add a reference to a non-existing id; should only trigger a warning
see Bugzilla 50593
+ -->
<fo:bookmark internal-destination="chapterX-secX">
<fo:bookmark-title>Section X</fo:bookmark-title>
</fo:bookmark>
- -->
</fo:bookmark>
<fo:bookmark internal-destination="bc">
<fo:bookmark-title>Fixed Block Container</fo:bookmark-title>