aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/extensions/ExtensionElementMapping.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/extensions/ExtensionElementMapping.java')
-rw-r--r--src/org/apache/fop/extensions/ExtensionElementMapping.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/org/apache/fop/extensions/ExtensionElementMapping.java b/src/org/apache/fop/extensions/ExtensionElementMapping.java
index 479c4b3ca..e2fd1702e 100644
--- a/src/org/apache/fop/extensions/ExtensionElementMapping.java
+++ b/src/org/apache/fop/extensions/ExtensionElementMapping.java
@@ -22,16 +22,25 @@ public class ExtensionElementMapping implements ElementMapping {
private static synchronized void setupExt() {
if(foObjs == null) {
foObjs = new HashMap();
+ foObjs.put("bookmarks", new B());
foObjs.put("outline", new O());
foObjs.put("label", new L());
}
}
public void addToBuilder(FOTreeBuilder builder) {
- setupExt();
+ if(foObjs == null) {
+ setupExt();
+ }
builder.addMapping(URI, foObjs);
}
+ static class B extends ElementMapping.Maker {
+ public FONode make(FONode parent) {
+ return new Bookmarks(parent);
+ }
+ }
+
static class O extends ElementMapping.Maker {
public FONode make(FONode parent) {
return new Outline(parent);