8ca191604d
This exports functions that uses xml-conduit's parser to produce an xml-light Element or [Content]. This allows existing pandoc code to use a better parser without much modification. The new parser is used in all places where xml-light's parser was previously used. Benchmarks show a significant performance improvement in parsing XML-based formats (especially ODT and FB2). Note that the xml-light types use String, so the conversion from xml-conduit types involves a lot of extra allocation. It would be desirable to avoid that in the future by gradually switching to using xml-conduit directly. This can be done module by module. The new parser also reports errors, which we report when possible. A new constructor PandocXMLError has been added to PandocError in T.P.Error [API change]. Closes #7091, which was the main stimulus. These changes revealed the need for some changes in the tests. The docbook-reader.docbook test lacked definitions for the entities it used; these have been added. And the docx golden tests have been updated, because the new parser does not preserve the order of attributes. Add entity defs to docbook-reader.docbook. Update golden tests for docx. |
||
---|---|---|
.. | ||
code-custom.pptx | ||
code-custom_templated.pptx | ||
code.native | ||
code.pptx | ||
code_templated.pptx | ||
document-properties-short-desc.native | ||
document-properties-short-desc.pptx | ||
document-properties-short-desc_templated.pptx | ||
document-properties.native | ||
document-properties.pptx | ||
document-properties_templated.pptx | ||
endnotes.native | ||
endnotes.pptx | ||
endnotes_templated.pptx | ||
endnotes_toc.pptx | ||
endnotes_toc_templated.pptx | ||
images.native | ||
images.pptx | ||
images_templated.pptx | ||
inline_formatting.native | ||
inline_formatting.pptx | ||
inline_formatting_templated.pptx | ||
lists.native | ||
lists.pptx | ||
lists_templated.pptx | ||
raw_ooxml.native | ||
raw_ooxml.pptx | ||
raw_ooxml_templated.pptx | ||
reference_depth.pptx | ||
remove_empty_slides.native | ||
remove_empty_slides.pptx | ||
remove_empty_slides_templated.pptx | ||
slide_breaks.native | ||
slide_breaks.pptx | ||
slide_breaks_slide_level_1.pptx | ||
slide_breaks_slide_level_1_templated.pptx | ||
slide_breaks_templated.pptx | ||
slide_breaks_toc.pptx | ||
slide_breaks_toc_templated.pptx | ||
speaker_notes.native | ||
speaker_notes.pptx | ||
speaker_notes_after_metadata.native | ||
speaker_notes_after_metadata.pptx | ||
speaker_notes_after_metadata_templated.pptx | ||
speaker_notes_afterheader.native | ||
speaker_notes_afterheader.pptx | ||
speaker_notes_afterheader_templated.pptx | ||
speaker_notes_afterseps.native | ||
speaker_notes_afterseps.pptx | ||
speaker_notes_afterseps_templated.pptx | ||
speaker_notes_templated.pptx | ||
start_numbering_at.native | ||
start_numbering_at.pptx | ||
start_numbering_at_templated.pptx | ||
tables.native | ||
tables.pptx | ||
tables_templated.pptx | ||
two_column.native | ||
two_column.pptx | ||
two_column_templated.pptx |