57
Clarke, R. J (2001) L909-05: 1 Office Automation & Intranets BUSS 909 Lecture 5 From Storage to Interchange: S tandard G eneralized M arkup L anguage (SGML)

Office Automation & Intranets

Embed Size (px)

DESCRIPTION

Office Automation & Intranets. BUSS 909. Lecture 5 From Storage to Interchange: S tandard G eneralized M arkup L anguage (SGML). Notices 1. Assignment 1 is due next week - PowerPoint PPT Presentation

Citation preview

Page 1: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 1

Office Automation & Intranets

BUSS 909

Lecture 5From Storage to

Interchange: Standard Generalized Markup

Language (SGML)

Page 2: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 2

Notices 1

Assignment 1 is due next weekAssignment 2 will be available from

the Intranet next week. As with the current assignment, there are some administrative requirements that must be fulfilled by all students- described next lecture

Page 3: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 3

Notices (2)

to accommodate the new T1 tutorial for this subject, my Consultation Time C1 which was 14:30-16:30 is now 13:30-15:30 40.242 remaining in effect until the end of session

Page 4: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 4

Agenda

Types of MarkupStylesheets & Markup (wrt HTML)SGML StandardSGML ExampleSGML BenefitsAdopting SGML

Page 5: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 5

Types of Markup

Page 6: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 6

Types of Markup

the following slides show an extract from a Vincent motorcycle repair manual to illustrate the types of markup which can be used on a document

but just in case you don’t know what a Vincent motorbike looks like, here is a picture of a 1994 rebuild of the 1959 classic...

Page 7: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 7

1994 Vincent Motorcycle

Page 8: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 8

Types of MarkupProcedural Markup

the following two slides shows an extract from a Vincent motorcycle repair manual showing the procedural markup

this kind of markup tells a workprocessor or other related system how to render (or display) the page

Page 9: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 9

Procedural Markup

Centre; 10pt Times-Roman

Down 10pt; centre;12pt. Helvetica Bold

Down 15pt.; first line indent 0.3 inch; 12-pt. Times Roman

Down 22pt.; centre; 10-pt. Helvetica Medium

Down 5pt.; centre; 12-pt Helvetica Bold

Down 10pt.; 12-pt Times Roman run-in bold

(Source: Nicholson Brothers Motorcycles Ltd. 1994)

Page 10: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 10

Procedural Markup (continued)

Down 22pt.; centre; 10-pt. Helvetica Medium

Down 5pt; centre;12pt. Helvetica Bold

Down 15pt.; 12-pt. Times Roman

Down 10-pt.; indent 0.32 inch first line indent 0.325 inch right align 0.2 inch; tab left alighed 0.325 inch 12-pt. Times Roman

(Source: Nicholson Brothers Motorcycles Ltd. 1994)

Page 11: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 11

Types of MarkupDescriptive Markup

the following two slides shows an extract from a Vincent motorcycle repair manual showing the descriptive markupthe descriptive markup used in this example

identifies the structure of the documentthis type of markup could be used to describe

the data or information structure of the document

Page 12: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 12

Descriptive Markup

chapnum (Chapter number)

title

titlepara

sectnum(Section Number)

title

labitem (Label list item)

(Source: Nicholson Brothers Motorcycles Ltd. 1994)

Page 13: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 13

Descriptive Markup (continued)

sectnum (Section number)

title

sectnum (Section number)

listitem (List item)

(Source: Nicholson Brothers Motorcycles Ltd. 1994)

Page 14: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 14

Stylesheets and MarkupEmphasising HTML

Page 15: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 15

Stylesheets and Markup

for any real document based system, we need to:design the content of the document-

descriptive markup- independent of its lookdesign the look of the document- procedural

markup- independent of its contentwe need to relate them together because

content must be displayed- this is done by using stylesheets

Page 16: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 16

Stylesheets and Markup

Focus: Information System

Function: How to display or render the elements of a document

Stylesheet

Focus: Assist users/readers in interpreting the meanings of a document by means of a consistent visual look

Function: providing a consistent look and feel- procedural issue- to meaningful elements of a document- descriptive issue.

Focus: Human Users

Function: What is the meaning of an element in a document, what purpose does it serve for the organisation

Descriptive MarkupPrescriptive Markup

Page 17: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 17

Stylesheets and MarkupHyper Text Markup Language

In principle, HTML as a standard attempts to provide structural meaning to page content- the purpose of tagswhat is enclosed between <P>…</P> is

interpreted as a paragraph

unfortunately, structural markup is only a limited form of descriptive markup

Page 18: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 18

Stylesheets and MarkupHTML 4.0 Specification (1)

unfortunately, most web page authors concentrate only on the look of the page (by heavily using the procedural markup oriented tags)

the introduction of the HTML 4.0 specification attempted to distance the content of web pages from formatting issues

Page 19: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 19

Stylesheets and MarkupHTML 4.0 Specification (2)

this standard encouraged reduction in the use of formatting (procedural) markup like <FONT>…</FONT> and <H1>...</H1>, <H2>...</H2> etc. tagsformatting was assigned to a separate

standardization effort related to content style- Cascading Style Sheet (CSS)

provided the means to pass the decision as to how a paragraph looks to a style definition

Page 20: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 20

Stylesheets and MarkupLink between Stylesheet and Content

In HTML, the link between a style sheet and the content it influences is either:tag name of the HTML element that

holds the content or,an identifier associated with the element

by way of an attribute (eg. ID or a CLASS attribute)

Page 21: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 21

Stylesheets and MarkupCascading Style Sheets

Cascading Style Sheets (CSS) allows authors to define style rules to each HTML element and these rules may apply to either:single elementsa related group of elements, or toall elements of a particular type (such

as all P elements)

Page 22: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 22

Stylesheets and MarkupStyle Rules in CSS (1)

style rules influence the rendering of elementscolour, alignment, border, margins, and

padding between borders and contentcan also control special items eg.

whether Ordered List (OL) elements use bullet symbols, letters or roman numerals

Page 23: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 23

Stylesheets and MarkupStyle Rules in CSS (2)

every style rules have two parts:one or more elements or groups of elements

that have style sheets defined for themone or more style sheet attributes that apply

to the elements

then need to relate or bind stylesheets to HTML elements (eg. to all P elements)- several possible approaches

Page 24: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 24

Stylesheets and MarkupApproaches of Binding

two major approaches to binding stylesheets to HTML elementsin-document stylesimporting external stylesheets

the choice of approach depends on:the size and complexity of the web sitethe size of the development team user community diversity and expertise

Page 25: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 25

Stylesheets and MarkupIn-Document Style Binding (1)

:

<BODY>

<H1 STYLE= “color:red; text transform:capitalize”>Some heading</H1>

<P STYLE=“color:blue”>Some paragraph text</P>

:

<BODY>

One form of In-Document Style Binding associates a style declaration to an HTML element using the elements’ STYLE attribute

Usage: convenient if style rules are

few and simple difficult to maintain in large

sites as changes must be made throughout the HTML file

Note: almost every HTML element can have a STYLE attributeassociated with it

Page 26: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 26

Stylesheets and MarkupIn-Document Style Binding (2)

Another form of In-Document Style Binding is to define and group together all style rules between <STYLE>… </STYLE> tags

Usage: better option when trying to

maintain a moderately complex page

promotes modular design and implementation of page

<HTML>

<HEAD>

<STYLE TYPE =“text/css”>

<!--

H1 {color:red; text-transform:capitalize}

P {color:blue}

-->

</STYLE>

:

:

:

<BODY>

<H1>Some heading</H1>

<P>Some paragraph text</P>

</BODY>

</HTML>

Note: style rules are enclosed in HTML comments to prevent older browsers from trying to render them

Page 27: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 27

Stylesheets and MarkupBinding using External Stylesheets

Define and apply an external style sheet file to one or more HTML files

the external style sheet file (above, left) contains only rules no HTML tags

Usage: promotes a consistent look

similar to work processor style sheets

separates the documents’ structure and look

Note: these style rules are stored in the file called mystyles.css

H1 {color:red; text-transform:capitalize}P {color:blue}

<HTML><HEAD><LINK REL=STYLESHEET TYPE=“text/css” HREF=“mystyles.css”>:</HEAD><BODY><H1>Some heading</H1><P>Some paragraph text</P></BODY></HTML>

Note: rules are applied to HTML file on the fly

Page 28: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 28

Stylesheets and MarkupDifficulties with HTML (1)

While the CSS Level 1 is consistent across major browsers, it doesn’t provide exact positioning of elements on a page

the CSS Level 2 standard supports exact positioning but there are differences in implementation across major browsers

CSS Level 2 has many advantages but in order to preserve the same look developers may be forced to use Level 1- or undertake a major development task!

Page 29: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 29

Stylesheets and MarkupDifficulties with HTML (2)

there is a much more serious problem:the stylesheet and descriptive markup capabilities

of HTML 4.0 and DHTML (HTML 5.0), were not built into it from the start

describing the structure is not the same thing as descriptive markup

users cannot create there own tags based on meanings (semantics)- for example no tags for PART NUMBER or COURSE- HTML not extensible

Page 30: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 30

Stylesheets and MarkupDifficulties with HTML (3)

on the Internet simplicity wins over efficiency- the Web has grown because its core standards are simple:proof of this is that HTML is itself written

using another standard for describing documents- this standard is called SGML

SGML has also been used to develop a standard likely to replacement HTML on the web- XML described in Lecture 13

Page 31: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 31

SGML Standard

Page 32: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 32

SGML Standard

internationally recognised standard (ISO 8879) for describing and enforcing structure and properties onto data in computer base information systems, including semi-structured datacompletely descriptive markup system for

document contentopen environment for the interchange of a

portable generic format between platforms

Page 33: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 33

SGML StandardFeatures (1)

major features: syntax for text processing stylesheets extensible document description language meta-language for defining document types

text media support: text is coded according to its meaning- can be

used in way not originally envisioned tagging language database language for text

Page 34: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 34

SGML StandardFeatures (2)

media processing applications: foundation for multimedia and hypertext- HyTime

(an ISO standard) is an SGML application that knows about multimedia, time-based events, synchronisation

general computational features: handles logical structures (conditional

documents) notation for structures (eg. hierarchies):

sequences, repetitions and selections

Page 35: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 35

SGML StandardFeatures (3)

other aspects:general file linking and addressing

schemeopen document representation

language for any system architecturesupports open inter-communication

regardless of hardware platforms and software applications

Page 36: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 36

SGML StandardInstances & Document Type Definition

An SGML document is text only, but has the following structure:an document instance containing the

dataa document type definition (DTD)

defining what data elements can be in the document, and how these data elements relate to each other

Page 37: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 37

SGML Standard Document Instances

document instances contain data and markup (called tags):both data and tags are in ASCII format- read

by any applicationtags are distinguishable from data: tags

always have pairs of <> bracketssome system specific data can be inserted

into the instance using special tags- removes the need for control codes etc

Page 38: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 38

SGML StandardDocument Type Definition (1)

can be stored at the beginning of the document or externally in a separate file (generally the latter)

consist of all the formal definition of the elements, structures, and rules for marking up a given type of SGML document

Page 39: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 39

SGML Standard Document Type Definitions (2)

comprise rules and relationships that define how the different elements within a document relate to each other:specify the order in which headings occurwhich elements are allowed under each

headingthe order and frequency with which elements

should appear

Page 40: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 40

SGML Standard Document Type Definitions (3)

specifies the permitted document elements eg. ‘Chapter’, ‘Heading’, ‘Definition-entry’,

‘Defined-work’, ‘Definition’ and ‘See-also’

each element typically has a content model stating its required or permitted contents. eg. the content model for ‘Definition-entry’ would

state that it must have only one ‘Defined-word’ and ‘Definition’

‘Defined-word’ and ‘Definition’ must also be described by content models

Page 41: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 41

Document Type DefinitionExtract of an SGML Memo DTD

<! -- DTD for simple office memoranda --->

<! --

<! ELEMENT MEMO -- ((TO & FROM), BODY, CLOSE?) >

<! ELEMENT TO -0 (#PCDATA) >

<! ELEMENT FROM -0 (#PCDATA) >

<! ELEMENT BODY -0 (P) * >

:

:

<! ATTLIST MEMO STATUS (CONFID | PUBLIC) PUBLIC >

:

:

Page 42: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 42

SGML Processing Systems (1)

read a document instance, and refers to a DTD to find out how to process itaspects of the document instance such as

format of the page, fonts spacing etc. are not defined in SGML (a distinction between PostScript for example and SGML)

must exist in heterogeneous environments where not all documents are in SGML

Page 43: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 43

SGML Processing Systems (2)

SGML Data SGML DTD

ApplicationLibrary

Application Output

SGML Parser

SGML Processing System

Page 44: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 44

SGML Processing Systems (3)

TagApplication

SGMLApplications

BitmapEdit/Convert

Non-SGMLEditing System

SGML Edit/Convert

New Data

New Data

Legacy Documents

GraphicsFiles

SGMLFiles

Page 45: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 45

DSSSL

Document Style Semantics and Specification Language (DSSSL)is the ISO international standard (ISO

DIS 10179) which addresses the need for detailed, typographically sophisticated, specification of layout and composition

independent of particular formatting systems or processes

Page 46: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 46

SGML Example

Page 47: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 47

SGML ExampleInformational Content Markup

the following two slides shows an extract from a Vincent motorcycle repair manual

show the informational content markup using SGML

note that SGML tags are usually shown in the form <…> followed by </..>

Page 48: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 48

Information Markup

(Source: Nicholson Brothers Motorcycles Ltd. 1994)

CHAPTER (BIKETYPE=”Vincent”)

INTRO Although the design of the Vincent differs substantially from conventional motorcycles,operating procedure and maintenance requirements are comparatively similar. /INTRO

LUBE

SUPPLIES

ITEM Grades of Motor Oil /ITEM

DETAIL CROSSREF [TARGET=”PG142”] /CROSSREF /DETAIL

ITEM Motor Lubrication /ITEM

DETAIL Oil supply is contained in tank which forms the

LOCATION top frame member. /LOCATION Motor oil tank capacity is

CAPACITY [UNITS=”QUARTS”] 3. /CAPACITY /DETAIL

ITEM Motor Oil Filter /ITEM

DETAIL A fabric filter is located at

LOCATION front of crankcase below the magneto. /LOCATION /DETAIL

ITEM Gearbox Oil /ITEM

DETAIL Oil capacity is

CAPACITY [UNITS=”PINTS”] 3. /CAPACITY /DETAIL

/SUPPLIES

/LUBE

Page 49: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 49

Information Markup (continued)

(Source: Nicholson Brothers Motorcycles Ltd. 1994)

TIMING

NOTE Due to the Vincent’s uneven firing interval, timing should be checked on both cylinders./NOTE

METHOD

STEP [ ] PARA Set breaker points to POINTGAP [UNITS=”INCHES”] .012/POINTGAP fully open with a TOOL screwdriver. /TOOL /PARA/STEP

STEP [ ] PARA Using TOOL degree plate, /TOOL set the flywheel so that thedegree wheel reads at KEYVALUE [UNITS=”DEGREES”] 37-38 /KEYVALUEbefore TDC. /PARA /STEP

STEP [ ] PARA With a piece of wood, block the automatic advance in the fully advancedposition. /PARA /STEP

STEP [ ] PARA Using a TOOL hex key, /TOOL revolve magneto via the breakerpoint assembly until points just commence to separate. /PARA /STEP

STEP [ ] PARA Fix the gear to magneto shaft, by placing TOOL box wrench /TOOLover nut and giving sharp rap with TOOL hammer. /TOOL /PARA /STEP

/METHOD

/TIMING

/CHAPTER

Page 50: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 50

SGML Benefits

Page 51: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 51

SGML Benefits

DTD structure forces the user to focus on document content not format

SGML helps the authors by:suggesting the correct structure of

different document typesenforces the correct structure: if an author

attempted to put in non-standard material, the application would refuse to accept it

Page 52: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 52

SGML Benefits

Data Managementcommon data repository for the

enterprisestandardised formatting for informationminimise data duplicationcontrol/check data qualitymaximises the benefit of data entry and

authoring

Page 53: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 53

SGML Benefits

facilitates data exchange within an enterprise (Intranets)prevents islands of information forming

within the organisation (that is information trapped within specific functional areas)

prevents an ‘isolationist mentality’ forming within specific functional areas (‘marketing’ data rather than organisational asset)

Page 54: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 54

SGML Benefits

facilitiates data exchange between an organisation and business partners (Extranets; EDI) promotes participation between partnersreduces costs, improves performancestreamlines operations and maangement

practices, reduces ‘bottlenecks’

Page 55: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 55

SGML Benefits

Video Case Studies about EDINote that SGML could well have been

an enabling technology for EDI in these CASE Studies

take notes on how these EDI systems were negotiated- what are the Tactical Strategic and Operation implications suggested in these cases

Page 56: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 56

Adopting SGML

Page 57: Office Automation & Intranets

Clarke, R. J (2001) L909-05: 57

Adopting SGML

Data AnalysisFeasilbility StudyStandardising Data ConceptsData Entry & Document ConversionDelivery of Data to Users