200 likes | 348 Views
XML. eXtensible Markup Language Erik Forsström Olle Wessel Patrik Löfgren. XML. eXtensible Markup Language. Background. XML = HTML + SGML HTML Unstructured No custom tags Present simple information. SGML. SGML != internet Recycling of information Structure information
E N D
XML eXtensible Markup Language Erik Forsström Olle Wessel Patrik Löfgren
XML eXtensible Markup Language
Background • XML = HTML + SGML • HTML • Unstructured • No custom tags • Present simple information
SGML • SGML != internet • Recycling of information • Structure information • Intelligent information • Complex
XML • Structured informaton • Elements = content + tags • No layout information • DTD specifies structure • XML schemas = DTD 2.0 • Attribute Unique tags
XML on the web • XML != replacement off HTML • Seperate data from HTML • Store data inside HTML documents • Format for exhange information • Store data in files and dadabases
Server User PC CSS and/or XSL Layout information Converter from XML to HTML Intermediate HTML document Converter from XML to HTML XML document Conversion XML to HTML • Seding XML to PC conversion on PC
Server User PC CSS and/or XSL Layout information Converter from XML to HTML Intermediate HTML document Converter from XML to HTML XML document Conversion XML to HTML • Conversion on the server before transmission
Server CSS and/or XSL Layout information Converter from XML to HTML XML document Intermediate HTML document User PC Store of preparedHTML pages Ordinary HTTP sever dispatching web pages on request Intermediate HTML document Converter from XML to HTML Conversion XML to HTML • Conversion on the server before storage
XML and DTD <!ELEMENT namn (fornamn, efternamn)> <!ELEMENT adress (gata, stad)> <!ELEMENT fornamn (#PCDATA)> <!ELEMENT efternamn (#PCDATA)> <!ELEMENT gata (#PCDATA)> <!ELEMENT stad (#PCDATA)> <?xml version="1.0"?> <!DOCTYPE person SYSTEM "person.dtd"> <?xml-stylesheet type="text/css" href="unit.css"?> <heroes> <NAMN> <FoRNAMN>James</FoRNAMN> <EFTERNAMN>Bond</EFTERNAMN> <adress> <gata> historiegränd </gata> <stad> umeå </stad> </adress> </NAMN> <NAMN> <FoRNAMN>Clark</FoRNAMN> <EFTERNAMN>Kent</EFTERNAMN> <adress> <gata> fysikgränd </gata> <stad> umeå </stad> </adress> </NAMN> </heroes>
XML with style sheet <?xml version="1.0"?> <!DOCTYPE person SYSTEM "person.dtd"> <?xml-stylesheet type="text/css" href="unit.css"?> <heroes> <NAMN> <FoRNAMN>James</FoRNAMN> <EFTERNAMN>Bond</EFTERNAMN> <adress> <gata> historiegränd </gata> <stad> umeå </stad> </adress> </NAMN> <NAMN> <FoRNAMN>Clark</FoRNAMN> <EFTERNAMN>Kent</EFTERNAMN> <adress> <gata> fysikgränd </gata> <stad> umeå </stad> </adress> </NAMN> </heroes> heroes { background-color: #ffffff; width: 100%; } NAMN { display: block; margin-bottom: 30pt; margin-left: 0; } EFTERNAMN { color: #FF0000; font-size: 20pt; } adress { color: #0000FF; font-size: 20pt; } STAD { color: #AAFF99; }
XHTML • Harder and fast syntax rules • Elements properly nested • Documents must be well-formed • Tag names in lowercase • All elements must be closed
XML user interfaces • XML for define user interfaces • ZUL • Easy to uppdate interfaces
The Future of XML • Relies on the big companies • Unite around a few standards • Early adoption to XML has risks and oppurtunities • Business to business applications
Negative aspects • Open standards may give users a feeling of lacking security • Too many XML schemas • XML demands more initial work from the developers • Definitions and relations between tags must make sense • Programmers not known for careful syntactic, grammatic and semantic correctness • Old profession data analyst would be needed again
XML on the internet • XML, HTML and other languages will interoperate, not compete • XML makes it theoretically possible to represent information differently • Speech processing • Braille writing
XML on the internet • Internet infrastructure will remain the same, XML is added on top • New applications • RSS • Metro (will compete with pdf, Microsoft standard)