Outputters and Format #54

rolfl opened this Issue Dec 9, 2011 · 0 comments

1 participant


XMLOutputter has been customizable with the Format instance, which determines how the output document looks adter output.

The new StAX outputters also support the Format instance.

The DOMOutputter and SAXOutputter should be modified to support the Format concept as well. This would make JDOM a good way to re-format XML in an intermediate location.

@rolfl rolfl added a commit that referenced this issue Dec 21, 2011
@rolfl rolfl Issue #54 - Outputters and Format.
This commit makes DOMOutputter behave more like the other Outputters, being able to output more than just Document and Element content (but all sorts now), and able to modify the DOM results to applye whatever formatting is needed. The default formatter is (like other Outputters) the Raw type, so the default behaviour is not changed.

This commit also extends the DOMBuilder to be able to build JDOM Content from more than just the DOM Element and DOM Document source. Thus the DOMBuilder and DOMOutputter are 'symmetrical'.

Additionally, the 'common' code between various outputters have been centralized in to the new Abstract class AbstractOutputProcessor

Finally, add a whole bunch of tests.
@rolfl rolfl added a commit that referenced this issue Jan 2, 2012
@rolfl rolfl Part one of SAXOutputter and Issue #54 - Formatter and Outputters.
SAXOutputter has been re-modelled in the same style as other Outputters, and all existing tests pass. Now to make the formatted stuff pass too.
@rolfl rolfl added a commit that closed this issue Jan 2, 2012
@rolfl rolfl Fixes #54 - Outputers and Format
Completes the code for SAXOutputter and Format, thus completing the issue.
Implements tests, but some tests are ignored because of two issues:
1. Cannot affect format of content outside of root element using Format
2. Cannot process DOCTYPE declarations properly.
@rolfl rolfl closed this in b1f779d Jan 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment