Skip to content

apply fixes to fromBodyXML and toExternalBodyXML transformers#162

Merged
lokendersinghft merged 1 commit intomainfrom
feature/UPPSF-6880
Apr 9, 2026
Merged

apply fixes to fromBodyXML and toExternalBodyXML transformers#162
lokendersinghft merged 1 commit intomainfrom
feature/UPPSF-6880

Conversation

@lokendersinghft
Copy link
Copy Markdown
Contributor

This PR fixes little things in fromBodyXML and toExternalBodyXML transformers.

from-bodyxml

  • Added support for newer body XML inputs, including h5/h6 headings
  • data-layout parsing for ClipSet instead of data-layout-width
  • Content and Article links should use title attribute instead of dataTitle
  • inline formatting passthrough, b, sup, sub, u, i, del, small
  • whitespace-only text node handling,
  • flourish layout width defaults to in-line
  • flourish sets fragmentIdentifier only when data-fragment-identifier is present, instead of reusing id attribute

to-external-bodyxml

  • Improved XML serialization by escaping attribute/text values for links, pull quotes, big numbers, embedded media links, and tweets.
  • support for optional external attributes such as data-fragment-identifier on headings, image-set, clip-set, and flourish.
  • support for CustomCodeComponent using the current simplified node shape.
  • output formatting for self-closing tags (<br/>, <hr/>)
  • ClipSet layout output to data-layout.
  • support data-fragment-identifier in h tags.

We are also updating CustomCodeComponent and Tweet Go schemas to match body-tree schemas.

JIRA --> https://financialtimes.atlassian.net/browse/UPPSF-6880

@lokendersinghft lokendersinghft requested review from a team as code owners April 8, 2026 07:18
Comment on lines +504 to +509
"sup": func(_ *etree.Element) contenttree.Node {
return newLiftChildrenNode()
},
"sub": func(_ *etree.Element) contenttree.Node {
return newLiftChildrenNode()
},
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing this part is temporary, until we add support for super/sub script into the schema?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove them as part of the PRs for super/sub script, and add proper support for them.

@todor-videv1 todor-videv1 requested review from a team and adgad April 9, 2026 05:52
@lokendersinghft lokendersinghft merged commit 090f45b into main Apr 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants