1 © Netskills Quality Internet Training, University of Newcastle XML
2 © Netskills Quality Internet Training, University of Newcastle What is XML? l "eXtensible Markup Language" l New development in web creation l Overcomes limitations of HTML small number of tags limited features several versions of the language l XML allows you to create your own tags l Separates content from presentation
3 © Netskills Quality Internet Training, University of Newcastle SGML, HTML and XML l SGML Standard Generalised Markup Language ISO standard since 1986 complex but widely used "meta-language" l HTML created using SGML for web delivery l XML a simplified version of SGML for users to create their own 'markup language' not just a new version of HTML, a different concept
4 © Netskills Quality Internet Training, University of Newcastle Creating XML Bill Bryson Notes From a Small Island Transworld Tags - "elements" Processing instruction
5 © Netskills Quality Internet Training, University of Newcastle More XML Markup Empty elements Attributes Special characters < ℞ Comments Data sections <![CDATA[ *a = &b; c = (d<=3); ]]>
6 © Netskills Quality Internet Training, University of Newcastle Using Style with XML l Cascading Style Sheets (CSS) for simple web presentation booktitle { margin-left: 10%; font-weight: bold; } l Present in multiple formats - print, audio... l XSL eXtensible Style Language l Transformations of XML e.g. reorder elements
7 © Netskills Quality Internet Training, University of Newcastle XSL Transformations <xsl:for-each select="library/book" order-by="author/lastname"> XSL commands XML elements HTML template for formatting
8 © Netskills Quality Internet Training, University of Newcastle Uses of XML l Creating web pages - better structure l Improved indexing and searching l Simple "database" functionality - organising and manipulating data "fields" within the page l Configuring/manipulating information at client - presenting information in different ways to different users l "E-business" - business to business transactions, passing of tailored information e.g. inventory, ordering etc
9 © Netskills Quality Internet Training, University of Newcastle Linking Developments XLink l Multiple destinations for a link l Different presentations of a linked resource replace existing page with new (as now) embedded in existing page display in new window XPointer l Replaces internal anchor l Jump to any XML element within document
10 © Netskills Quality Internet Training, University of Newcastle XHTML: HTML in XML l Preparing HTML for use in XML browsers l HTML defined in XML Must close all tags or Tags in lower case Quote attribute values src="logo.gif" validate/correct documents
11 © Netskills Quality Internet Training, University of Newcastle Browser Compatibility Support for XML and CSS in common browsers: l Netscape 4 - no XML, moderate CSS l IE4 - partial XML, reasonable CSS l IE5 - good XML and CSS l XML viewers available (special browers or plug-ins) l Server can change XML to HTML before delivery
12 © Netskills Quality Internet Training, University of Newcastle XML Applications XML is well established in some areas e.g. MathML (Mathematics Markup Language) x 2 4 x 2 +4
13 © Netskills Quality Internet Training, University of Newcastle XML Applications MathML (Mathematics Markup Language) CML (Chemical Markup Language) RDF (Resource Description Framework) SMIL (Synchronised Multimedia Integration Language) MusicML CFML (Cold Fusion, for database integration) acrobatdocs/45refcard.pdf
14 © Netskills Quality Internet Training, University of Newcastle References W3Cs XML HomePage XML Homepage XML FAQ Ariadne web articles