grefel / extendscriptApiDocTransformations

Transformations for Adobe ExtendScript API Documentation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transformations for the Adobe ExtendScript API Documentation

This project contains the XSLT transformation files for creating a readable documentation of the Adobe ExtendScript APIs. The transformation is optimised for the InDesign DOM, but should work for other Adobe Extendscript DOMs as well. The files are transformed to DITA XML data model. I found the intermediate format particularly helpful for validating all references. It could also used to add more help information via DITA Topics by your own. You can set up your own DITA-OT Transformation to publish an output format of your like. I rendered a WebHelp Documentation with oXygen DITA-OT Webhelp.

If you want to use the documentation you can find the most recent CC (Version 10) API on my site www.indesignjs.de. For InDesign CS6 goto.

There is also an alternative node.js approach on github and a HTML compilation from jongware.

Before you start

  • Java and XSLT 2.0 Processor. For example Saxon XSLT Processor
  • Put the Adobe InDesign and ExtendScript Toolkit source files in Folder sourceXML

XML file locations

The XML source files can be found in the following locations on Mac OS X.

  • /Library/Application Support/Adobe/Scripting Dictionaries CC/CommonFiles
  • ~/Library/Preferences/ExtendScript Toolkit/4.0/omv$indesign-9.064$9.0.xml

On Windows the Files are located at:

  • \Users\[Username]\AppData\Roaming\Adobe\ExtendScript Toolkit\4.0\omv$indesign-10.064$10.0.xml
  • C:\Program Files (x86)\Common Files\Adobe\Scripting Dictionaries CC\CommonFiles\

The copyright of the original Files is by Adobe Systems Incorporated.

XSLT Transformations

The idea is, to create a merged and fixed DOM/API XML file. From this file several formats can be achieved. In this repository the XSLT for DITA (as used in the webhelp anbd Sublime Text Code Completions are included.

Create a merged and fixed DOM-File

  1. Merge the Source files and get rid of namespace bugs with mergeFiles.xslt. This transformation works with a named template (Saxon Option is '-it mergeDOMFiles'). You can change the path params in the file (Line 13 for the Product XML), or call the transformation with the path to indesign.xml, javascript.xml scriptui.xml.
  2. Fix DOM Structure for further processing with fixDom.xsl. All ScriptUI classes are postfixed with (SUI). Please note: There are some ugly hacks, basically replace() to get it working, probably some unrecognized bugs wil be produced. This file could also serve as a nice datasource for Sublimetext Code Completion Files.

Create DITA Topics

  1. Transform DOM Structure to DITA Topics and create a DITA Map with dom2dita.xsl You'll find the results in folder domOut
  2. Please note: For a readable output format you've to set up an DITA-OT Transformation.

Create Sublime Text Code Completions

  1. Transform DOM Structure to DITA Topics to Sublime Text Code Completions with dom2sublimeCodeCompletion.xsl. Use the result from fixDom.xsl. Create a jsx.sublime-completions file and put this into your Sublime Text Packages folder On Windows: \Users\[Username]\AppData\Roaming\Sublime Text 3\Packages On MacOS: ``/Library/Application Support/Sublime Text 3/Packages`

Other than InDesign

The transformation was adapted for Photoshop. The dom2dita.xsl has still a lot of "InDesign" Strings and the mini hierarchy won't work.

License

Creative Commons License
extendscriptApiDocTransformations by Gregor Fellenz is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at http://www.adobe.com/.

Acknowledgements

This project ist based on the fantastic ExtendScript API HTML from Theunis de Jong aka Jongware. Without his efforts and inspiration I would not have realized it. Thank you!

About

Transformations for Adobe ExtendScript API Documentation


Languages

Language:XSLT 100.0%