XML
XML
XML
SGML
XML
HTML
CML
HTML 3.2 XSLT
ebXML
CSS HTML 4.01
MML
XHTML
How XML supports other Web markup languages and
applications
http://www.w3.org/XML/Activity
I. What is XML?
• XML and HTML
• Where does it fit in with other markup languages?
II. How does it work?
• Your own private language
• DTDs and schemas
• XSLT: Extensible style sheet transformation
language
• Xpath, Xlink, Xpointer, Xforms
III. How will it change the web?
• Examples of XML applications
II. How does it work?
An XML document us actually composed of three
different files
1. The raw XML file (.xml)
This file has the basic data marked up with XML tags
It will contain markup that will link the file to both the
DTD(or “schema”) and the XSL stylesheet
It must follow certain rules to be considered “well
formed” and “valid”
This is necessary if the document is to be displayed
by a browser or parser
Here's a simple HTML document:
<html>
<head>
<title>Memo form</title>
</head>
<body>
<b>4.10.01</b><br />
<b>TO:</b> Nitin<br />
<b>CC:</b> Saurabh<br />
<b>FROM:</b> Manisha<br />
Memo
Header Memotext
<?xml version=“1.0”>
<xsl stylesheet xmlns=“http://www.w3c.org/1999/XSL Transform”
version=“1.0”>
<xsl template match=“/”>
<html> <head> <title>Memo form</title> </head> <body>
<xsl:template match=“header”>
<b><xsl:apply-templates select=“date” /><b><br />
<b><xsl:apply-value-of select=“to/name” /><b><br />
<b><xsl:apply-value-of select=“cc/name” /><b><br />
<b><xsl:apply-value-of select=“from/sender” /></b>
</xsl:template>
<p><xsl:apply value-of select=“memotext”></p>
<p><xsl:apply value-of select=“&sig;”></p>
</body></html>
</xsl:template>
</xsl:stylesheet>
There are other components of XML that greatly extend
its power and flexibility
Xpath
This is a syntax that locates nodes in the hierarchical
structure of an XML document
It is used in XSLT
<xsl:template match=“node_name”>
This specifies the current node
It uses patterns: these can be repeated throughout
the document
It also uses expressions: these are context specific
This syntax is a sophisticated shorthand to use when
writing processing instructions
Xlink
This is extensible linking language
It allows more complex type of linking
Here’s a simple link
<logo xlink:type=“simple”
xlink:href=“../images/logo.gif”
xlink:role=“image”
xlink:title=“logo” replace
xlink:show=“embedded” new
xlink:actuate:”onload” />
onLoad
Xlink defines “linksets” or extended links
A set of files can be connected through a chain of links
moving from the first to the last file in the linkset
Xpointer
This is a syntax for linking to specific locations within
XML documents
It uses Xpath expressions to define the locations
#xpointer(element_name[position()=1])
This is appended to the end of a URL in an Xlink
expression
Xforms
This is a subset of XML that is going to be used
someday to allow more complex forms to be created in
XHTML
I. What is XML?
• XML and HTML
• Where does it fit in with other markup languages?
II. How does it work?
• Your own private language
• DTDs and schemas
• XSLT: Extensible style sheet transformation
language
• Xpath, Xlink, Xpointer, Xforms
III. How will it change the web?
• Examples of XML applications
III. How will it change the web?
XML has interesting potential to change a portion of the
web
It is expected to move us closer to write once display
anywhere (XSLT)
It will be an important component of the “semantic
web”
Search engines that can process XML should be much
more precise and return more relevant results
It can improve business processes, particularly if
professions develop their own markup languages
Examples of XML applications
Resource Description Framework (RDF)
This is a framework that allows the description and
interchange of metadata
Because it is designed to be platform independent, it
becomes a hub for metadata activity
RDF provides a model for metadata, and a syntax so
that independent parties can exchange it and use it
RDF makes it possible to use multiple pieces of
software to process the same metadata
It also allows a single piece of software to process (at
least in part) many different metadata vocabularies
Extensible Hypertext Markup Language (XHTML)
Synchonized MultiMedia Markup Language (SMIL)
Math Markup Language (MathML)
Chemical Markup Language (CheML)
Commerce Markup Language (CML)
Electronic Business XML (ebXML)
National Library of Medicine XML Data formats
Electronic Component Information Exchange (ECIX)
Geography Markup Language (GML)
Research Information Exchange Markup Language
(RIXML)
MARC to XML conversions