Interscript
An Interchange Standard for Editable Documents

History, Motivation, Goals, and Constraints  Mitchell

The Base Language: A Travelogue  Mitchell

Short Break  Everyone

The Layout Model  Ayers

Some Standard Constructs  Ayers
Interscript Seminar   November, 1983
History, Motivation, Goals, and Constraints

History

Motivation and Goals

What properties should Interscript have?

What Interscript is not

What is in the first version of Interscript?
Interscript Seminar   November, 1983
History

May '81:
Project starts in CSL at Lampson's suggestion.
(Horning, Mitchell, McGregor, Paxton, Reid)

Aug '81:
SISB authorizes development of standard;
SDD joins the party.
(above plus Ayers, Curry, de la Beaujardiere, Karlton)

Sept '81  Feb '83:
The work grinds on. (Ayers, Horning, Guttag, Lampson, Mitchell)

Mar '83  May '83:
The "March" Interscript Offensive
(Ayers, Horning, Lampson, Mitchell)

June '83  Sept '83:
First Draft Standard is produced (Ayers, Mitchell)

Oct '83:
Interscript test implementation for the PICS
publishing project begins (ABrown, Ayers)
Interscript Seminar   November, 1983
Motivation and Goals
Motivation

Xerox needs an interchange standard for editable documents
for product compatibility
for product evolution

It is an interesting technical problem

External standards organizations are active in this area
formatting language focus

Goals

A standard that supports
WYSIWYG editors
formatting languages

A standard that can span the Xerox product range

A standard that can evolve
Interscript Seminar   November, 1983
What properties should Interscript have?
(or for that matter, any interchange standard)

It must be "as simple as possible, but no simpler"

It must enable interchange among editors of varying capabilities

It must be simple to internalize a script

Both form and content must be representable

Structure must be representable and preservable

It must be simple to externalize a document

The encoding should be efficient in space and time

It must be extensible
Interscript Seminar   November, 1983
What Interscript is not

It is not a file format

It is not a standard for editing

It is not an editing system itself
combining documents is not an Interscript function

It is not a substitute for other corporate standards
e.g., character codes, font naming

It is not intended for human communication
Interscript Seminar   November, 1983
What is in the first version of Interscript?

A processing model
internalization  editing  externalization

A (solid) basis for the standard
description language for scripts
tiny syntax; small, precise semantics

Standardized document constructs
TEXT (FONT, TAB)
TEXTFIELD
TABLE (TABLEROW, TABLEENTRY, COLUMNSPLIT)
PARAGRAPH
INTERPRESS

Standardized layout constructs
description not prescription: TEX-like
a general layout model
Interscript Seminar   November, 1983
The Base Language: A Travelogue

Syntax and Semantics by Example

When are Two Scripts Equivalent?

Tags and Node Invariants

Ignorance-Based Editing
Interscript Seminar   November, 1983
Syntax and Semantics by Example (1)
A Script is a tree of nodes
{ "This string is the only content of this node" }

A Script is a tree of nodes
INTERSCRIPT/INTERCHANGE/1.0
{ DOCUMENT$
{ TEXT$ "This is the first subnode of the document" }
{ TEXT$ "This string is the only content of this node" }
} ENDSCRIPT

Basic values are atoms, numbers, strings, and quoted expressions
Atoms: TEXT DOCUMENT SimpleId any.qualified.name
Numbers: 0 1 2 3.14159 1.7E3
Strings: "just characters in quotes"
Quoted Expressions: '3+5' '{ PARAGRAPH$ leftMargin� }'
Interscript Seminar   November, 1983
Syntax and Semantics by Example (2)

An attribute is a name-value pair
leftMargin ← 36

Expressions are very simple
leftMargin^
leftMargin^ LT (rightMargin^20)
leftMargin^+rightMargin^20

The only kind of structured value is a node
A content-only node is like a vector
a ← { "Now " "is " "the " "time " "for " . . . }
a!0
An attribute-only node is like a record
origin ← { CARTESIAN$ x𡤀 y𡤀 z𡤀}
origin^.y

A node may hold both contents and attributes
{ TEXT$ font ← TimesRoman^ --an attribute--
 "This string is the only content of this node" }
Interscript Seminar   November, 1983
Syntax and Semantics by Example (3)
A node's semantics are based on its tags
{ TABLE$ heading←{TEXT$ "Frooble production by territory"}
{ TABLEROW$
{ TABLEENTRY$ { TEXT$ "Yukon" } }
{ TABLEENTRY$ {TEXT$ "200 froobles"} }
. . .
}
}

A node may be opened
subEg ← {TABLEENTRY$}
{ TABLE$ heading←{TEXT$ "Frooble production by territory"}
{ TABLEROW$ subEg ← {TABLEENTRY$}
{ subEg^| {TEXT$ "Yukon" } }
{ subEg^| {TEXT$ "200 froobles"} }
. . .
}
}
Interscript Seminar   November, 1983
Syntax and Semantics by Example (4)

Name scopes nest
subEg ← 7
{ TABLE$ heading←{TEXT$ "Frooble production by territory" }
{ TABLEROW$ subEg ← {TABLEENTRY$}
{ subEg^| {TEXT$ "Yukon" } }
{ subEg^| {TEXT$ "200 froobles" } }
. . .
}
}
Interscript Seminar   November, 1983
Syntax and Semantics by Example (5)
Representing Structure in Documents

Kinds of structure:
"Styles"  by name (indirection)
Inheritance  by name (indirection)
Associating separate parts  by name (indirection)

Structural binding
sb %← 5
Structural evaluation
name% instead of name^
sb^+7 and 5+7 and 12 are equivalent
sb%+7 has value 12, but it is only equivalent to sb%+7
Structural node opening
name%| instead of name^|
format.body %← {PARAGRAPH$ lineJustification←True^
 font ← TimesRoman^ }
{ format.body%| . . . } has value
{ PARAGRAPH$ lineJustification←True^
 font ← TimesRoman^ . . . }
Interscript Seminar   November, 1983
When are Two Scripts Equivalent?

When they have the same formal semantics

Testing editors

Does the editor produce valid scripts?

Are internalization and externalization an idempotent pair?
Interscript Seminar   November, 1983
Tags and Node Invariants

Every tag has a declaration

attributes: names and types of relevant attributes

contentType: type of the allowable content

nodeInvariant: quoted Boolean expression

hasMoreInv: If false then nodeInvariant tells all

requiredTags: any other tags that must also be present

reducesTo: quoted expression to express node in terms of
 a more basic tag

tagOnly: If true, no invariant check is needed to determine
 validity of parent node

A tag's properties can be defined in Interscript
Interscript Seminar   November, 1983
Ignorance-Based Editing
An editor may display whatever it can recognize

Editing known quantities in the context of unknown quantities
the text caption of a figure
the frame for some synthetic graphics

Any operation that preserves invariants results in a valid script
perform semantically meaningful operations
satisfy invariant without understanding it
change nothing (contents, tags, relevant attributes)
Interscript Seminar   November, 1983