imazen / imazen/folioxml

Failed to parse all options in DEF file

Open
#18 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
14
Forks
10
PR merge metrics
No merged PRs in 30d

Description

When processing `.FFF` files generated using Folio VIEWS 4.11, some of the level definitions in the `.DEF` file fail to parse and abort the export process:

```
folioxml.core.InvalidMarkupException: Failed to parse all options on . Remaining text: NL,LEVEL 1,BD+,FT,Arial,SN,PT,16,FC,0,0,255,JU,CN,BP,0.125

Line 11 col 1 in XXX.DEF
at folioxml.translation.FolioSlxTranslator.tryDefinitionTagsCore(FolioSlxTranslator.java:479)
at folioxml.translation.FolioSlxTranslator.tryDefinitionTags(FolioSlxTranslator.java:350)
at folioxml.translation.FolioSlxTranslator.convertTag(FolioSlxTranslator.java:292)
at folioxml.translation.FolioSlxTranslator.translate(FolioSlxTranslator.java:42)
at folioxml.translation.SlxTranslatingReader.read(SlxTranslatingReader.java:30)
at folioxml.slx.SlxRecordReader.read(SlxRecordReader.java:139)
at folioxml.slx.SlxRecordReader.read(SlxRecordReader.java:100)
at folioxml.export.InfobaseSetVisitor.complete(InfobaseSetVisitor.java:98)
at folioxml.export.ExportRunner.Index(ExportRunner.java:75)
at folioxml.command.Main.run(Main.java:68)
at folioxml.command.Main.main(Main.java:40)
```

I'm not sure of the implications of skipping that data, but for the time being at least I've got the export to proceed by commenting out the `throw` statement in `folioxml.translation.FolioSlxTranslator.tryDefinitionTagsCore()`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the export with a Folio VIEWS 4.11-generated .FFF file and inspect folioxml.translation.FolioSlxTranslator.tryDefinitionTagsCore() at the failing line 479, following the call from tryDefinitionTags(). Determine how the NL and other level-definition options should be handled; done means the DEF data is processed without aborting the export and the expected treatment is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.