diff options
Diffstat (limited to 'src/java/org/apache/fop/render/xml/XMLRenderer.java')
-rw-r--r-- | src/java/org/apache/fop/render/xml/XMLRenderer.java | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/render/xml/XMLRenderer.java b/src/java/org/apache/fop/render/xml/XMLRenderer.java index 71d47df40..da3260d54 100644 --- a/src/java/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/java/org/apache/fop/render/xml/XMLRenderer.java @@ -66,6 +66,8 @@ import org.apache.fop.area.inline.Leader; import org.apache.fop.area.inline.Space; import org.apache.fop.area.inline.Viewport; import org.apache.fop.area.inline.TextArea; +import org.apache.fop.area.inline.SpaceArea; +import org.apache.fop.area.inline.WordArea; /** * Renderer that renders areas to XML for debugging purposes. @@ -613,9 +615,32 @@ public class XMLRenderer extends PrintRenderer { addAreaAttributes(text); addTraitAttributes(text); startElement("text", atts); - characters(text.getTextArea()); - endElement("text"); super.renderText(text); + endElement("text"); + } + + /** + * @see org.apache.fop.render.AbstractRenderer#renderWord(WordArea) + */ + protected void renderWord(WordArea word) { + atts.clear(); + addAttribute("offset", word.getOffset()); + startElement("word", atts); + characters(word.getWord()); + endElement("word"); + super.renderWord(word); + } + + /** + * @see org.apache.fop.render.AbstractRenderer#renderSpace(SpaceArea) + */ + protected void renderSpace(SpaceArea space) { + atts.clear(); + addAttribute("offset", space.getOffset()); + startElement("space", atts); + characters(space.getSpace()); + endElement("space"); + super.renderSpace(space); } /** |