html5-img
1 / 57

Office Automation & Intranets

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

Télécharger la présentation

Office Automation & Intranets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Office Automation & Intranets BUSS 909 Lecture 5 From Storage to Interchange: Standard Generalized Markup Language (SGML)

  2. Notices 1 • Assignment 1 is due next week • Assignment 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

  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

  4. Agenda • Types of Markup • Stylesheets & Markup (wrt HTML) • SGML Standard • SGML Example • SGML Benefits • Adopting SGML

  5. Types of Markup

  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...

  7. 1994 Vincent Motorcycle

  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

  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)

  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)

  11. Types of MarkupDescriptive Markup • the following two slides shows an extract from a Vincent motorcycle repair manual showing the descriptive markup • the descriptive markup used in this example identifies the structure of the document • this type of markup could be used to describe the data or information structure of the document

  12. Descriptive Markup chapnum (Chapter number) title titlepara sectnum(Section Number) title labitem (Label list item) (Source: Nicholson Brothers Motorcycles Ltd. 1994)

  13. Descriptive Markup (continued) sectnum (Section number) title sectnum (Section number) listitem (List item) (Source: Nicholson Brothers Motorcycles Ltd. 1994)

  14. Stylesheets and MarkupEmphasising HTML

  15. Stylesheets and Markup • for any real document based system, we need to: • design the content of the document- descriptive markup- independent of its look • design the look of the document- procedural markup- independent of its content • we need to relate them together because content must be displayed- this is done by using stylesheets

  16. 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. Descriptive Markup Prescriptive Markup Focus: Information System Function: How to display or render the elements of a document Focus: Human Users Function: What is the meaning of an element in a document, what purpose does it serve for the organisation Stylesheets and Markup

  17. Stylesheets and MarkupHyper Text Markup Language • In principle, HTML as a standard attempts to provide structural meaning to page content- the purpose of tags • what is enclosed between <P>…</P> is interpreted as a paragraph • unfortunately, structural markup is only a limited form of descriptive markup

  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

  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. tags • formatting 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

  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)

  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 elements • a related group of elements, or to • all elements of a particular type (such as all P elements)

  22. Stylesheets and MarkupStyle Rules in CSS (1) • style rules influence the rendering of elements • colour, alignment, border, margins, and padding between borders and content • can also control special items eg. whether Ordered List (OL) elements use bullet symbols, letters or roman numerals

  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 them • one 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

  24. Stylesheets and MarkupApproaches of Binding • two major approaches to binding stylesheets to HTML elements • in-document styles • importing external stylesheets • the choice of approach depends on: • the size and complexity of the web site • the size of the development team • user community diversity and expertise

  25. : <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 Stylesheets and MarkupIn-Document Style Binding (1) Note: almost every HTML element can have a STYLE attributeassociated with it

  26. 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 Stylesheets and MarkupIn-Document Style Binding (2)

  27. 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 Stylesheets and MarkupBinding using External Stylesheets 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

  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!

  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

  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

  31. SGML Standard

  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 data • completely descriptive markup system for document content • open environment for the interchange of a portable generic format between platforms

  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

  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

  35. SGML StandardFeatures (3) • other aspects: • general file linking and addressing scheme • open document representation language for any system architecture • supports open inter-communication regardless of hardware platforms and software applications

  36. SGML StandardInstances & Document Type Definition • An SGML document is text only, but has the following structure: • an document instance containing the data • a document type definition(DTD) defining what data elements can be in the document, and how these data elements relate to each other

  37. SGML Standard Document Instances • document instances contain data and markup (called tags): • both data and tags are in ASCII format- read by any application • tags are distinguishable from data: tags always have pairs of <> brackets • some system specific data can be inserted into the instance using special tags- removes the need for control codes etc

  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

  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 occur • which elements are allowed under each heading • the order and frequency with which elements should appear

  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

  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 > : :

  42. SGML Processing Systems (1) • read a document instance, and refers to a DTD to find out how to process it • aspects 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

  43. SGML Processing Systems (2) ApplicationLibrary SGML Data SGML DTD SGML Parser SGML Processing System Application Output

  44. Tag Application SGML Applications Non-SGML Editing System SGML Edit/Convert Bitmap Edit/Convert SGML Processing Systems (3) New Data SGML Files New Data Legacy Documents Graphics Files

  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

  46. SGML Example

  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 </..>

  48. Information Markup (Source: Nicholson Brothers Motorcycles Ltd. 1994)

  49. Information Markup (continued) (Source: Nicholson Brothers Motorcycles Ltd. 1994)

  50. SGML Benefits

More Related