New IFilter methods:
openAsSubfilter(RawDocument input, IFilter parentFilter, FilterState
parentFilterState)
openAsSubfilter(RawDocument input, IFilter parentFilter)
openAsSubfilter(RawDocument input, boolean generateSkeleton, IFilter
parentFilter, FilterState parentFilterState)
openAsSubfilter(RawDocument input, boolean generateSkeleton, IFilter
parentFilter)
isSubFilter()
FilterState holds any information that may be useful for the subfilter,
for example is the parent filter inside an attribute? Is there special
decoding needed? In what order should the decoding happen?
There are cases with mixed content that will be tricky - for example
when calling the subfilter for HTML in Java Properties files you will
normally need to encode html *and* Java prop together even though the
mime type is only HTML for the subfiltered content.
I don't think we need any special methods on other interfaces like the
writers. The writers should look at the mime types, subfilter flag and
parent FilterState to do the right thing. We may need to add some more
fields to some of the resources.
The most work in all of this will be in defining FilterState and using
it during merge.
Jim
openAsSubfilter(String input, IFilter parentFilter, FilterState
parentFilterState)
openAsSubfilter(String input, IFilter parentFilter)
openAsSubfilter(String input, boolean generateSkeleton, IFilter
parentFilter, FilterState parentFilterState)
openAsSubfilter(String input, boolean generateSkeleton, IFilter
parentFilter)
but that is a lot of duplication IMHO - its not that hard to create a
RawDocument from a String.
Jim