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

Use less "magic" characters in dtbook2sbsform.xsl and the liblouis tables #1

Open
bertfrees opened this issue Nov 14, 2014 · 2 comments

Comments

@bertfrees
Copy link

... because it makes the XSLT and the liblouis tables very tied on each other, and hard to understand.

The main purpose of the magic characters (U+256C, U+250B, U+250A, etc.) is to convey the necessary "context information" to the liblouis table, context that would otherwise be lost because text nodes are processed one by one.

A better, more intuitive approach would be to just send the real context to liblouis. This is possible with the latest version of liblouis-core. The following xpath expression translates $text with some context before and after:

louis:translate($table, ($context-before,$text,$context-after))[2]
@egli
Copy link
Member

egli commented Nov 17, 2014

liblouis-core? What am I missing?

@bertfrees
Copy link
Author

That is the name of the Pipeline module responsible for liblouis translation.

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

2 participants