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 a Java API that provides all necessary interfaces.
The integration exposes that functionality to templates via several FlexQuery functions, which allow a template to:
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
.
However, in order to use it, the integration requires the separate setup
and license.
For all details about the XMLSpy Integration, please see: www.filigris.com | DocFlex/XML | Integrations | XMLSpy.
README.html
|
this file |
*.bat
|
Windows command files to run DocFlex/XML integrated with XMLSpy: |
generator.bat
|
|
designer.bat
|
|
linux/
|
Linux shell script files to run DocFlex/XML+XMLSpy on Linux: |
linux/generator.sh
|
|
linux/designer.sh
|
|
linux/xmlspy.sh
|
|
ant/
|
Ant example files: |
ant/build.xml
|
|
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
|
|
maven/site.bat
|
|
Note: These files and directories can be found in 'integrations/XMLSpy/'
subdirectory of each edition of
DocFlex/XML.
Basically, what is needed for the integration to work is that your XMLSpy edition supports:
(For instance, the "Standard" edition has no such things.)
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.
generator.bat
and designer.bat
as the following:
'JAVA_HOME'
variable, specify the location of your Java 7, Java 6 or Java 5 installation directory, e.g.:
set JAVA_HOME=C:\Program Files\Java\jre7
'XMLSPY_HOME'
variable, specify the location of XMLSpy installation directory, e.g.:
set XMLSPY_HOME=C:\Program Files\Altova\XMLSpy2013
'XMLSPY_VERSION'
variable, specify your XMLSpy version number, e.g.:
set XMLSPY_VERSION=2013
'docflex-xml-xmlspy.license'
,
which you receive by e-mail, to the {docflex-xml}\lib
directory
(near the docflex-xml.jar
file).
Note: The license for XMLSpy Integration may be also included in a combined 'docflex-xml.license'
file (along with other licenses), which should be also installed in the same location.
|
generator.bat
to run DocFlex/XML generator
integrated with XMLSpy.
For further specific details about setting up XMLSpy Integration, please see: www.filigris.com | DocFlex/XML | Integrations | XMLSpy | Getting It Work
wine XMLSpyEnt2013.exe
(or simply click on the XMLSpyEnt2013.exe in a Linux file manager GUI).
When the standard XMLSpy installation dialog appears, pass all its steps (the same as on Windows).
After that, you will need to run XMLSpy so as to register your license for it. Typically the installer already creates (via Wine) a link on the desktop to run XMLSpy. If you don't see such a link, you can run XMLSpy directly. Open a terminal and type like this:
wine 'C:\Program Files\Altova\XMLSpy2013\XMLSpy.exe'
XMLSpy will be launched!
wine jdk-7u4-windows-i586.exe
(or just click on the 'jdk-7u4-windows-i586.exe'
in a Linux file manager).
When Java installation dialog appears, pass all its steps.
{docflex-xml}/integrations/XMLSpy/linux/generator.sh
(and designer.sh
)
to specify the location and version of XMLSpy in the following lines:
XMLSPY_HOME='C:\Program Files\Altova\XMLSpy2013'
XMLSPY_VERSION='2013'
'docflex-xml-xmlspy.license'
,
which you receive by e-mail, to the {docflex-xml}/lib
directory
(near the docflex-xml.jar
file).
Note: The license for XMLSpy Integration may be also included in a combined 'docflex-xml.license'
file (along with other licenses), which should be also installed in the same location.
|
linux/generator.sh
to run DocFlex/XML generator integrated with XMLSpy
(or linux/designer.sh
to run the Template Designer).
Important:
'/home/.wine'
,
where it replicates the typical Windows directory structure.
A Windows file pathname is translated by Wine to a Linux pathname against this directory.
As we've found, the problem can be worked around by not quitting the XMLSpy during the generation at all. Then, we release the XMLSpy instance on finishing DocFlex/XML / exiting JVM. This appears to go well. (At least, all the documentation with the diagrams is ready by then).
The quitting of XMLSpy is controlled by a separate template parameter.
In XSDDoc, it is the parameter: "Integrations | XMLSpy | Quit XMLSpy".
Check it is set false
!
On some Linux distributions (e.g. Ubuntu), the Wine installs the "Arial" font itself. On others (e.g. Fedora), it does not. In that case, the "Arial" font is mapped to some Linux system font, which may look ugly in the diagrams.
The solution is to find the Windows "Arial" font, e.g.:
c:\Windows\Fonts\arial.ttf
and install in Linux.
(For instance, in Fedora KDE, this can be done via System Settings | System Administration | Font Management).
linux/generator.sh
and pass to it all necessary settings via shell script parameters
(and further on the Java command line running DocFlex/XML).
{docflex-xml}\integrations\XMLSpy\ant\build.xml
to specify:
'XMLSPY_HOME'
property set the location of XMLSpy installation directory.
'XMLSPY_VERSION'
property set your XMLSpy version.
make.bat
(in the same directory) to specify the locations of your Java and Ant installations
make.bat
Follow the installation instruction found in {docflex-xml}\integrations\maven\plugin\index.html
{docflex-xml}\integrations\XMLSpy\maven\
directory:
Edit pom.xml
to specify the absolute pathname of your XMLSpy installation directory
and XMLSpy version in the following line:
<!-- XMLSpy home directory -->
<XMLSPY_HOME>C:\Program Files\Altova\XMLSpy2013</XMLSPY_HOME>
<!-- XMLSpy version -->
<XMLSPY_VERSION>2013</XMLSPY_VERSION>
Edit site.bat
to specify the locations of your Java and Maven installations.
site.bat
If you have any questions, suggestions, etc., please let us know by sending an email to: support@docflex.com or contact@filigris.com
Along with the old XMLSpy Java API (based on 'XMLSpyInterface.jar'
),
the integration now supports the new API introduced since XMLSpy 2012,
which is based on the files found in the directory:
C:\Program Files\Altova\XMLSpy\JavaAPI\
Which exactly of those APIs will be used is specified via a parameter of spyStart()
FlexQuery function called from templates (see:
Template Designer | Help | Expression Assistant | Functions | By Category | XMLSpy Integration Functions).
This, in turn, is controlled via a template parameter (e.g. see XSDDoc parameter: Integrations | XMLSpy | Workarounds | XMLSpy API).
To run the XMLSpy Java API code, the JVM needs to know the location of XMLSpy Java API classes,
which must be specified as a part of DocFlex/XML Java classpath.
The JVM also needs to know the location (directories) of Windows DLLs used by XMLSpy API.
This can be also specified on the DocFlex/XML Java command line using command line option:
-Djava.library.path=...
Unfortunately, specifying it in that way is not very good. Particularly, things become messy when you want to call DocFlex/XML+XMLSpy from something else.
For instance, on Maven it is impossible simply to extend the Java classpath.
Rather, you need to install a special 'artifact' for that.
Passing to Maven's JVM the -Djava.library.path option would require
specifying it directly in a command file running Maven, which may easily interfere
with something else.
|
'XMLSPY_CLASSPATH'
and 'XMLSPY_LIBPATHS'
macros.
For example:
set XMLSPY_HOME=C:\Program Files\Altova\XMLSpy2012 ... java ... -m:XMLSPY_CLASSPATH="%XMLSPY_HOME%\JavaAPI\XMLSpyAPI.jar;%XMLSPY_HOME%\JavaAPI\AltovaAutomation.jar" -m:XMLSPY_LIBPATH="%XMLSPY_HOME\JavaAPI"
In fact, those macros are used in the XMLType definition file that describes the
data source of a particular template set (e.g. in case of XSDDoc, it is
{docflex-xml}/templates/XSDDoc/xsddoc.xmltype ).
There, they are extended to the values of image provider's parameters. The image provider, in this case,
is XMLSpy Integration represented by its main class: com.docflex.xml.xmlspy.SpyKit .
Thereby, both the XMLSpy Java class path and XMLSpy library paths are passed directly to the integration
and processed by it.
|