-
Notifications
You must be signed in to change notification settings - Fork 4
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
Preferred Format for code examples in Techinques (User Experience Guide) #217
Comments
|
I agree that pseudo-code should be preferred. We don't want to exclude those who use other techniques than XSLT. Pseudo-code plus programming language specific examples would be even better. |
Thanks for the early feedback. How do you think we can deal with querying metadata in structured XML via pseudo-code? I think we should simplify the task, assuming that the metadata is already loaded in some form of object model and can be accessed directly, otherwise we would have to specify the loading procedure each time and have loops to find the metadata we are interested in... I mean we should serialize the metadata in some way (like Ace by DAISY serializes the metadata in the JSON report). If you have any other ideas, they are welcome. |
Could you start by parsing the xml to json via xmlhttprequest and then use infra-type code like we did for processing a publication manifest: https://www.w3.org/TR/pub-manifest/#processing-algorithm ? (I really don't know off the top of my head, so maybe this is a non-starter.) |
To me there should be first a descriptive statement (see below), then pseudo-code can be added as an example and implementation could be provided for all the information (i.e. link to one xslt file). Descriptive statement: Visual adjustment information is obtained using two metadata keys:
Three cases are possible:
|
on dec. 14th call we agreed with descriptive statements. |
Background
We are starting to work on the techniques for EPUB Accessibility metadata and ONIX. The goal is to provide clear instructions for developers on how to implement these guidelines effectively, extracting and combining the information from the metadata source.
Issue
Given that the key information we identified in the principles document involves analyzing combinations of different metadata, we believe it is crucial to determine the preferred format for conveying instructions to developers. The challenge lies in finding a robust way to communicate which metadata to extract and how to process it to generate the required strings for display to the end users.
Proposed Solutions
We are considering two primary options for conveying these instructions:
XSLT (Extensible Stylesheet Language Transformations):
Pseudo-code:
Request for Input
We are reaching out to the community to gather input on which format would be preferable for developers implementing these guidelines. We would appreciate insights, opinions, or any alternative suggestions.
Examples
To illustrate, here's a sample for both techniques regarding the key information Visual adjustments:
XSLT Example
Pseudo-code Example
Note: In the code, an accessibilityFeature and an accessMode are accessed directly as keys to a dictionary, but there may be more than one in the metadata, so preprocessing or loops would be necessary.
Questions:
The text was updated successfully, but these errors were encountered: