Skip to content
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

"epub:" namespace is renamed "ns2:" in TTS generation #4

Open
martinpub opened this issue Apr 6, 2021 · 15 comments
Open

"epub:" namespace is renamed "ns2:" in TTS generation #4

martinpub opened this issue Apr 6, 2021 · 15 comments

Comments

@martinpub
Copy link
Collaborator

martinpub commented Apr 6, 2021

Currently, the "epub:" namespace is changed to "ns2:" in TTS generation. The declaration is still validly pointing to the correct namespace URI (http://www.idpf.org/2007/ops), but it is confusing to introduce a new term for that namespace, so the desired result is that the "epub:" name be kept intact in TTS generation.

Comment from @bertfrees:

We should be able to do something about this. Not sure where exactly the prefix is changed though. Anyway, the current result looks valid EPUB as far as I can tell, so this should not be an issue for reading systems.

@martinpub martinpub added the tts label Apr 7, 2021
@bertfrees
Copy link
Collaborator

I spent a bit of time on this one but couldn't immediately find the cause.

@martinpub
Copy link
Collaborator Author

OK, thanks for checking.

Just noting two depencies for MTM production:

  • There is validation on @epub:type presence/values in the Nordic Validator
  • There might be CSS rules for @epub:type

@bertfrees
Copy link
Collaborator

I didn't want to invest more time in it because I deemed this not as important as other issues.

  • There is validation on @epub:type presence/values in the Nordic Validator

You mean it checks for the prefix?

  • There might be CSS rules for @epub:type

CSS doesn't care about the prefix, only the namespace the prefix is mapped to.

@martinpub
Copy link
Collaborator Author

Hi @bertfrees,

You mean it checks for the prefix?

Yes, as I understand how the validation rules (Schematron and RelaxNG) are currently constructed.

CSS doesn't care about the prefix, only the namespace the prefix is mapped to.

Of course, will make sure to properly declare the namespaces in the CSS as well.

@martinpub
Copy link
Collaborator Author

Yes, as I understand how the validation rules (Schematron and RelaxNG) are currently constructed.

No, sorry I just checked and the namespaces are properly declared in Schematron. So this might not be an issue. Not sure about RelaxNG.

@martinpub
Copy link
Collaborator Author

Not sure about RelaxNG.

Namespaces are declared also in RelaxNG so this is probably a non-issue from both of the issues I raised. Sorry!

@martinpub
Copy link
Collaborator Author

This is still a valid issue, since post-production editing might be confusing for some users. However, low priority.

@bertfrees
Copy link
Collaborator

bertfrees commented Jun 1, 2021

@carl-textalk I just verified that this is still an issue. I used the DTB37628 test book and the configuration did not seem to matter. Just make sure the TTS switch is enabled. It's the .xhtml files that have the unwanted "ns2" prefixes.

@martinpub Could you help Carl reproduce the issue? (Maybe with a smaller book than the one I used.)

@carl-textalk
Copy link

@carl-textalk I just verified that this is still an issue. I used the DTB37628 test book and the configuration did not seem to matter. Just make sure the TTS switch is enabled. It's the .xhtml files that have the unwanted "ns2" prefixes.

Thanks @bertfrees !

@martinpub
Copy link
Collaborator Author

Hi @carl-textalk, I put a small-size sample file on textalk/mini_epub3 on the MTM FTP, hope you can use this to reproduce the issue?

I tried running various jobs with epub3-to-epub3 without having succesfully reproduced the problem, but they were all non-TTS jobs. Atm it is not possible to test TTS on the MTM pipe2 test server due to an expired license file, we are working on that. But I think @bertfrees already concluded this is limited to TTS parsing.

Let me know if there's anything else you need!

@carl-textalk carl-textalk self-assigned this Jun 8, 2021
@carl-textalk
Copy link

Hi.
I have tried to reproduce this error without any luck using the test-book you provided @martinpub.
I have tried various different settings within the Epub 3 Enhancer script.
(Im testing it on master branch. )

@martinpub
Copy link
Collaborator Author

Hi @carl-textalk, thanks for testing. I suspected that it was TTS-only, but even with TTS, I cannot reproduce this either. So it has apparently been solved. Anyhow, it is not an issue anymore, so I will close this issue. Thanks!

@bertfrees
Copy link
Collaborator

bertfrees commented Jun 9, 2021

I don't think it is solved yet.

@carl-textalk carl-textalk removed their assignment Jun 10, 2021
@martinpub martinpub reopened this Jun 10, 2021
@martinpub
Copy link
Collaborator Author

OK @bertfrees, do you have any steps to reproduce? Both me and @carl-textalk have failed to reproduce this.

@bertfrees
Copy link
Collaborator

I believe I did

dp2 epub3-to-epub3 --source DTB37628.epub --tts true --braille false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants