Presentation is loading. Please wait.

Presentation is loading. Please wait.

Project Automotive Coarse architecture XMI DOORS UML-Suite ASCET-SD © Telelogic AB 2002.

Similar presentations

Presentation on theme: "Project Automotive Coarse architecture XMI DOORS UML-Suite ASCET-SD © Telelogic AB 2002."— Presentation transcript:

1 Project Automotive Coarse architecture XMI DOORS UML-Suite ASCET-SD © Telelogic AB 2002

2 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

3 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

4 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

5 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

6 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

7 A simple XML document huhu ASCET_SD_Project © Telelogic AB 2002

8 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

9 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

10 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

11 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

12 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

13 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

14 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

15 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

16 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

17 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

18 Example of DTD file Listing 3. examxml.dtd file. © Telelogic AB 2002

19 Document Type Declaration Document type declaration attaches a DTD to a document: It consist of markup (

20 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

21 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

22 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

23 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

24 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

25 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

26 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

27 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

28 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

29 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

30 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

31 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

32 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

33 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

34 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

35 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

36 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

Download ppt "Project Automotive Coarse architecture XMI DOORS UML-Suite ASCET-SD © Telelogic AB 2002."

Similar presentations

Ads by Google