Skip to content

Instantly share code, notes, and snippets.

@seavor
Created November 17, 2016 22:08
Show Gist options
  • Save seavor/d201cd4d758ab1c5e6c091c4cdaaa54c to your computer and use it in GitHub Desktop.
Save seavor/d201cd4d758ab1c5e6c091c4cdaaa54c to your computer and use it in GitHub Desktop.
InDesign Tagging & Translation Process
1) Tag Content in InDesign files
2) Export from InDesign as raw XML (no XSLT)
3) Validate XML against XSD
- Enforce attributes on select tags
- Escape special problem characters
- Should be simple enough to be one-size-fits-all
4) PHP translation script
- Escape select HTML tags before JSON translation (to reduce data depth)
- Transform XML into JSON via Saxon\C-PHP software
- Unescape html tags
- Validate final JSON output against JSON schema
* The JSON schema will be structured to enforce a common output structure.
Hopefully most InDesign files will match a common visual format to allow
for this, but we're preparing for the eventuallity that we'll have a select
number of different layout structures to handle.
* The current iteration of the PHP script requires the installation of some
custom software on the server (Saxon, and Saxon\C-PHP), as well as the ability of the
SmartMover Command Line module to access and write to directories on the server.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment