[ 
https://issues.apache.org/jira/browse/FOP-3222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110513#comment-18110513
 ] 

Martin Leitner commented on FOP-3222:
-------------------------------------

[~jgoncalves] Thanks for looking again. I retested and I found out that the 
behaviour depends on the SAXTransformerFactory that is on the classpath.

I happened to use {_}Saxon9{_}. With _JDK serializer_ and _Xalan 2.7.2_ I get 
well-formed XML.

I found that _StructureTree2SAXEventAdapter.startPageSequence()_ only declares 
prefix mappings via _startPrefixMapping_ for _foi_ and {_}fox{_}. When I add a 
mapping for the _fo_ prefix there (and do the proper _endPrefixMapping_ in 
_StructureTree2SAXEventAdapter.endPageSequence()_ for cleanup), the output is 
well-formed with Saxon9 as well.

> creating intermediate format with accessibility=true results in 
> non-well-formed XML
> -----------------------------------------------------------------------------------
>
>                 Key: FOP-3222
>                 URL: https://issues.apache.org/jira/browse/FOP-3222
>             Project: FOP
>          Issue Type: Bug
>          Components: unqualified
>    Affects Versions: 2.10
>            Reporter: Martin Leitner
>            Assignee: Joao Goncalves
>            Priority: Minor
>         Attachments: fop_config.xml, test.fo, test.if.xml
>
>
> Generating intermediate format with the attached config file fop_config.xml 
> and the attached input file test.fo produces the attached output file 
> test.if.xml.
> The output file is not a well-formed XML, as it uses the fo: namespace prefix 
> without declaring it.
> Rendering directly to PDF/UA works just fine.
> I am using FOP 2.10 embedded in Java code.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to