-
Notifications
You must be signed in to change notification settings - Fork 0
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
dtbook-to-pef: "stylesheet" option should be a sequence of CSS-files instead of a string #61
Comments
What would this mean in practice? Currently the option is defined as followed:
In other words, it can reference a file in the context (relative URI) or a stylesheet defined in the system (absolute URI). |
Yes. In practice you would no longer be able to reference absolute URIs, but referencing relative URIs would be simpler (no typing, no typos). |
Hmm, I don't know. This would seriously limit the possibilities of the option. Isn't this essentially a user interface problem? Or rather, the problem of not being able to express what the option means? The user interface doesn't know that the option can be a file or a list of files. We can solve this by adding a What if we make up a new data-type which is an extension of the <choice id="css:stylesheet">
<data datatypeLibrary="http://www.daisy.org/ns/pipeline/xproc" type="input"/>
<value>http://www.nlb.no/pipeline/modules/braille/default.css</value>
<value>http://www.sbs.ch/pipeline/modules/braille/default.css</value>
</choice> Or, more correct would be (using even more RNG syntax): <oneOrMore id="css:stylesheet">
<choice>
<data datatypeLibrary="http://www.daisy.org/ns/pipeline/xproc" type="input"/>
<value>http://www.nlb.no/pipeline/modules/braille/default.css</value>
<value>http://www.sbs.ch/pipeline/modules/braille/default.css</value>
</choice>
</oneOrMore> |
This would mean you would have to change your multiple file selection widget a bit of course. I also have to add px:media-type="text/css" so that the option can be prefilled automatically. |
Yes, changing the script should be relatively straight forward. Add Since the file widget would be automatically filled, we may need to handle the case where the CSS file is already referenced from the DTBook/HTML, and in that case probably don't add an additional import of the CSS. Or maybe the behavior in the web ui should be so that file widgets that represent optional arguments are not automatically filled; that might be better. We could use I think I like your suggestions. Maybe the |
Ah yes, good point. Not automatically filling optional arguments is maybe the best, yes. Regarding Besided I think px:type should be deprecated in favor of px:data-type (or the other way around), because having both doesn't make much sense. |
This would allow the user to pick CSS files using the correct widget.
The text was updated successfully, but these errors were encountered: