Loading ...
Sorry, an error occurred while loading the content.

Re: Configuring OxygenXML To Validate Toolkit Plugin XSL Files

Expand Messages
  • Bob Thomas
    This is quite useful. Thanks for taking the time to post it. Having validation working will save me lots of trouble. Bob Thomas
    Message 1 of 2 , Apr 29 1:06 PM
    View Source
    • 0 Attachment
      This is quite useful. Thanks for taking the time to post it. Having validation working will save me lots of trouble.

      Bob Thomas

      --- In dita-users@yahoogroups.com, Eliot Kimber <ekimber@...> wrote:
      >
      > While I was at the CIDM/DITA North America conference, George Bina showed me
      > how to set up Oxygen so you can validate all the files in a custom Toolkit
      > plugin.
      >
      > The process is as follows:
      >
      > 1. Set up an Oxygen project for your plugin development. For example, I have
      > a project for DITA for Publishers.
      >
      > 2. In the project, select the directory that contains your plugin's XSLT
      > files, e.g., org.example.myplugin/xsl
      >
      > 3. Right click on that directory and select "Validate -> Configure
      > Validation Scenario"
      >
      > 4. Click "new" to open the "Configure Validation Scenario" dialog. Give your
      > scenario a meaningful name, e.g. "myplugin validation" or whatever.
      >
      > 5. Under "URL of the file to validate" change the value from
      > "${currentFileURL}" to the top-level (master) file of your plugin, e.g.,
      > mypluginImpl.xsl or whatever you called it.
      >
      > 6. If it's not already set, set the File Type to "XSLT Document"
      >
      > 7. Under "Validation Engine", select "Saxon PE"
      >
      > 8. Click the "Extension" button to open "Libraries" dialog. Click "Add" and
      > set the value to "${frameworks}/dita/DITA-OT/lib/dost.jar". This allows the
      > validation scenario to resolve the custom Java functions used by the Toolkit
      > transforms. You have to set the validation engine to Saxon PE or Saxon EE
      > for this to work.
      >
      > 9. Save and close the scenario.
      >
      > You should now be able to open any file under the directory you just
      > associated the transformation scenario with and have them validate. In
      > addition, you'll get content completion for variables, named templates,
      > functions, and so on.
      >
      > If, as in the D4P source, the transform components are spread across
      > multiple plugins, you may need to associate the validation scenario with
      > those plugins' directories as well.
      >
      > If you are including files from the base Toolkit XSLT code, you will need to
      > create an XML catalog to resolve the references to the Toolkit's XSLTs from
      > your development location.
      >
      > For example, in the D4P EPUB transform I have this import:
      >
      > <!-- Import the base HTML output generation transform. -->
      > <xsl:import href="../../../xsl/dita2xhtml.xsl"/>
      >
      > This will work when the plugin is deployed to a Toolkit but won't work in my
      > development area because I don't have the Toolkit files copied into my
      > development area.
      >
      > To enable validation, I created this catalog:
      >
      > <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
      > <uriSuffix uriSuffix="dita2xhtml.xsl" uri="DITA-OT/xsl/dita2xhtml.xsl"/>
      > </catalog>
      >
      > And then put it in Oxygen's frameworks/dita directory as
      > toolkit-xslt-catalog.xml (this lets me change it to point to different
      > Toolkit versions I might have in the dita/ directory).
      >
      > I then added this catalog as a catalog in Oxygen's list of catalogs using
      > the reference "${frameworks}/dita/toolkit-xslt-catalog.xml".
      >
      > With all these bits in place, I can now edit the D4P Toolkit plugins with
      > full validation, including the Toolkit-provided XSLT files.
      >
      > Cheers,
      >
      > E.
      >
      > --
      > Eliot Kimber
      > Senior Solutions Architect, RSI Content Solutions
      > "Bringing Strategy, Content, and Technology Together"
      > Main: 512.554.9368
      > www.rsicms.com
      > www.rsuitecms.com
      > Book: DITA For Practitioners, from XML Press,
      > http://xmlpress.net/publications/dita/practitioners-1/
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.