ISO/TC 211 WG4 WI 18 Encoding Annex C XML and XMI 1999-03-01 David Skogan SINTEF Telecom and Informatics Email: David.Skogan@informatics.sintef.no 1999-01-11 Foil no. 1 ISO/TC 211 WG4 WI 18 Encoding Contents Extensible Markup Language (XML) XML Metadata Interchange (XMI) 1999-01-11 Foil no. 2 ISO/TC 211 WG4 WI 18 Encoding XML Concepts XML document well-formed vs. valid XML processor XML element Start tag with attributes Content End tag XML entity Text: XML-document, text, character Binary: Any thing that is not XML-encoded Document Type Declaration (DTD) 1999-01-11 Foil no. 3 ISO/TC 211 WG4 WI 18 Encoding XML document <?xml version=“1.0” ?> <!DOCTYPE catalogue SYSTEM “catalogue.dtd” > <catalogue> <book ID=“b123” title=“ISO 15046”> <author>Olaf Østensen</author> <publisher>ISO Central Secretariat</publisher> <web HREF=“http://www.statkart.no/isotc211”>Home page</web> </book> </catalogue> 1999-01-11 Foil no. 4 ISO/TC 211 WG4 WI 18 Encoding DTD catalogue.dtd <!ELEMENT catalogue ( book+ ) > <!ELEMENT book ( author?, publisher, web* ) > <!ATTLIST book ID ID #REQUIRED title CDATA #REQUIRED > <!ELEMENT author ( #PCDATA ) > <!ELEMENT publisher ( #PCDATA ) > <!ELEMENT web ( #PCDATA ) > <!ATTLIST web xml:link CDATA #FIXED “simple” href CDATA #REQUIRED show (embed | replace | new) “replace” actuate (auto | user ) “user” > 1999-01-11 Foil no. 5 ISO/TC 211 WG4 WI 18 Encoding XML Attributes Attribute data types ID IDREF, IDREFS CDATA ENTITY, ENTITIES NMTOKEN, NMTOKENS Enumeration Special attributes href xml:link xml:lang ... 1999-01-11 Foil no. 6 CDATA CDATA NMTOKEN ISO/TC 211 WG4 WI 18 Encoding XML Element content Content Alternatives <!ELEMENT alt ( one | two | three ) > Sequence <!ELEMENT seq ( one, two+, three ) > Empty <!ELEMENT null EMPTY> Any <!ELMENT div ANY> Mixed <!ELEMENT ( #PCDATA | seq )* > Operators ?, +, * 1999-01-11 Foil no. 7 ISO/TC 211 WG4 WI 18 Encoding XML Character coding Character coding Document entity <?xml version=“1.0” encoding=“ISO-10646-UCS-2” ?> Default: “UTF-8” or “UTF-16” Others “ISO-10646-UCS-2”, “ISO-10646-UCS-4”, “ISO-8859-1”, ... , “ISO-8859-10” “ISO-2022-JP”, “Shift_JIS”, “EUC-JP” Character reference, entities Language specifications <p xml:lang=“en-US”>What color is it?</p> <p xml:lang=“en-GB”>What colour is it?</p> 1999-01-11 Foil no. 8 ISO/TC 211 WG4 WI 18 Encoding Example: XML in Japanese 1999-01-11 Foil no. 9 ISO/TC 211 WG4 WI 18 Encoding XMI Introduction In November 1997, the MOF and UML were adopted as OMG standards. The specifications included metamodel and set of CORBA interfaces for manipulating MOF based meta objects and UML based models However a file/stream based interchange format was not specified (time constraints…) In December 1997, the SMIF RFP was issued The three initial submissions XMI, CDIF and UOL have now been integrated into one - XMI 1999-01-11 Foil no. 10 ISO/TC 211 WG4 WI 18 Encoding XMI Simplified XML Syntax and Encoding MOF Metamodel Definitions 1999-01-11 Foil no. 11 X M I UML DTD and XML streams Warehouse DTD and XML streams ISO/TC 211 WG4 WI 18 Encoding OMG Metamodeling Architecture and XMI M3 M2 MOF MetaMetaModel UML & other MetaModels M1 Model M0 Instances 1999-01-11 Foil no. 12 MOF as XML DTD UML & others as XML DTDs –DTDs MOF MetaModels as XML Documents UML & other Models as XML Documents defined for MOF, UML –MOF metamodel DTD generation –Models are XML documents with a DTD –Document and DTD interchange ISO/TC 211 WG4 WI 18 Encoding XML technology SGML –Open standard by the W3C. –Markup language based on SGML. –Combines data & metadata for XML information interchange. –Simple, flexible, eXtensible. HTML –Tags form a tree information structure. –DTD provides the tag rules. 1999-01-11 Foil no. 13 ISO/TC 211 WG4 WI 18 Encoding XML and the Industry –Standards W3C open standard on Feb 10, 1998. International ISO character sets Additional standards in progress: XLink/XPointer, Namespaces, XSL, RDF, DOM, SAX, Web-DAV –Support is exploding 27 books on Amazon.com in < 1 year XML supported by Adobe, ArborText, DSTC, HP, IBM, Microsoft, Netscape, Oracle, Platinum, Unisys, Select, Sun, Xerox 1999-01-11 Web, publishing, repositories, modeling, databases/warehouses, services, financial, health care, semiconductors, ... Foil no. 14 ISO/TC 211 WG4 WI 18 Encoding XML benefits –XML is system-independent, vendor independent, proven with HTML on the web. –Metadata delivery via the web –Validation, tool support, low cost of entry –Advanced linking –Stylesheets for views, transforms 1999-01-11 Foil no. 15