DocFlex/XML XMLSpy Integration, Version 1.0


Table Of Contents


About XMLSpy Integration

The integration of DocFlex/XML with Altova XMLSpy® is a special add-on to the DocFlex/XML core that allows users to automatically insert the graphics diagrams produced by XMLSpy into the XML schema documentation generated by DocFlex/XML XSDDoc (with full support of diagram hyperlinks).

This is not an XMLSpy plugin. (That would be actually impossible because XMLSpy itself is not based on Java.) Rather, the integration allows DocFlex/XML to launch an instance of XMLSpy as a separate parallel process and call some its functionality, essentially turning XMLSpy into a DLL (Dynamically Linked Library). Such usage in fact was supported by Altova itself, who includes in XMLSpy the 'XMLSpyInterface.jar' Java library, which provides all necessary interfaces.

The integration exposes that functionality to templates via several FlexQuery functions, which allow a template to:

  1. Launch XMLSpy (start a session to communicate with it).
  2. Process with XMLSpy a specified XSD file. That is force XMLSpy to open that schema and generate diagrams (along with imagemaps) for its components to be further processed by the integration.
  3. Shut down the XMLSpy.
(You can find all those functions via Template Designer main menu: Help | Assistant | Functions by Category | XMLSpy Integration Functions.)

But having XMLSpy generate the diagrams is not enough. Further, the diagrams need to be inserted into the output generated with templates. Here is how it is done.

DocFlex/XML templates operate with abstract data entities called DSM elements (and DSM attributes), on which everything contained in XML files (as well as XML files themselves) is mapped. That mapping is maintained by a special module called XML DSM driver. Each DSM element may have a certain graphic representation called element image, which is provided by a special extension of the DSM driver called Element Image Provider. Element images can be easily operated in templates using Image Controls.

Once the diagrams have been generated by XMLSpy, the integration associates them (as well as imagemap hyperlinks) with the DSM elements representing corresponding XML schema components. Further, a special Element Image Provider implemented within the integration treats each diagram as an element image of the DSM element associated with the XML schema components depicted on that diagram. In that way, the diagrams become accessible via Image Controls in templates, which makes possible to easily program their insertion in the output generated by DocFlex/XML.

Since XMLSpy Integration is heavily connected with the DocFlex/XML core, all Java classes implementing it are currently included in the general DocFlex/XML Java library: docflex-xml.jar (or docflex-xml-re.jar). However, in order to use it, the integration needs to be installed separately and requires separate licensing.

Content Files

README.html this file
*.bat Windows command files to run DocFlex/XML integrated with XMLSpy:
designer.bat
  • launches the Template Designer
generator.bat
  • starts only generator from command line
ant/ Ant example files:
ant/build.xml
  • The Ant build file that demonstrates how to call the unified DocFlex/XML+XMLSpy documentation generator from the Apache Ant so as to generate an XML Schema documentation with diagrams.
ant/make.bat
maven/ A demo project that shows how to configure the unified DocFlex/XML+XMLSpy Maven plugin to generate an XML Schema documentation with diagrams for the reports section of a Maven-generated site:
maven/pom.xml
  • The project POM file
maven/site.bat

Note: These files and directories can be found in 'xmlspy/' subdirectory of each edition of DocFlex/XML.

Technical Requirements

Licensing / Processing Modes

Being a complex piece of software that took great efforts to develop, the XMLSpy Integration requires a separate licensing. Depending on your license, the integration may work in one of two different modes: full or trial.

Full Mode

The Full Mode is activated in the presence of a Commercial or Academic License for "DocFlex/XML XMLSpy Integration".

This mode allows you to use the integration without any limitations. Once it is enabled, you may think about the integration as yet another part of DocFlex/XML executables.

Anything else will depend on other your licenses.

Trial Mode

The Trial Mode is activated in the presence of a Trial License for "DocFlex/XML XMLSpy Integration". In this mode, the integration will work the same as in the full mode. However, no matter what your other licenses are the following limitations will be enforced: The trial mode for XMLSpy Integration will not affect your possibility to create/modify templates. This is controlled by your license for DocFlex/XML SDK!

Installation

Edit generator.bat and designer.bat as the following:
  1. In 'JAVA_HOME' variable, specify the location of your Java 6 or Java 5 installation directory. For example:
    set JAVA_HOME="C:\Program Files\Java\jre6"
    Note: When the directory pathname contains spaces, it must be enclosed in double quotes!

  2. In 'XMLSPY_JAVA_LIB' variable, specify the location of 'XMLSpyInterface.jar' file that must be found in your XMLSpy installation directory. For example:
    set XMLSPY_JAVA_LIB="C:\Program Files\Altova\XMLSpy2009\XMLSpyInterface.jar"
    Note: When the file pathname contains spaces, it must be enclosed in double quotes!

  3. In 'XMLSPY_VERSION' variable, specify your XMLSpy version number. For example:
    set XMLSPY_VERSION=2009
    Note: The acceptable version number must be an integer in the range from 2004 to 2009
Copy the XMLSpy Integration license file 'docflex-xml-xmlspy.license', which you must have received by e-mail, to the {docflex-xml}\lib directory (near the docflex-xml.jar file).

Now, everything must be ready. You can start generator.bat to run DocFlex/XML generator integrated with XMLSpy.

For further specific details about the installation of XMLSpy Integration, please see: www.filigris.com | DocFlex/XML | Integrations | XMLSpy | Installation

Running Ant Demo

  1. Edit ant\build.xml to specify:

  2. Edit ant\make.bat to specify the locations of your Java and Ant installations
  3. Run ant\make.bat
For more details about running DocFlex/XML+XMLSpy with Apache Ant, please see: www.filigris.com | DocFlex/XML | Integrations | XMLSpy | Running with Apache Ant

Running Maven Demo

  1. Install (or reinstall) DocFlex/XML Maven Plugin (so that it could call XMLSpy from itself) as follows.

    In {docflex-xml}\mavem\plugin\ directory, edit pom.xml to uncomment the following lines and specify the absolute location of XMLSpy Java interface library and XMLSpy version:

    <dependency>
      <groupId>xmlspy</groupId>
      <artifactId>XMLSpyInterface</artifactId>
      <version>2009</version>
      <scope>system</scope>
      <systemPath>C:\Program Files\Altova\XMLSpy2009\XMLSpyInterface.jar</systemPath>
    </dependency>
    
    Further, follow the installation instruction found in {docflex-xml}\mavem\plugin\index.html

  2. In {docflex-xml}\xmlspy\maven\ directory:

    Edit pom.xml to specify your XMLSpy version in the following line:

    <param>-m:XMLSPY_VERSION=2009</param>
    Edit site.bat to specify the locations of your Java and Maven installations.

  3. Run site.bat
For more details about running DocFlex/XML+XMLSpy with Apache Maven, please see: www.filigris.com | DocFlex/XML | Integrations | XMLSpy | Running with Apache Maven

Getting Help

The most detailed and up-to-date information about the XMLSpy Integration can be found on this page: www.filigris.com | DocFlex/XML | Integrations | XMLSpy.

If you have any questions, suggestions, etc., please let us know by sending an email to: support@docflex.com or contact@filigris.com


Copyright© 2009 Filigris Works, Leonid Rudy Softwareprodukte.
To contact us, please visit www.filigris.com or e-mail to: contact@filigris.com