[jira] [Resolved] (FOP-2959) Using fo:retrieve-marker in an artifact (static content from header) breaks accesibility for the next page
"Matthias Reischenbacher (Jira)" <[email protected]>
| Newsgroups | gmane.text.xml.fop.devel |
|---|---|
| Message-ID | <[email protected]> |
[ https://issues.apache.org/jira/browse/FOP-2959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Reischenbacher resolved FOP-2959.
------------------------------------------
Resolution: Duplicate
> Using fo:retrieve-marker in an artifact (static content from header) breaks accesibility for the next page
> -----------------------------------------------------------------------------------------------------------
>
> Key: FOP-2959
> URL: https://issues.apache.org/jira/browse/FOP-2959
> Project: FOP
> Issue Type: Bug
> Components: renderer/pdf
> Affects Versions: 2.5, 2.4
> Reporter: Dan Caprioara
> Priority: Major
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Using a fo:retrieve-marker in a header static content, that is marked with role artifact breaks the accessibility tags structure tree for the next pages.
> {code:xml}
> <fo:static-content
> flow-name="sc-before"
> role="artifact">
> <fo:block>Header <fo:retrieve-marker
> retrieve-boundary="document"
> retrieve-class-name="title"
> retrieve-position="first-including-carryover"/></fo:block>
> </fo:static-content>
> {code}
> *The cause:*
> The class org.apache.fop.accessibility.fo.FO2StructureTreeConverter switches the current FOEventHandler (converter) to one that "swallows" all events each time an artifact is found, and restores the initial converter after the artifact ends.But this gets into conflict with the retrieve markers. The retrieve marker restore state event is processed asynchronous, just before the current page is finished, and restores the FOEventHandler to the one it was available when the start retrieve marker was emmited (in our case the "swallower", because the retrieve marker was in an artifact). The result is that the "swallower" is the current FOEventHandler for the next page.
> *The fix:*
> The fix is to restore the initial handler each time the page ends:
> At the end of the method: org.apache.fop.accessibility.fo.FO2StructureTreeConverter.endPageSequence(PageSequence)
> add:
> {code:java}
> if (converter == eventSwallower) {
> converter = structureTreeEventTrigger;
> converters.clear();
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)