+ All Categories
Home > Documents > Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Date post: 21-Dec-2015
Category:
View: 220 times
Download: 0 times
Share this document with a friend
25
Structured Documents KA 1 Structural Analysis Tree Diagram Structure Diagram
Transcript
Page 1: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 1

Structural Analysis

Tree Diagram

Structure Diagram

Page 2: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 2

Structural AnalyzesStructural Analyzes1. Structural Analyzes

2. Problems

3. Proposing a Solution

4. History of SGML

5. What is SGML

6. History of XML

7. What is XML

8. SGML/XML Document

9. HTML Document

10. Structured Document

11. XML and DTD

12. Defining Document Class

13. Tree Diagram

14. Tree Diagram?

15. Root and Leaves

16. Document Tree

17. One Way to Draw Tree Diagram

18. Structure Diagram

19. Structure Diagram Elements

20. Structure Diagram Elements

21. Structure Diagram?

Page 3: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 3

ProblemsProblems

How to separate the content and the layout? How to exchange documents between different

applications and systems? How to create a standard documentation style

even inside one company? Is a content producer capable to design the

layout? How to create different views of the data set? How to handle the data with software?

Page 4: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 4

Proposing a SolutionProposing a Solution

A document has separated structure content and and layout.

A document has a logical structure (A letterletter has a titletitle and its is fromfrom someone toto somebody who lives inlives in…)

Page 5: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 5

History of SGMLHistory of SGMLPrinting houses – handwritten text with markup notes to the typesetter.

Later markupped with computer e.g. inside ”<,>”

Styles in textures, LaTex macro lanquaqe

SGML was implemented to answer needs arising from paper-to-digital-media transition that was happening in 1980s. Need for standardization of mark-up language to describe the structure of a document was clear and after getting experience from vendor-dependant languages like GML.

1986 ISO declared the ISO:8879 standard which defined SGML (Standard Markup Lanquaqe).

Page 6: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 6

What is SGMLWhat is SGML

SGML is a metalanguage defining the document’s structure

Like object oriented programming:document class = DTD (Document Type Definition)document = instance of the document class

Separators:”<”, ”>” , ”<! ” , ”</”

Tags:SGML language command: <LETTER>

Page 7: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 7

History of XMLHistory of XMLSGML was too heavy and complex to use in everyday life applications. It was

difficult to learn and many exceptions made it cumbersome to write parsers that implemented the full richness of SGML.

Next step was that when Internet was expanding rapidly, HTML was developed to show text and graphics in an architehture-independent way. Easy-to-use GUIs were made to bring mundane people to the Web.

HTML was however too weak to respond to the explosion-like growth of the Internet. HTML gave no standard way to renew the syntax and the absence of structural mark-up made quick searching difficult, only limited meta-data could be embedded in the document.

After few years of patching HTML in various ways (often vendor-dependant) W3C decided that something was to be done. After two years of hard working they brought forth XML 1.0. It supports genuinely Unicode and allows use of XML, DTDs and XSL – data content, structure and layout separated.

Page 8: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 8

What is XMLWhat is XML

XML is a W3C defined standard based on SGML: subset of SGML 1998 W3C XML 1.0 Recommendation Second edition 6.10.2000 www.w3.org/XML A method to present structured information A lanquaqe to define document definition lanquaqes

XML application: document class + documents

XML processor: software able to handle a document (e.g. browser)

Page 9: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 9

SGML/XML DocumentSGML/XML DocumentXML and SGML do not differ much. This is due the fact that XML is a real subset of SGML.

Output spesification is not Output spesification is not defined by SGML, but it is defined by SGML, but it is fixed in XML.fixed in XML.

Page 10: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 10

HTML DocumentHTML Document

When comparing SGML and XML to HTML, we can see that HTML is fixed in the document type definition. HTML has been published as XML DTD and this reformulation is called XHTML 1.0

Fixed tags and Fixed tags and elements.elements.

Page 11: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 11

Structured DocumentStructured Document

….

….

….

document

(content)

document class

This

lookslooks

like

layout

<P>

LETTER

</P>

<!ELEMENT

.xml.xml .dtd.dtd .xsl.xsl

++ =A new A new presentationpresentation

Page 12: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 12

XML ja DTDXML ja DTD

Document class = Document Type Definition (DTD) defines the lanquaqe used in describing the structure: elements, attributes, entities and the order between the entities.

Data object is a XML document, if it is well formed. A document can be e.g. a database record described with XML. A well formed document follows the XML rules, but it does not have a DTD.

XML document is valid, if the DTD exist, it’s rules are followed and it is referred in the document itself.

Page 13: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 13

Defining Document ClassDefining Document Class

•Definition of the Document class is based on structural analyze

•Document class can be based on excisting DTD’s or schema

•Graphical methods: tree and structure diagramstree and structure diagrams

Page 14: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 14

Tree DiagramTree Diagram

Try to find the logical structure of the document by

analyzing the documents in the document classdocument class

email

from to subject paragraph* signature

Email 1

Email 2

Email 3 ...

Page 15: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 15

Tree Diagram ?Tree Diagram ?TREE DIAGRAM : Draw up a record

Record

Place: Metropolia Espoo

Date: 15.8.2009 6:30 pm

Present: Kalle, Matti and Maija

1§ Opening of the meeting

- chairman Kalle opened the meeting at 6:30 pm

2§ Legality and power of the decision …

3§ Agenda …

4§ Work plan

……

X§ Ending of the meeting

The meeting ended at 8:15 am.

Espoo 26.8.2003

Chairman Secretary Inspectors

Kalle A. Pete S. Jep J. SoWhat S.

Page 16: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 16

One Way to Draw a Tree Diagram

memo

place#PCDATA

date#PCDATA

present#PCDATA

paragraph*#PCDATA

checked#PCDATA

signature*#PCDATA

title#PCDATA

name#PCDATA

surname#PCDATA

firstname#PCDATA

Using Word: flow diagram –and connectors

Page 17: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 17

Root and LeavesRoot and Leaves

When one node is contained within another (parent)parent) node, it is considered to be a childchild of that node.

Candidates

Candidate

NameTimo Roine

Language ability

englishswedishNative Foreignfinnish

Status

ROOT

LEAVESLegend:

•Node

•Element

•Parent-Child Relationship

•…add. data

•ROOT

•pending

•Statuspending

Page 18: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 18

Document TreeDocument Tree

Ancestor

Parent / ancestor

Sibling Node

Child /descendant Attribute

Descendant

Namespace

Page 19: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 19

Document Object ModelDocument Object Model

• Document Object Model

• Standard way to browse documents

• Defines objects for presentation and editing of documents content and structure

• Tree ”diagram” way of presenting data structure

Page 20: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 20

HTML Document Object HTML Document Object ModelModel

http://www.w3schools.com/HTMLDOM/default.asp

Page 21: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 21

Document Object Model Document Object Model (e.g. Ajax)(e.g. Ajax)Common properties:

childNodes

firstChild

lastChild

nextSibling

previousSibling

nodeValue

parentNode

• Common methods

getElementById(id)

getElementsByTagName(name)

hasChildNodes()

getAttribute(name)

communicationclient side logic

Page 22: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 22

Structure DiagramStructure Diagram

Describes the order and density of elements as a flow chart.

FROM TO DATE P SIGN.

Page 23: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 23

Structure Diagram: Structure Diagram: ElementsElements

a

a

element a

a

element a once or many times

b elements a and b in this order only

a element a once at most

a b

b a

elements a and b or

elements b and a

Page 24: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 24

Structure Diagram: Structure Diagram: ElementsElements

terminal elements

FROM TO DATE P SIGN.

a element a zero, one or many times

Page 25: Structured Documents KA1 Structural Analysis Tree Diagram Structure Diagram.

Structured Documents KA 25

Structure Diagram?Structure Diagram?STRUCTURE DIAGRAM : Draw up a recordRecord

Place: Metropolia EspooDate: 15.8.2009 6:30 pmPresent: Kalle, Matti and Maija1§ Opening of the meeting

- chairman Kalle opened the meeting at 6:30 pm2§ Legality and power of the decision … 3§ Agenda …

4§ Work plan ……X§ Ending of the meeting The meeting ended at 8:15 am.

Espoo 26.8.2003

Chairman Secretary InspectorsKalle A. Pete S. Jep J. SoWhat S.


Recommended