metanorma / sts-ruby

Ruby library for NISO STS and ISO STS
1 stars 0 forks source link

Parse textual content that contain tags properly #2

Closed ronaldtse closed 7 months ago

ronaldtse commented 12 months ago

TBX-ISO-TML contains elements that include XML tagged content inside text.

The textual elements we need to support are:

These elements are re-used inside elements such as in the ones that follow.

Definition

Screenshot 2023-11-29 at 3 45 30 PM

entailedTerm

Screenshot 2023-11-29 at 3 46 43 PM

example

Screenshot 2023-11-29 at 3 47 01 PM

note

Screenshot 2023-11-29 at 3 47 15 PM

Conclusion

Once this is implemented, the commented out test for round-tripping shall pass.

ronaldtse commented 12 months ago

A summary:

Screenshot 2023-11-29 at 3 49 22 PM
HassanAkbar commented 10 months ago

@ronaldtse I’ve updated the code to read the tags that contain text mixed with tags & test cases are passing now. There are 2 folders in this gem, namely niso_sts and tbx_iso_tml. I have to add many new files to read the tags and I’m unsure in which directory I should add them. Can you explain how we are organizing the code?

ronaldtse commented 10 months ago

I actually want to separate the classes for NISO STS and TBX ISO TML. So for the classes for this ticket they should go into the tbx folder.

HassanAkbar commented 10 months ago

@ronaldtse to make the test case pass for the given test file tbx-nisosts-0.2-formatted.xml I had to use the classes from both folders so I think we should create a separate folder for common files?

ronaldtse commented 10 months ago

@HassanAkbar can you make a PR so I can see? What are the common files?