Mewel / abbyy-to-alto

Converts FineReader abbyy.xml to alto.xml.
MIT License
9 stars 5 forks source link

Bug Report: Missing ID attribute for <ComposedBlock Type ="Table"> in AbbyyToAltoConverter #1

Closed carlchan1994 closed 7 years ago

carlchan1994 commented 7 years ago

Missing ID attribute for in AbbyyToAltoConverter

ID attribute is a required attribute for all BlockType. This is specified at both alto-v2.0.xsd and alto-3-1.xsd.

Adding the following code at AbbyyToAltoConverter.java can solve the problem of generating invalid XML document:

Line 90: AtomicInteger tableElementCount = new AtomicInteger(0); Line 120: tableBlock.setID("Table_" + tableElementCount.incrementAndGet());

Mewel commented 7 years ago

Added it. Thanks for the help 👍