description usable, to be completed.
Copyright © 2006 joerg.moebius@hamburg.de
Software and documentation is released under the terms of the GNU LGPL license and comes without a warranty of any kind.
2006-03-23
Table of Contents
xsdeclipse provides an eclipse user interface for xsdTransformer. xsdTransformer transforms XML schemata to other code (e.g. xhml sites containing XForms forms, JavaServer Pages containing jsf forms et al.). The provided xsdeclipse downloads are completely installable and runnable as it is. For only using xsdeclipse you don't need to download xsdTransformer.
This documents concerns to
xsdeclipse
- the eclipse interface of xsdTransformer. For further information concerning xsdTransformer itself please refer to the description of
xsdTransformer
.
xsdeclipse download comes with all needed libraries and files. For working with the generated xhtml files an xml editor has to be installed. It runs on eclipse 3.1.x and java 5.x.
eclipseProgramRoot
means your individual eclipse program root directory.
proceed the following steps:
Unpack xsdeclipse-n.n.xxx (n.n = Version No, xxx = file extension).
Copy the plugin
directory to your eclipseProgramRoot
.
You simply select a XML Schema file wihtin a navigator, package explorer or another appropriate eclipse viewer. At the context menu (right click) you chose one of the following actions.
xsdeclipse provides two actions at popup menu items:
'Generate XForms Site...'
'Generate XForms Site'
Whereas the first one gives the possibility to edit the procession parameters before starting the transformation. The latter one starts the transformation based on the default procession paramters. The two menu are contributed to the context menus of files with the extension 'xsd'.
xsdeclipse is designed to work as simple as possible. You trigger a transformation using one of the context menu items ('Generate XForms Site') and receives as result the generated xhtml site containing an XForms form within an window of suitable editor.
Even the procession parameters you have to determine only once. You determine the default values at the preference page and these default will be used in all coming runs.
As mentioned above xsdeclipse is the eclipse user interface of xsdTransformer. So this manual discusses all issues concerning the eclipse interface:
xsdeclipse
- the eclipse interface of xsdTransformer.
If you are interested in how xsdTransformer works, especially how xsdTransformer transforms XML schema artefacts to artefacts of the target language or system, please refer to:
In the further explanations
eclipseProgramRoot
means your individual eclipse program root directory
eclipseWorkspaceRoot
means your individual eclipse project root directory. If you are using more than one workspace the descriptions concerning workspace are to apply to each workspace accordingly.
xsdeclipse needs (besides the normal plugin resources) access to Apache log4j (1.2. subversion 9 or an above subversion) and Apche Xerces (Version 2.7.0 or above). The downloads still include the necessary jar files. Feel free to configure the access to the libraries after your fancy.
xsdeclipse is developed using eclispe 3.1.1, java 5 on Windows XP. java 5 id mandatory. xsdeclipse might run on all 3.1.x versions and on all platforms dedicated for eclipse.
xsdeclipse are available for all platforms under xsdeclipse downloads
The provided downloads are completely installable and runnable as it is. For only using xsdeclipse you don't need to download xsdtrans.
proceed the following steps
Unpack xsdeclipse-n.n.xxx (n.n = Version No, xxx = file extension).
Copy the plugin
directory to your eclipseProgramRoot
.
proceed the following steps
delete eclipseProgramRoot
/plugins/net.sourceforge.xsdeclipse
delete eclipseWorkspaceRoot
/plugins/net.sourceforge.xsdeclipse
This action transforms the selected file (input file) into an xhtml file containing XForms form and stores the new file in the same container, the input file resides in. The new file gets the same name as the input file with the extension 'xhtml'.
'Generate xForms Site' is the immediate start. You start the transformation based on the default procession parameters. 'Generate xForms Site...' is the start with customizing. Before starting the transformation you will get a dialog for changing the procession parameters.
xsdexclipse Wizard
Root Element is the entry point for the transformation. All top level elements of the selected XMLschema are provided here. | |
Language for labels, alerts, hints and helps. The transformation picks resp. generates the entries according the ajusted language | |
Min. Entries for 'full' Appearance the restriction entries of an xforms select1 control can be rendered either as group of radio control buttons (appearance 'full') or in case of a larger number of entries as a selection list (appearance 'minimal'). This parameter determines the number of entries from whereon the appearance 'minimal' (for listbox control in html) is applied. | |
Generate absent xxxx labels, alerts, hints and helps can be stored at annotation/appinfo of each element. With 'Generate absent xxx' you can force xsdTransformer to generate an entry if there is no entry at appinfo. | |
Container to place the output file in. | |
Filename of the output file. |
xsdeclipse comes with three important controlling files:
xsdTrans.xml
xsd2xf.xsl
log4j.xml
You can find these three file in the root installation directory. After installation at the very fist time you use one of the plugin features xsdeclipse copies these three files to the state location of the plugin within the workspace you are actually using (eclipseWorkspaceRoot
/.plugin/net.sourceforge/xsdeclipse).
Usually xsdTrans.xml and xsd2xf.xml needs no changes but log4j.xml do. In log4j.xml you can appoint your individual location of the log files.
Whenever you need to edit one of the controlling files, work on the copies at the state location. Otherwise your changes will take no effect on usage of the plugin.
xsdeclipse uses log4j for logging. At installation state log4j is configured to produce three log files.
Table 1. log files and its content
logfile | content |
---|---|
xsdeclipse.log | receives usual information messages, warnings and error messages |
xsdeclipse.error | receives only error messages |
xsdeclipse.debug | receives all messages including program debug messages |
At installation state the location parameter of these log files consists of only the file name. This results in a location at the root of eclipse installation.
You should change these location according your needs:
<appender name="debugFile" class="org.apache.log4j.FileAppender"> <param name="File" value="xsdeclipse.debug" /> <param name="Append" value="false" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{hh:mm:ss} %p %C.%M(%L): %m%n"/> </layout> </appender> <appender name="logFile" class="org.apache.log4j.FileAppender"> <param name="Threshold" value="info" /> <param name="File" value="xsdeclipse.log" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{hh:mm:ss} %p: %m%n"/> </layout> </appender> <appender name="errorFile" class="org.apache.log4j.FileAppender"> <param name="Threshold" value="error" /> <param name="File" value="xsdeclipse.error" /> <param name="Append" value="true" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{hh:mm:ss} %p %C.%M(%L): %m%n"/> </layout> </appender>
Software and documentation is released under the terms of the GNU LGPL license and comes without a warranty of any kind.
Copyright © 2006 joerg.moebius@hamburg.de