[This local archive copy (snapshot only, invalid links probably) mirrored from the canonical site: http://itrc.uwaterloo.ca/~kmarszal/mif/, 1980505; links may not have complete integrity, so use the canonical document at this URL if possible.]
What's New Usage Source Code Binaries Compiling Building as DLL Problems & Limitations Tips Supported Flow Objects Architecture Use Declaration Processing Instruction Support sgml-parse Function Extension New OLE Automation function: archParse
Fixed problems with ArcOpt and ArcOptSA architecture support attributes. Fixed problems with tables from DocBook stylesheet test.
The command line options are described in detail on the James Clark's jade page. To generate mif files use the -t mif option; there's been no new command line options added besides that.
Tested with the version 1.1 of James Clark's Jade.
Source Code Changes | ||
---|---|---|
File | Subdirectory | Status |
ArcEngine.cxx | lib | changed |
ArcEngineMessages.msg | lib | changed (auto) |
ArcEngineMessages.rc | lib | changed (auto) |
ArcProcessor.h | lib | changed |
arc_ins.cxx | lib | changed (auto) |
arc_ins.m4 | lib | changed |
CGroveBuilder.cxx | groveoa | changed |
CGroveBuilder.h | groveoa | changed |
DssslApp.cxx | style | changed |
DssslApp.h | style | changed |
FlowObj.cxx | style | changed |
FOTBuilder.h | style | changed |
GroveManager.h | style | changed |
groveoa.idl | groveoa | changed |
Interpreter.cxx | style | changed |
Interpreter.h | style | changed |
jade.cxx | jade | changed |
jade.h | jade | new |
jade.mak | . | changed |
jade.rc | jade | changed |
Makefile.sub | jade | changed |
MifDoc.cxx | jade | new |
MifDoc.h | jade | new |
MifFOTBuilder.cxx | jade | new |
MifFOTBuilder.h | jade | new |
MifFOTBuilderPrivate.h | jade | new |
MifFOTBuilder_ins.cxx | jade | new (auto) |
MifFOTBuilder_ins.m4 | jade | new |
MifMessages.h | jade | new (auto) |
MifMessages.msg | jade | new |
MifMessages.rc | jade | new (auto) |
primitive.cxx | style | changed |
primitive.h | style | changed |
SgmlParser.cxx | lib | changed |
SgmlParser.h | include | changed |
SP.mak | . | changed |
TmpOutputByteStream.h | jade | new |
Zipped James Clark's distribution of Jade 1.1: [download (1077 KB)]
Zipped source code of MIF backend
(contains subdirectories: use pkunzip -d under DOS):
[download (163 KB)]
"make -f Makefile.jade depend" and then "make -f Makefile.jade" to compile. When unzipping use the unzip's option -a.
Open and build SP.mak, and then jade.mak
Zipped Win95/NT binaries: jade.exe, nsgmls.exe, sgmlnorm.exe, spam.exe, spent.exe, sx.ede, jade.dll, sp130.dll, grove.dll, groveoa.dll, spgrove.dll, style.dll [download (1,269 KB)]
Make sure that the following project options are set:
Preprocessor definitions: SP_NAMESPACE=James_Clark_SP, DSSSL_NAMESPACE=James_Clark_DSSSL, GROVE_NAMESPACE=James_Clark_GROVE, SP_MULTI_BYTE, JADE_USE_DLL
Include directories: jade, style, spgrove, grove, include (in the jade source directory)
Library modules: jade_dll\Release\jade.lib lib\UnicodeRelease\sp130.lib style\Release\style.lib grove\Release\grove.lib spgrove\Release\spgrove.lib (in the jade source directory)
Run-time library: Multithreaded DLL
Resources: Include jade/jade.rc in your project (jade DLLs will look for message strings inside your application)
Here's a small example:
#include "jade.h" int main() { James_Clark_DSSSL::JadeApp jadeApp; // use functions provided by the ...App classes (JadeApp/DssslApp/GroveApp/ParserApp). // command-line options can be set using jadeApp.processOption( ... ) // and/or jadeApp.run( ... ) } |
If you have any suggestion/solutions you can contact me through email kmarszal@watarts.uwaterloo.ca
You must decide on the filename extension you'll use at the stage when you run jade. If you don't want the .mif extension for your final document, feel free to use other extension when specifying the file name using the -o option.
Currently jade supports only RGB color space. Here's an example of a red rule:
(make rule color: (color (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB") 1 0 0) ... ) |
Flow Objects |
character
display-group rule score line-field leader link index-entry sequence external-graphic paragraph paragraph-break simple-page-sequence table table-part table-column table-row table-cell table-border |
---|
character | |
---|---|
Inherited characteristics | Non-inherited characteristics |
font-weight
font-posture font-name font-size input-whitespace-treatment position-point-shift language country color 1 | |
1Currently jade supports (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB") |
display-group | |
---|---|
Inherited characteristics | Non-inherited characteristics |
space-before
space-after keep-with-previous? keep-with-next? break-before (#f, page) break-after (#f, page) keep (#f, page) may-violate-keep-before? may-violate-keep-after? |
rule | |
---|---|
Inherited characteristics | Non-inherited characteristics |
line-cap
line-thickness line-repeat line-sep position-point-shift display-alignment (start, end, center) start-indent end-indent span (spans all columns if > 1) color 1 |
orientation (horizontal, escapement)
length space-before space-after keep-with-previous? keep-with-next? break-before (#f, page) break-after (#f, page) keep (#f, page) may-violate-keep-before? may-violate-keep-after? |
1 Currently jade supports (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB") |
score | |
---|---|
Inherited characteristics | Non-inherited characteristics |
line-repeat (1 for type of before and through, 1 or 2 for after) | type (before, through, after) |
line-field* | |
---|---|
Inherited characteristics | Non-inherited characteristics |
field-width
field-align | |
* At the beginning of paragraph only. |
leader* | |
---|---|
Inherited characteristics | Non-inherited characteristics |
* On the last line of paragraph only. The principial port (the leader string itself) can contain characters only. |
link | |
---|---|
Inherited characteristics | Non-inherited characteristics |
destination [#f, objects returned by (idref-address ...) and (current-node-address ...)] |
index-entry | |
---|---|
Inherited characteristics | Non-inherited characteristics |
components
page-number? sort-string starts-page-range? ends-page-range? | |
| |
Here's how to enable the above extension: (declare-flow-object-class index-entry "UNREGISTERED::ISOGEN//Flow Object Class::index-entry") |
external-graphic | |
---|---|
Inherited characteristics | Non-inherited characteristics |
space-before
space-after |
display?
scale (max) max-width max-height entity-system-id display-alignment start-indent end-indent span (spans all columns if > 1) space-before space-after keep-with-previous? keep-with-next? break-before (#f, page) break-after (#f, page) keep (#f, page) may-violate-keep-before? may-violate-keep-after? |
paragraph | |
---|---|
Inherited characteristics | Non-inherited characteristics |
lines (wrap, asis-wrap)
hyphenation-ladder-count hyphenation-remain-char-count hyphenation-push-char-count font-weight font-posture font-name font-size quadding widow-count orphan-count language country |
span (spans all columns if > 1)
space-before space-after keep-with-previous? keep-with-next? break-before (#f, page) break-after (#f, page) keep (#f, page) may-violate-keep-before? may-violate-keep-after? line-spacing min-leading (#f or 0 for proportional line spacing) first-line-start-indent |
paragraph-break | |
---|---|
Inherited characteristics | Non-inherited characteristics |
Same as for paragraph | Same as for paragraph |
simple-page-sequence | |
---|---|
Inherited characteristics | Non-inherited characteristics |
page-width
page-height left-margin right-margin top-margin bottom-margin header-margin footer-margin |
left-header
center-header right-header left-footer center-footer right-footer |
| |
Here's how to enable the above extensions: (define if-first-page (external-procedure "UNREGISTERED::James Clark//Procedure::if-first-page")) (define if-front-page (external-procedure "UNREGISTERED::James Clark//Procedure::if-front-page")) (declare-characteristic page-n-columns "UNREGISTERED::James Clark//Characteristic::page-n-columns" 1) (declare-characteristic page-n-columns "UNREGISTERED::James Clark//Characteristic::page-column-gap" (* 36 1pt)) (declare-characteristic page-balance-columns? "UNREGISTERED::James Clark//Characteristic::page-balance-columns?" #f) |
table | |
---|---|
Inherited characteristics | Non-inherited characteristics |
table-border
display-alignment start-indent end-indent |
table-width
before-row-border after-row-border before-column-border after-column-border span (spans all columns if > 1) space-before space-after keep-with-previous? keep-with-next? break-before (#f, page) break-after (#f, page) keep (#f, page) may-violate-keep-before? may-violate-keep-after? |
table-part | |
---|---|
Inherited characteristics | Non-inherited characteristics |
space-before
space-after keep-with-previous? keep-with-next? break-before (#f, page) break-after (#f, page) keep (#f, page) may-violate-keep-before? may-violate-keep-after? | |
header
footer |
table-column | |
---|---|
Inherited characteristics | Non-inherited characteristics |
start-indent
end-indent |
column-number
n-columns-spanned width |
(table-unit k) |
table-cell | |
---|---|
Inherited characteristics | Non-inherited characteristics |
cell-before-row-margin
cell-after-row-margin cell-before-column-margin cell-after-column-margin cell-row-alignment cell-before-row-border cell-after-row-border cell-before-column-border cell-after-column-border cell-background? background-color 1 |
column-number
n-columns-spanned n-rows-spanned starts-row? ends-row? |
1 Currently jade supports (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB") |
table-border | |
---|---|
Inherited characteristics | Non-inherited characteristics |
border-present?
line-thickness line-repeat (0, 1, or 2) line-sep color 1 | |
1 Currently jade supports (color-space "ISO/IEC 10179:1996//Color-Space Family::Device RGB") |
From the ISO/IEC 10744 Amendment 1 ( http://www.ornl.gov/sgml/wg8/document/1957.htm):
The architecture use declaration (arch) processing instruction provides an alternative form of architecture use declaration for use in environments where notations or data attributes are not supported. Architecture use PIs should occur within the prolog. It is not necessary to specify architecture base declarations for architectures declared using architecture use PIs. If multiple declarations are specified for an architecture, the first such declaration is used.
The processing instruction shall have the following form:
pio, "IS10744", (":" | s+), "arch", attribute specification list, pic
where the attribute specification list specifies attributes corresponding to the architecture notation declaration, architectural meta-DTD entity declaration, and architecture support attributes. The attributes corresponding to the architecture notation declaration are:
Attribute | Description | Equivalent Architectural Form Definition Attribute |
---|---|---|
name | Architecture name | |
Public identifier of architecture specification document | ||
Public identifier of architectural meta-DTD | ||
System identifier of architectural meta-DTD | ||
Architectural form attribute name | ArcFormA | |
Architectural attribute renamer attribute name | ArcNamrA | |
Architecture suppressor attribute name | ArcSuprA | |
Architecture ignore data attribute name | ArcIgnDA | |
Architecture document element form name | ArcDocF | |
Architecture bridge form name | ArcBridF | |
Architecture data form name | ArcDataF | |
auto | Architecture automatic form mapping | ArcAuto |
options | Architecture options | ArcOpt |
quantity | Architecture quantity set; the value must consist of pairs of quantity names and numbers | ArcQuant |
NOTE: In this implementation the processing instruction attributes can override/supplement the Architectural Form Definition attributes if both methods are used.
simplearch.dtd |
<!ELEMENT simpledoc - o (title, paragraph+)> <!ELEMENT title - o (#PCDATA)> <!ELEMENT paragraph - o (#PCDATA)> |
trip.dtd |
<!ELEMENT trip.report - o (destination, p+)> <!ELEMENT destination - o (#PCDATA)> <!ELEMENT p - o (#PCDATA)> <!ATTLIST trip.report simplearch NAME #FIXED "simpledoc" > <!ATTLIST destination simplearch NAME #FIXED "title" > <!ATTLIST p simplearch NAME #FIXED "paragraph" > |
test.sgml |
<!doctype trip.report SYSTEM "trip.dtd" [ <?IS10744:arch name="simplearch" doc-elem-form="simpledoc" dtd-system-id="simplearch.dtd"> ]> <trip.report> <destination>XML Developer's Day <p>I attended the XML Developer's day...</p> </trip.report> |
Result of running nsgmls test.sgml |
?IS10744:arch doc-elem-form="simpledoc" dtd-system-id="simplearch.dtd" ASIMPLEARCH TOKEN SIMPLEDOC (TRIP.REPORT ASIMPLEARCH TOKEN TITLE (DESTINATION -XML Developer's Day )DESTINATION ASIMPLEARCH TOKEN PARAGRAPH (P -I attended the XML Developer's day... )P )TRIP.REPORT C |
Result of running nsgmls -Asimplearch test.sgml |
(SIMPLEDOC (TITLE -XML Developer's Day )TITLE (PARAGRAPH -I attended the XML Developer's day... )PARAGRAPH )SIMPLEDOC C |
The DSSSL sgml-parse function has been extended from this definition:
(sgml-parse string #!key active: parent:)
to this one:
(sgml-parse string #!key active: parent: architecture:)
where architecture is a string specifying the architecture name with respect to which the SGML document entity should be parsed.
It's now possible to parse with respect to an architecture or multiple architectures using the OLE Automation interface. Here's the IDL definition of the function:
HRESULT archParse([in] BSTR systemId, [in] BSTR archNames, [out, retval] SgmlDocumentNode **);
The archNames parameter should contain one or more architecture names separated by spaces (this corresponds to multiple -A options of nsgmls.)