aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java')
-rw-r--r--src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java b/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java
index 00d4a5b56..36f36fdef 100644
--- a/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java
+++ b/src/java/org/apache/fop/accessibility/TransformerNodeEndProcessing.java
@@ -32,10 +32,12 @@ import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
-import org.apache.commons.io.output.ByteArrayOutputStream;
+import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
+import org.apache.commons.io.output.ByteArrayOutputStream;
+
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
@@ -78,7 +80,12 @@ class TransformerNodeEndProcessing extends TransformerNode {
Source src = new StreamSource(new ByteArrayInputStream(enrichedFO));
DOMResult res = new DOMResult();
transformer.transform(src, res);
- userAgent.setStructureTree(new SimpleStructureTree(res.getNode()));
+ StructureTree structureTree = new StructureTree();
+ NodeList pageSequences = res.getNode().getFirstChild().getChildNodes();
+ for (int i = 0; i < pageSequences.getLength(); i++) {
+ structureTree.addPageSequenceStructure(pageSequences.item(i).getChildNodes());
+ }
+ userAgent.setStructureTree(structureTree);
SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
saxParserFactory.setNamespaceAware(true);