ps2java is a series of DSSSL style sheets that create a series of Java interfaces and classes from a property set. ps2java uses (abuses?) Jade’s SGML backend to create a list of classes which is split into a series of individual files using an Java program included called Split.
ps2java 1.0.0 is available to download in zip file format.
To use the ps2java style sheets requires James Clark’s program Jade and JDK 1.1. It may run under JDK 1.0 but I have not tested it.
The batch file make.cmd runs Jade on the SGML property sets using the ps2intrfc.dsssl and ps2impl.dsssl style sheets. The output is piped through the Java program Split which creates the actual files. Then the batch file calls build.cmd which runs javac to compile the generated interfaces and classes. Finally make.cmd calls doc.cmd which runs javadoc to generate the documentation for the interfaces and the classes.
These batch files run under OS/2. You may need to modify them to run on your system and OS.
ps2java comes with two main style sheets. ps2intrfc.dsssl is a style sheet that creates the Java interfaces. ps2impl.dsssl is a style sheet that creates a partial implementation of these interfaces. It is only a partial implementation because the resulting classes contain only methods for reading data. They have no methods for creating the classes or altering them.
There are two other style sheets called node2intrfc.dsssl and node2impl.dsssl. These are modified versions of the previous style sheets. They were used to create the classes Node and NodeImpl from a property set called intrinsicps.sgml. These implement the common intrinsic properties of nodes. intrinsicps.sgml is a fake property set that defines these intrinsic properties.
All these style sheets transclude the files common.ent and standard.ent. common.ent is a set of common functions used between the style sheets. standard.ent are functions that are included in the DSSSL specifications and used by these style sheets, but they are not implemented by Jade.
These style sheet are designed to work on all property sets, but I have only tested it on the SGML property set. This property set is included in ps2java. It is in the file hi2pssgm.sgml.
ps2java also includes several Java classes. NodeAdt and NodeAdtImpl hold basic node methods to access node properties. NodeList, NamedNodeList, NodeNamedNodeList, StringNamedNodeList, and CompName are all used for the basic data types that groves use that are not already in Java.
Split is a Java program that splits up input into several files. It creates subdirectories as needed.
make.cmd is an OS/2 batch file to generate classes and interfaces from the SGML property set, compile these classes, and document them. build.cmd runs javac to do the compiling. doc.cmd runs javadoc to generate the documentation.
No interfaces or classes are made for empty classes.
The propertyNameList omits propdefs belonging to #all. If all of this propdefs are defined at the beginning of the property set a workaround is to append them to the *intrinsicPropertyNameList* variable in ps2impl.dsssl.
THIS SOFTWARE IS PUBLIC DOMAIN AND IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OR ANYONE ELSE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.