Surfaced by the spec contract audit (PR for spec/icml).
Symptom
Per the bridge composite schema (dist/plugin/formats/okf_icml/schema.json) and the upstream Parameters.reset() in net.sf.okapi.filters.icml.Parameters, the default value of extractNotes is false. With this default, <Note> element content (editorial annotations authored in InCopy / InDesign) should be excluded from the translatable part stream.
The Okapi ICMLFilter instead emits <Note> content as a translatable text unit whenever a Note appears inside a CharacterStyleRange — and, while doing so, splits the surrounding visible text at the Note boundary so the trailing Content run after the Note is dropped from the part stream entirely.
Reproduction
core/formats/icml/spec.yaml feature note_extraction_default::notes_skipped over testdata/notes.icml:
<Story Self=\"story1\" ...>
<ParagraphStyleRange AppliedParagraphStyle=\"ParagraphStyle/Body\">
<CharacterStyleRange AppliedCharacterStyle=\"CharacterStyle/$ID/[No character style]\">
<Content>Visible text</Content>
<Note>
<ParagraphStyleRange ...><CharacterStyleRange ...>
<Content>Note content here</Content>
</CharacterStyleRange></ParagraphStyleRange>
</Note>
<Content> continues</Content>
</CharacterStyleRange>
</ParagraphStyleRange>
</Story>
expected (extractNotes=false): 1 block, "Visible text continues" (native, correct per schema default)
bridge: 2 blocks: "Visible text" + "Note content here" (note extracted; trailing \" continues\" dropped)
Spec tag
The example is tagged expected_fail: in the spec.yaml so the parity gate downgrades it to a warning until the bridge is fixed. Once the bridge fix lands, drop the expected_fail: block.
Repro test
KAPI_PARITY_SANDBOX=$PWD/.parity \
go test -tags parity -run TestParityIcmlSpec/note_extraction_default -count=1 -v ./parity/...
(from cli/, on branch spec/icml)
Affected upstream code
okf_icml (okapi-filter-icml) — net.sf.okapi.filters.icml.ICMLFilter's Note-handling path, all currently-shipped Okapi versions affected.
Surfaced by the spec contract audit (PR for
spec/icml).Symptom
Per the bridge composite schema (
dist/plugin/formats/okf_icml/schema.json) and the upstreamParameters.reset()innet.sf.okapi.filters.icml.Parameters, the default value ofextractNotesisfalse. With this default,<Note>element content (editorial annotations authored in InCopy / InDesign) should be excluded from the translatable part stream.The Okapi
ICMLFilterinstead emits<Note>content as a translatable text unit whenever a Note appears inside a CharacterStyleRange — and, while doing so, splits the surrounding visible text at the Note boundary so the trailing Content run after the Note is dropped from the part stream entirely.Reproduction
core/formats/icml/spec.yamlfeaturenote_extraction_default::notes_skippedovertestdata/notes.icml:Spec tag
The example is tagged
expected_fail:in the spec.yaml so the parity gate downgrades it to a warning until the bridge is fixed. Once the bridge fix lands, drop theexpected_fail:block.Repro test
(from
cli/, on branchspec/icml)Affected upstream code
okf_icml(okapi-filter-icml) —net.sf.okapi.filters.icml.ICMLFilter's Note-handling path, all currently-shipped Okapi versions affected.