-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fix endnotes issue #561
Fix endnotes issue #561
Conversation
Thanks @kalaspuffar! I'm only wondering about the From the specification:
They use this example: <dc:title>THE LORD OF THE RINGS</dc:title>
<dc:title>Part One: The Fellowship of the Ring</dc:title> I'm wondering if we should keep them separated also in HTML? For instance like this: <title>THE LORD OF THE RINGS</title>
<meta name="dc:title">Part One: The Fellowship of the Ring</meta> So: the first OPF What do you think @martinpub @AndersEkl @kalaspuffar? In the future we could also consider putting the name of the chapter (or whatever is the first structural item in the document) as
|
Hi @josteinaj Yes, I think this could be an improvement for the future. Looking at the current specification:
The information is sparse, so the implementation in this PR should at least follow that directive. But creating an issue in this repository or future development for the format repository could be good. But without a change to the specification, I think we should keep the implementation so it follows the specification currently written. It could be interpreted a couple of ways, though. Either we do as this PR, or we just join them with a single space, or we just pick the first dc:title element to match with the other documents. Best regards |
In the EPUB specification with the multi-dc:title example, they join with a comma. In other cases it might make more sense with a colon or a hyphen. What we choose should be specified to the producers, but it is not described in the nordic specification. So I think it would make the most sense to just use the first dc:title, instead of joining them. But I think @martinpub needs to decide. |
Martin has recently changed position here at MTM, so I don't know if he will do this anymore. Until it is settled here who will continue this work, MTM through me decides that we follows Josteins suggestion and only use the first dc:title. |
Hi @josteinaj I've now changed the code to only validate the first (main) title against the content documents. Best regards |
Hi, just wanted to say I'm still monitoring this repo, just haven't had time yet to reply. I hope to be involved in further guidelines work, but perhaps not as much when it comes to implementing validation rules. However, feel free to ask/invoke me in discussion if you feel like it. I will be happy to share my thoughts. Regarding the specific issue at hand, I think the current one suggested by @josteinaj and implemented by @kalaspuffar is a reasonable one. We should note @josteinaj's remarks for guidelines revision work. |
@@ -170,7 +170,7 @@ | |||
<p>The HTML title element must be the same as the OPF publication dc:title</p> | |||
<rule context="html:title"> | |||
<let name="context" value="concat('(<', name(), string-join(for $a in (@*) return concat(' ', $a/name(), '="', $a, '"'), ''), '>)')"/> | |||
<let name="fulltitle" value="string-join(/*/opf:package/opf:metadata/dc:title[not(@refines)]/text(), ' - ')"/> | |||
<let name="fulltitle" value="//opf:package/opf:metadata/dc:title[1]/text()"/> |
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.
I think you still should have the not(@refines)
. It would be rare that the first dc:title has a refines-attribute, but I think we should still check for it. So dc:title[not(@refines) and position()=1]
.
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.
Hi @josteinaj
Seems reasonable; I agree that it's unlikely but for completeness.
Changed the rule to the check you suggested.
Best regards
Daniel
Hi @josteinaj and @martinpub
This PR tries to solve the issue of the
endnote
role not being allowed. This is more described in #556I made two changes to the rules.
epub:type
instead.string-join
using the pattern " - " so we will get spaces and a dash between each part of the title. That will then be checked against each content document title.As you see, there are many changes, but the main thing here is that I created a test to verify the validity of our test case and found many issues.
I'm not sure if verifying all the test changes is interesting but you might have an input on the minor rule changes I made.
Best regards
Daniel