We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byLandon Harris
Modified over 2 years ago
Project Automotive Coarse architecture XMI DOORS UML-Suite ASCET-SD © Telelogic AB 2002
Markup Languages SGML developed in the early `80s, and as ISO standard since HTML development started in XML development started in 1996 and it is W3C standard since February XMI was adopted as a recommended technology by the OMG on March 23, © Telelogic AB 2002
Standard Generalization Markup Language The markup describes the documents structure, not the document appearance The markup conforms to the model, which is a similar to a datebase schema. This means that it can be processed by software or stored in a database. The document structure is written in a Document Type Definition (DTD) DTD specifies a set of elements, their relationship, and the tag set to mark the document. © Telelogic AB 2002
HyperText Markup Language - The most popular application of SGML is HTML. -HTML is one set of tags that follows the rules of SGML. -The set of tags (almost 100 tags) defined by HTML is adapted to the structure of hypertext documents. -HTML has been extended over the years. The first version had a dozen tags; the latest version (HTML 4.0) is close to 100 tags. -Despite all these tags more are needed (for mathematical and chemical formulas etc.) -On the other hand developers of handheld devices want fewer tags because small devices, like smart phones, are not powerful enough to process HTML pages. -The W3C expects that by the year 2002, 75% of surfers wont be using a PC. Rather, they will access the Web from so-called smart phones. © Telelogic AB 2002
eXtesible Markup Language It is a new markup language developed by the W3C mainly to overcome limitation of HTML. A markup language is a mechanism to identify structures in a document. XML is really a meta-language for describing markup languages. XML is a method for putting structured data in a text file. Structured information contains both content (words, pictures etc.) © Telelogic AB 2002
XML Document Like HTML, XML makes use of tags ( ) and attributes (of the form name=value), but while HTML specifies what each tag & attribute means, XML uses tags only to delimit pieces of data, and leaves the interpretation of the data completely to the application that reads it. Example: in HTML is paragraph in XML may be price, person, property or something else. Conclusion: XML makes essentially two changes to HTML: -It predifines no tags. -It is stricker. XML adopt a very strict syntax. A strict syntax result in smaller, faster, and lighter browsers. © Telelogic AB 2002
A simple XML document huhu ASCET_SD_Project © Telelogic AB 2002
XML document structure Xml documents are composed of markup and content. There are six kinds of markup that can occur in an XML document: 1.Elements 2.Comments 3.Processing Instructions 4.Entity References 5.CDATA Sections 6.Document Type Declarations (DTD) © Telelogic AB 2002
Elements Elements are the most common form of markup. Delimited by angle brackets, most elements identify the nature of the content they surround. For example huhu If element is not empty it begins with a start tag,, and ends with an end tag. huhu is content of element. Some elements may be empty. For example in which they have no content. © Telelogic AB 2002
Attributes Attributes are name-value pairs that occur inside start-tags after the element name. For example, diagram element has two attributes. First diagType with value CAD and second name with value Diagram1. In XML, all attribute values must be quoted. © Telelogic AB 2002
Comments Comments begin with Comments can contain any data except literal string --. For example, An XML processor is not requred to pass them along to an application, © Telelogic AB 2002
Processing Instructions Processing instructions (Pis) are an escape hatch to provide information to an application. Like comments, they are not textually part of the XML document, but the XML processor is required to pass them to an application. It is a mechanism to insert non-XML statements, such as scripts, in the document. Processing instruction have the form The name, called the PI target, identifies the PI to the application. PI names beginning with xml are reserved for XML standardization For example, This processing instruction identifies the document as an XML document and indicates the version of XML. © Telelogic AB 2002
Entity References The document in example 1. is self contanied. The document is complete and it can be stored in just one file. Complex documents are split over several files: the text, graphics and so on. XML organizes documents physically in entities. In some cases, entities are equivalent to files. Entities are inserted in the document throught entity references. It is the name of entity between an ampersand and semicolon. For example, if we have defined entity srb which has value Serbia than the following two lines are equivalent: &srb; Serbia © Telelogic AB 2002
CDATA Sections In a document, a CDATA section instructs parser to ignore most markup characters. For example, Between the start of the section,, all character data is passed directly to the application, without interpretation. © Telelogic AB 2002
Document Type Definition DTD is a mechanism to describe the structure of document. DTD is the original modeling language or schema for XML. DTD contains four kinds of declarations in XML: 1.Element type declarations 2.Attribute list declarations 3.Entity declarations 4.Notation declarations © Telelogic AB 2002
Relationship Between the DTD and the XML document DTD is a formal description of the document. Software tools can read it and learn about document structure. The role of the DTD is to specify which elements are allowed where in the document. So, the main benefits of using DTD are: 1.The XML processor enforces the structure, as defined in the DTD. 2.The DTD can declare default or fixed values for attributes. This might result in smaller document. We can validate XML document with an XML processor. © Telelogic AB 2002
The DTD Syntax Listing 2 is diagram introduced in Example 1 but with one difference: It has a new statement. huhu ASCET_SD_Project This new statement links document file to the DTD file. Listing 3 is ist DTD. © Telelogic AB 2002
Example of DTD file Listing 3. examxml.dtd file. © Telelogic AB 2002
Document Type Declaration Document type declaration attaches a DTD to a document: It consist of markup (
Element Type Declarations (1) Element type declarations identify the names of elements and the nature of their content: This declaration identifies the element diagram. Ist content model follows the element name. The content model defines what an element may contain. In this case, diagram must contain element node. The plus after node indicates that it may be repeated more than once. Declaration of element node : indicate that it must contain property exactly once, and may contain label and scope. © Telelogic AB 2002
Element Type Declarations (2) In addition to element names, the special symbol #PCDATA is reserved to indicate that element can contain text. Two other content models are possible: EMPTY indicates that the element has no content and consequently no end-tag. ANY indicates that any content is allowed. For example: © Telelogic AB 2002
Attribute List Declarations Attribute list declarations identify which elements may have attributes, what attributes thay may have, what values the attributes may hold, and what value is the default: In this example diagram element has two attributes diagType and name and this attributes are strings. © Telelogic AB 2002
Well-Formed and Valid Documents There are two categories of XML documents: WELL-FORMED VALID Well-formed document is written according to the XML syntax. It has right mix of start and end tags, attributes are properly quoted and so on. Well-formed documents have no DTD, so XML processor cannot check their structure. It only checks that they follow the syntax rules. Valid documents have a DTD. The XML processor will check that the documents are syntactically correct but it also ansures they follow the structure described in the DTD. The DTD is useful during document creation. © Telelogic AB 2002
XML Metadata Interchange XMI is new OMG standard which combines UML and XML. IBM, Unisys and other industry leaders have created a new open industry standard that combines the benefits of the web based XML standard for defining, validating, and sharing document formats on the web with the benefits of the object-oriented Unified Modeling Language (UML). XMI specifies an open information interchange model that is intended to give developers working with object technology the ability to exchange programming data over the Internet in a standardized way, thus bringing consistency and compatibility to applications created in collaborative environments. As result we have that development teams using various tools from multiple vendors can still collaborate on applications and use the web to exchange data between tools, applications and repositories. © Telelogic AB 2002
Open Interchange with XMI Different architectures for application interchange: 6 bridges written by 6 vendors Design tools (UML...) Design tools (UML...) XMI Development Tools Development Tools Database Schema Database Schema Reports Repository Software Assets (C.C++,Java code) Software Assets (C.C++,Java code) © Telelogic AB 2002
Current situation A web of point bridges. N*N-N = 30 bridges by N=6 vendors Tool5 Tool6 Tool1 Tool4 Tool3 Tool2 © Telelogic AB 2002
XML and XMI XMI defines sets of rules for using XML in environment of object oriented information applications. We shall demonstrate the feutures of XMI on one example. Example is one XML document for an automobile: Ford Mustang 1999 blue The corresponding DTD is: © Telelogic AB 2002
XMI Generation Rules XMI defines two sets of rules that provide open interchange and leverage the capabilities of XML. 1.The DTD generation is used to specify an interchange format. 2.The Document generation creates documents that use a given XMI DTD. Following figure shows the auto model in UML. Auto Make Model Year Color Price Auto as a UML class © Telelogic AB 2002
XMI DTD generation An XMI DTD can be generated from the UML model of the auto as shown in following listing: There is one XML element for each class. © Telelogic AB 2002
XMI Document generation Following listing shows the auto example as an XMI document using elements from the generated auto XMI DTD. An example of an auto. Ford Mustang 1999 blue 25000
Application interchange of an XMI document using an XMI DTD generated from UML model. Following example shows that an XMI-generated DTD for UML allows interchange between design tools: Auto Make Model Year Color Price Application1 XMI DTD XMI Doc Application2 © Telelogic AB 2002
XSL Transformation XSLT is a language to specify transformation of XML documents. It takes an XML document and transform it into another XML document. XSLT may be used for other general transforms as well. So one XML document can be transformed in HTML, XMI or TCL document. Source document XSLT Style Sheet XSL Processor Resulting Document © Telelogic AB 2002
The XSL processing sequence Source document XSL stylesheet XML parser Apply templates Write result To output Result file or stream Source tree Rules base Result tree © Telelogic AB 2002
XML input tree otexport diagram node labelscopeproperty typeidlabelTypeitemTypescopeidnamelabelTypeitemTypeid node namenode4nameclscopePhasenode4stereotype CAD clnode4name Diagram1 diagType name classxywidthheightid huhupackage node4 ASCET_SD_Project huhu © Telelogic AB 2002
XMI output tree XMI XMI.content ModuleProject Project.CoordinateXProjectCoordinateY Project.NameProject.labelModule.NameModule.label Xmi.uuid node huhu hahaname node4 Xmi.uuid © Telelogic AB 2002
The XSL processing sequence An XML parser converts a source document into a sorce tree. XML parser reads in the XSL style sheet and organize the template rules for efficient lookup. XSL processor walks the source tree starting from root node, and attempts to match each node to a corresponding template rule. If such a match is made, the template is copied into the result tree. Processing continues until the source tree has been completely traversed. XSL processor walks the result tree and copies what it finds into an output file or a stream. © Telelogic AB 2002
CHAPTER 7 An Introduction to XML. 7.1 Introduction XML stand for: eXtensible Markup Language Developed from SGML XML was designed to transport and store.
XML –EXtensible Markup Language –Designed to transform and store data –We will learn difference between xml and html.
CIS 670 Fall 2001 (LN 5)1 XML 4 Introduction to XML –XML basics –DTDs –XML and semistructured data 4 Query languages for XML XML-QL, XQL, XSL 4 XML extensions.
6-Sep-14 XML eXtensible Markup Language. 2 HTML and XML, I XML stands for eXtensible Markup Language HTML is used to mark up text so it can be displayed.
CSCI N241: Fundamentals of Web Design Copyright ©2004 Department of Computer & Information Science Introducing XHTML: Module B: HTML to XHTML.
XML I. Learning Objectives What is XML Features of XML Uses of XML Structure of an XML document Document Type Declaration Document Type Definitions (DTDs)
What is XML? a meta language that allows you to create and format your own document markups a method for putting structured data into a text file; these.
XML INTRODUCTION Prepared by Hongming Yu Modified by Fernando Farfán.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 XML: Extensible Markup Language.
Cascading Style Sheets CSS. Learning outcome CSS – Introduction – Motivation – Advantages – Implementation – Classes & Ids – and – General Model – Validation.
J0 1 Marco Ronchetti - Basi di Dati Web e Distribuite – Laurea Specialistica in Informatica – Università di Trento.
XML-XSL Introduction SHIJU RAJAN SHIJU RAJAN Outline Brief Overview Brief Overview What is XML? What is XML? Well Formed XML Well Formed XML Tag Name.
Craig Stewart Dr. Alexandra I. Cristea (http://www.dcs.warwick.ac.uk/~acristea/) XML.
DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
Database System Concepts, 6 th Ed. ©Silberschatz, Korth and Sudarshan See for conditions on re-usewww.db-book.com Chapter 23: XML.
LIS650lecture 1 XHTML 1.0 strict Thomas Krichel
LIS650lecture 2 XHTML 1.0 strict Thomas Krichel
LIS900C: HTML structural tags Thomas Krichel and Jeremiah C. Trinidad
LIS650lecture 1 Major HTML Thomas Krichel
1 eXtensible Markup Language. XML is based on SGML: Standard Generalized Markup Language HTML and XML are both based on SGML 2 SGML HTMLXML.
HTML HyperText Markup Language-. Learning outcomes Code web pages using HTML Explain why it is advisable to use XHTML rather than HTML Describe some technologies.
MSc IT UFCE8K-15-M Data Management Prakash Chatterjee Room 3P16
LIS650lecture 1 XML and the HTML body Thomas Krichel
LIS650lecture 0 Introductory lecture Thomas Krichel
Dr. Alexandra I. Cristea XHTML.
LIS650lecture 0 Introduction to the Web & to XML Thomas Krichel
The world wide web Chapter 4. Learning outcomes Explain in general terms how web documents are transferred across the Internet and What processes are.
Introduction to Html Farhan Nisar University of Peshawar.
© 2016 SlidePlayer.com Inc. All rights reserved.