-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BITS-enabled JATS reader #9138
BITS-enabled JATS reader #9138
Conversation
…ok-part-meta, book-title, book-title-group
@jgm I have updated this PR with all unit tests I needed. They all pass, and all other existing checks pass. Below is the scope of the enhancement to make the JATS reader capable to processing BITS documents:
Index and TOC content elements: book-specific elements, with a title. Processed via Index and TOC title group elements: contain the title for its parent element. Their behaviour is incorporated into
The relevant checks have been put in place for Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I noted one test that doesn't seem right, unless I'm missing something.
test/command/8867.md
Outdated
</permissions> | ||
</article-meta> | ||
^D | ||
[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what you intended? Shouldn't this test be run with -s
so we get the metadata?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course. Just added this, plus a few additional tests for metadata in both book and book-part-wrapper cases. Thanks for pointing out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also separate tests from when we just want to see content, not metadata.
Nothing -> do | ||
let name = qName (elName e) | ||
if (name == "dedication" || name == "foreword" || name == "preface") | ||
then return $ str $ T.toTitle name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to use localized (translated) versions of these names rather than the English.
However, we don't currently have localizations for these, so this will have to wait.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. The rationale is that, if there are non-English language named sections, then these will probably have a <title>
, captured in the case just above. But might still be something to consider in the future.
Thanks for the changes. I thought of a couple other things, regarding the tests. |
How about these? |
Perfect! |
Questions:
|
Uhm, I would say yes, and yes. BITS it's a very similar but officially different schema, so I think it is appropriate to treat as a separate format, with -bits. Do you need any particular help wrt wording any docs? |
Would |
It would be a complete synonym. No setting needed. It's the top or root element that tells the reader whether it's a jats or bits document. |
Great, I'll merge this and add the synonym and manual bits myself. |
Wonderful. I think it would be consistent to add "← BITS" below the XML formats supported in the main page. |
Will do |
Proposal for development of new BITS reader by expanding the JATS reader.