0% found this document useful (0 votes)
19 views14 pages

1 © Netskills Quality Internet Training, University of Newcastle

Uploaded by

ramzi esprims
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views14 pages

1 © Netskills Quality Internet Training, University of Newcastle

Uploaded by

ramzi esprims
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

XML

1 © Netskills Quality Internet Training, University of Newcastle


What is XML?
 "eXtensible Markup Language"
 New development in web creation
 Overcomes limitations of HTML
 small number of tags
 limited features
 several versions of the language
 XML allows you to create your own tags
 Separates content from presentation

2 © Netskills Quality Internet Training, University of Newcastle


SGML, HTML and XML
 SGML
 Standard Generalised Markup Language
 ISO standard since 1986
 complex but widely used "meta-language"
 HTML
 created using SGML for web delivery
 XML
 a simplified version of SGML for users to create
their own 'markup language'
 not just a new version of HTML, a different concept

3 © Netskills Quality Internet Training, University of Newcastle


Creating XML
Processing instruction
<?xml version="1.0"?>
<library>
<book> Tags - "elements"
<author>
<firstname>Bill</firstname>
<lastname>Bryson</lastname>
</author>
<booktitle>Notes From a Small
Island</booktitle>
<publisher>Transworld</publisher>
</book>
</library>

4 © Netskills Quality Internet Training, University of Newcastle


More XML Markup
 Empty elements <curtainup/>
 Attributes <book section="short loan">
 Special characters &lt; &#8478;
 Comments <!-- some text -->
 Data sections

<![CDATA[
*a = &b;
c = (d<=3);
]]>

5 © Netskills Quality Internet Training, University of Newcastle


Using Style with XML
 Cascading Style Sheets (CSS) for simple web
presentation
booktitle {
margin-left: 10%;
font-weight: bold;
}
 Present in multiple formats - print, audio...
 XSL eXtensible Style Language
 Transformations of XML
 e.g. reorder elements

6 © Netskills Quality Internet Training, University of Newcastle


XSL Transformations
XSL commands
<H1>
<xsl:for-each select="library/book"
order-by="author/lastname">

XML elements
<xsl:value-of
select="author/lastname"/>
</xsl:for-each>
</H1>
HTML template for formatting

7 © Netskills Quality Internet Training, University of Newcastle


Uses of XML
 Creating web pages - better structure
 Improved indexing and searching
www.goxml.com/
www.w3.org/XML/
 Simple "database" functionality - organising and
manipulating data "fields" within the page
 Configuring/manipulating information at client -
presenting information in different ways to different
users
 "E-business" - business to business transactions,
passing of tailored information e.g. inventory,
ordering etc

8 © Netskills Quality Internet Training, University of Newcastle


Linking Developments
XLink
 Multiple destinations for a link
 Different presentations of a linked resource
 replace existing page with new (as now)
 embedded in existing page
 display in new window
XPointer
 Replaces internal anchor

 Jump to any XML element within document

9 © Netskills Quality Internet Training, University of Newcastle


XHTML: HTML in XML
 Preparing HTML for use in XML
browsers
 HTML defined in XML
 Must close all tags <p> </p> or <p/>
 Tags in lower case
 Quote attribute values src="logo.gif"
 validate/correct documents

www.w3.org/People/Raggett/tidy

10 © Netskills Quality Internet Training, University of Newcastle


Browser Compatibility
Support for XML and CSS in common
browsers:
 Netscape 4 - no XML, moderate CSS
 IE4 - partial XML, reasonable CSS
 IE5 - good XML and CSS
 XML viewers available (special browers or
plug-ins)
 Server can change XML to HTML before
delivery

11 © Netskills Quality Internet Training, University of Newcastle


XML Applications

XML is well established in some areas e.g.


MathML (Mathematics Markup Language)
<expr>
<mci>x</mci>
<power/>
<mcn>2</mcn> x2+4
</expr>
<plus/>
<mcn>4</mcn>

12 © Netskills Quality Internet Training, University of Newcastle


XML Applications
MathML (Mathematics Markup Language) www.w3.org/TR/REC-
MathML
CML (Chemical Markup Language) www.venus.co.uk/omf/cml/
RDF (Resource Description Framework)
www.w3.org/RDF/
SMIL (Synchronised Multimedia Integration Language)
www.w3.org/TR/1998/PR-smil-19980409/
MusicML
www.tcf.nl/trends/trends6-en.html
CFML (Cold Fusion, for database integration)
www.allaire.com/documents/cf45docs/
acrobatdocs/45refcard.pdf

13 © Netskills Quality Internet Training, University of Newcastle


References
W3Cs XML HomePage
www.w3.org/XML/
XML Homepage
www.xml.com
XML FAQ
www.ucc.ie/xml
Ariadne web articles
www.ariadne.ac.uk/issue16/what-is/

14 © Netskills Quality Internet Training, University of Newcastle

You might also like