 |
OpenJade
Contents
OpenJade is an implementation of
the ISO/IEC 10179:1996 standard DSSSL language. It is
based on the James Clark
implementation of DSSSL named Jade. OpenJade is now developed and maintained
by the OpenJade team. The current version is 1.4.
For general information about DSSSL,
see the OpenJade home page. The OpenJade home page contains useful
resources such as links to articles, tutorials, libraries,
etc.
Another site with lots of in-depth
information about DSSSL is that of Mulberry Technologies. Among other things, it hosts the DSSSL
Users mailing list.
OpenJade is a command line
application and a set of components. The DSSSL engine
receives as input an SGML or XML document and transforms
it into formats like:
- XML representation of the flow
object tree.
- RTF format that can be
rendered and printed with Microsoft's free Word Viewer 97
- TeX format
- MIF format that can be
rendered and printed with Framemaker
- SGML or XML format. This is
used in conjunction with non-standard flow object
classes to generate SGML, thus allowing OpenJade
to be used for SGML/XML transformations.
Back to top
OpenJade is licensed with almost no
restrictions even for commercial use (see license terms).
If you do use OpenJade in a
commercial product, we ask you, as a courtesy, to
acknowledge the use of OpenJade.
Back to top
Only Microsoft Visual C++ 6.0 is supported. Also, Perl 5 is required; the
executable must be on your PATH.
To build on the command line, ensure that the directories
containing msdev and nmake are in your path,
typically by executing
the command:
path C:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin;
C:/Program Files/Microsoft Visual Studio/VC98/Bin;%path%
(all in one long line) then run the command:
build-win32.bat
To build using the Visual
Studio GUI, open the workspace jade.dsw and build the
Win32 Release configuration of the all
project. You must first do a command-line build, however, to get
the perl-generated files.
Use the autoconf support.
Back to top
OpenJade requires the file dsssl/builtins.dsl to operate.
You can tell OpenJade where this file is in one of two ways:
- By including a SYSTEM catalog entry for "builtins.dsl" pointing to this
file. See
dsssl/catalog for an example.
- By including the
dsssl/catalog catalog with the
-c command line option or the SGML_CATALOG_FILES
environment variable.
Run
make install
as root.
Back to top
Add the directory containing the
OpenJade binary to your path, change directory to the
dsssl directory, and do
openjade demo.sgm
If everything is working, there
should be a well-formed XML file demo.fot
created.
The system identifier of the
document to be processed is specified as an argument to
OpenJade. If this is omitted, standard input will be read.
OpenJade determines the system
identifier for the DSSSL specification as follows:
- If the
-d option
is specified, it will use the argument as the
system identifier.
- Otherwise, it will look for
processing instructions in the prolog of the
document. Two kinds of processing instruction are
recognized:
<?stylesheet
href="sysid"
type="text/dsssl">
- The system data of the
processing instruction is parsed like an
SGML start-tag. It will be parsed using
the reference concrete syntax whatever
the actual concrete syntax of the
document. The name that starts the
processing instruction can be either
stylesheet,
xml-stylesheet or xml:stylesheet.
The processing instruction will be
ignored unless the value of the type
attribute is one of text/dsssl,
text/x-dsssl, application/dsssl,
or application/x-dsssl. It is also
ignored if the selected backend is not suitable
for one of the media types listed as the value of
the media attribute.
OpenJade recognizes the media types
"print" (FOT, RTF, TeX and MIF backends) and
"screen" (FOT and HTML backends).
See the HTML4.0 specification for a list of valid media
types.
The value of href attribute is
the system identifier of the DSSSL
specification.
If there are multiple processing instructions in
the prolog, OpenJade selects one according to
the mechanism described in the HTML4.0 specification, taking the
values of the alternate and
title attributes into account.
<?dsssl sysid>
- The system identifier
is the portion of the system data of the
processing instruction following the
initial name and any whitespace.
Although the processing
instruction is only recognized in the prolog, it
need not occur in the document entity. For
example, it could occur in a DTD. The system
identifier will be interpreted relative to where
the the processing instruction occurs.
- Otherwise, it will use the
system identifier of the document with any
extension changed to
.dsl.
A DSSSL specification document can
contain more than one style-specification. If the system
identifier of the DSSSL specification is followed by #id,
then OpenJade will use the style-specification whose
unique identifier is id. This is
allowed both with the -d option and with the
processing instructions.
The DSSSL specification must be an
SGML document conforming to the DSSSL architecture. For
an example, see dsssl/demo.dsl.
OpenJade supports the following
options in addition to the normal SP options (note that
all options are case-sensitive, ie -g and -G
are different options):
-h, --help
- Display a help message and exit.
-v, --version
- Show the version number.
-d sysid,
--specification=sysid
- This specifies that sysid
is the system identifier of the DSSSL
specification to be used.
-T name,
--spec-title=name
- This specifies that name
is the title of the processing instruction to be used
in determining the applicable DSSSL specification.
-G, --debug
- Debug mode. When an error
occurs in the evaluation of an expression,
OpenJade will display a stack trace. Note that
this disables tail-call optimization.
-c sysid,
--catalog=sysid
- Use catalog sysid.
-C, --catalogs
- The arguments specify catalog
files rather than the document
entity. The document entity is specified by the
first DOCUMENT entry in the catalog
files.
-s, --strict
- Strict compliance mode.
Currently the only effect is that jade doesn't
use any predefined character names, sdata-entity
mappings or name-characters. This is useful for
checking that your stylesheet is portable to
other DSSSL implementations and that it is
strictly compliant to the DSSSL specifications.
-t type,
--output-type=type
- type specifies
the type of output as follows:
fot
- An XML representation
of the flow object tree
rtf rtf-95
- RTF (used for SGML/XML
to RTF transformations)
- Microsoft's Rich Text
Format.
rtf-95 produces
output optimized for Word 95 rather than
Word 97.
tex
- TeX (used for SGML/XML
to TeX transformations)
sgml sgml-raw
- SGML (used for SGML/XML
to SGML transformations).
sgml-raw doesn't emit linebreaks in tags.
xml xml-raw
- XML (used for SGML/XML
to XML transformations).
xml-raw doesn't emit linebreaks in tags.
- html
- HTML (used for SGML/XML
to HTML transformations)
mif
- MIF (used for SGML/XML
to MIF transformations)
-o file,
--output-file=file
- Write output to file
instead of the default. The default filename is
the name of the last input file with its
extension replaced by the name of the type of
output. If there is no input filename, then the
extension is added onto jade-out.
-V variable,
--define=variable
- This is equivalent to doing
(define
variable #t) except that this definition
will take priority over any definition of
variable in a style-sheet.
-V variable=value,
--define=variable=value
- This is equivalent to doing
(define
variable "value") except that
this definition will take priority over any
definition of variable in a style-sheet.
-V (define
variable value),
--define=(define variable value)
- This is equivalent to doing
(define
variable value) except that this
definition will take priority over any definition
of variable in a style-sheet. Note that you will probably
have to use some escaping mechanism for the spaces to get
the entire scheme expression parsed as one cmdline argument.
-2
- Enable experimental DSSSL extensions.
-w type,
--warning=type (examples: wxml, wmixed, wsgmldecl,
etc.)
- Control warnings and errors.
Multiple -w options are allowed. The
following values of type
enable warnings:
- xml
- Warn about constructs
that are not allowed by XML.
- mixed
- Warn about mixed
content models that do not allow #pcdata
anywhere.
- sgmldecl
- Warn about various
dubious constructions in the SGML
declaration.
- should
- Warn about various
recommendations made in ISO 8879 that the
document does not comply with. (Recommendations
are expressed with ``should'', as
distinct from requirements which are
usually expressed with ``shall''.)
- default
- Warn about defaulted
references.
- duplicate
- Warn about duplicate
entity declarations.
- undefined
- Warn about undefined
elements: elements used in the DTD but
not defined.
- unclosed
- Warn about unclosed
start and end-tags.
- empty
- Warn about empty start
and end-tags.
- net
- Warn about net-enabling
start-tags and null end-tags.
- min-tag
- Warn about minimized
start and end-tags. Equivalent to
combination of unclosed, empty
and net warnings.
- unused-map
- Warn about unused
short reference maps: maps that are
declared with a short reference mapping
declaration but never used in a short
reference use declaration in the DTD.
- unused-param
- Warn about parameter
entities that are defined but not used in
a DTD. Unused internal parameter entities
whose text is INCLUDE or IGNORE
won't get the warning.
- notation-sysid
|