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

Compare BRF in xprocspec #18

Closed
Tracked by #31
dkager opened this issue Oct 20, 2015 · 2 comments
Closed
Tracked by #31

Compare BRF in xprocspec #18

dkager opened this issue Oct 20, 2015 · 2 comments

Comments

@dkager
Copy link

dkager commented Oct 20, 2015

Make it possible to compare BRF files in xprocspec, e.g.:

    <x:context label="brf">
      <x:document type="file" method="text" href="output-dir/file1.brf"/>
    </x:context>
    <x:expect label="brf" type="compare">
      <x:document type="file" method="text" href="../resources/file1.brf"/>
    </x:expect>

The problem is that XML 1.0 doesn't support the Form Feed character entity. You can use the binary method but this makes it difficult to compare the actual result and the expected result. Some ideas:

  • Use method="binary" instead, then interpret the result as some charset.
  • Add a preprocessing step that transforms a BRF into an XML structure where a Form Feed leads to a new <page>. Maybe method="brf".
  • Moving on from the previous point, directly output a basic PEF where instead of Unicode braille you have ASCII braille.
@bertfrees
Copy link
Member

Thanks Davy. I think the last option is a bit similar to something I once proposed: to let custom comparators also implement a custom diff view. This would solve other problems too such as the PEF diff highlighting apparent differences that aren't really differences according to the custom compare step (pef:compare).

@josteinaj
Copy link

Moved to: daisy/pipeline-mod-braille#166

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

No branches or pull requests

3 participants