A manager's guide to the latest hot topics
Ken Holman
Find


Abstract
No abstract was provided for this paper.

Contents
  1. Well-formed XML
  2. Valid XML
  3. XML Schema
  4. Schematron
  5. Namespaces
  6. Extensible HyperText Markup Language (XHTML)
  7. Cascading Stylesheets (CSS)
  8. Document Object Model (DOM)
  9. Simple API for XML (SAX)
  10. Simple Object Access Protocol (SOAP)
  11. XML Path language (XPath)
  12. XSL and XSLT
  13. Stylesheet association
  14. XML pointing and linking languages (XPointer and XLink)
  15. XML Topic Maps
  16. Resource Description Framework (RDF)
  17. XML Query
  18. XML Signature
  19. Scalable Vector Graphics (SVG)
  20. Mathematical Markup Language (MathML)
  21. Wireless Application Profile (WAP)

Well-formed XML
XML - (Well-formed) Extensible Markup Language
A well-formed instance:
<?xml version="1.0"?>
<weather>
<current>
<temp scale="F">72</temp>
<pressure>1005</pressure>
<humidity>43</humidity>
</current>
<min>
<temp scale="F">65</temp>
<pressure>998</pressure>
<humidity>38</humidity>
</min>
<max>
<temp scale="F">78</temp>
<pressure>1010</pressure>
<humidity>43</humidity>
</max>
</weather>
Previous Previous Table of Contents
Valid XML
XML - (Valid) Extensible Markup Language
A valid instance:
<?xml version="1.0"?>
<!DOCTYPE weather [
<!ELEMENT weather ( current, ( min, max )? )>
<!ELEMENT current ( temp, pressure, humidity )>
<!ELEMENT min ( temp, pressure, humidity )>
<!ELEMENT max ( temp, pressure, humidity )>
<!ELEMENT temp ( #PCDATA )>
<!ATTLIST temp scale ( C | F ) #REQUIRED>
<!ELEMENT pressure ( #PCDATA )>
<!ELEMENT humidity ( #PCDATA )>
]>
<weather>
<current>
<temp scale="F">72</temp>
<pressure>1005</pressure>
<humidity>43</humidity>
</current>
<min>
<temp scale="F">65</temp>
<pressure>998</pressure>
<humidity>38</humidity>
</min>
<max>
<temp scale="F">78</temp>
<pressure>1010</pressure>
<humidity>43</humidity>
</max>
</weather>
Previous Previous Table of Contents
XML Schema
XML Schema
Does not attempt to provide all facilities
Part 1: Structures
Part 2: Datatypes
Previous Previous Table of Contents
Schematron
Schematron
A valid XML instance needing Schematron for business rule validation:
<?xml version="1.0"?>
<!DOCTYPE thing [
<!ELEMENT thing ( a | b )>
<!ATTLIST thing content ( a | b ) #REQUIRED>
<!ELEMENT a (#PCDATA)>
<!ELEMENT b (#PCDATA)>
]><thing content="a"><b>test</b></thing>
Figure 1 . Using a Schematron:
Of note:
Previous Previous Table of Contents
Namespaces
Vocabulary distinction
URI value association
The choice of the prefix is arbitrary and can be any lexically valid name
Previous Previous Table of Contents
Extensible HyperText Markup Language (XHTML)
Extensible HyperText Markup Language (XHTML)
Previous Previous Table of Contents
Cascading Stylesheets (CSS)
Cascading Stylesheets (CSS)
Example HTML Specification:
<html>
<head>
<Title>Test</title>
<style type="text/css">
H1 { color: green; text-align: right }
.info { color: red }
</style>
</head>
<body>
<h1>Test File</h1>
<p class="info">This is a test</p>
</body>
</html>
Example XML Specification:
The file samp.css:
EMPH { color: red; display: inline; font-style:italic }
PARA, TITLE { font-family: arial, sans-serif; display: block }
TITLE { font-weight: bold }
TITLE EMPH { color: blue }
for the file samp.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="samp.css"?>
<INFO>
<TITLE>Title with <EMPH>emphasis</EMPH></TITLE>
<P>This is a paragraph.</P>
<P>This has <EMPH>emphasis</EMPH>.</P>
<P>Last paragraph</P>
</INFO>
Previous Previous Table of Contents
Document Object Model (DOM)
Document Object Model (DOM)
Example Principles:
Example Interface Definition:
interface Attr : Node {
readonly attribute DOMString name;
readonly attribute boolean specified;
attribute DOMString value;
};
Example Language Binding (Java):
public interface Attr extends Node {
public String getName();
public boolean getSpecified();
public String getValue();
public void setValue(String value);
}
Previous Previous Table of Contents
Simple API for XML (SAX)
Simple API for XML (SAX)
Multiple implementations freely available:
Example of events defined in SAX:
Previous Previous Table of Contents
Simple Object Access Protocol (SOAP)
Simple Object Access Protocol (SOAP)
Previous Previous Table of Contents
XML Path language (XPath)
Addressing identifies a hierarchical position or positions
A single W3C recommendation
XPath is not a query language
Previous Previous Table of Contents
XSL and XSLT
XSL - Extensible Style Language
XSLT - XSL Transformations
Consider the source file being processed includes a <note> element
To produce formatting objects according to XML lexical and syntax rules:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
xmlns:fo="http://www.w3.org/XSL/Format/1.0">
<xsl:import href="main.xsl"/>
<xsl:template match="note">
<fo:display-rule/>
<fo:block font-posture="italic" font-weight="bold">
<xsl:text>Note: </xsl:text>
<xsl:apply-templates/>
</fo:block>
<fo:display-rule/>
</xsl:template>
</xsl:stylesheet>
To produce HTML according to SGML lexical and syntax conventions:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:output method="html"/>
<xsl:import href="main.xsl"/>
<xsl:template match="note">
<hr/>
<p><i><b>
<xsl:text>Note: </xsl:text>
<xsl:apply-templates/>
</b></i></p>
<hr/>
</xsl:template>
</xsl:stylesheet>
Previous Previous Table of Contents
Stylesheet association
Relating documents to their stylesheets
Ancillary markup
Typical examples of use:
<?xml-stylesheet href="fancy.xsl" type="text/xsl"?>
<?xml-stylesheet href="normal.css" type="text/css"?>
Less typical examples provided for by the design:
<?xml-stylesheet alternate="yes" title="small"
href="small.xsl" type="text/xsl"?>
<?xml-stylesheet href="#style1" type="text/xsl"?>
Previous Previous Table of Contents
XML pointing and linking languages (XPointer and XLink)
Linking describes a relationship:
Two W3C recommendations:
Two W3C recommendations (cont.):
Rich heritage
First-class markup
Previous Previous Table of Contents
XML Topic Maps
XML Topic Maps
Co-existing models of knowledge domains
Architecture based:
A navigation description document:
Previous Previous Table of Contents
Resource Description Framework (RDF)
Resource Description Framework (RDF)
Previous Previous Table of Contents
XML Query
XML Query
Previous Previous Table of Contents
XML Signature
XML Signature
Previous Previous Table of Contents
Scalable Vector Graphics (SVG)
Scalable Vector Graphics (SVG)
Basic types of constructs
Unlimited application areas:
Consider a simple example of polygons:
<?xml version="1.0"?>
<svg width="175" height="145" >
<g style="stroke:black; fill:black" >
<polygon points=" 5, 50, 5, 81, 12, 64" />
<polygon points=" 5, 45, 41,116, 41, 73" />
<polygon points=" 44, 76, 44,119, 61,115" />
<polygon points=" 46, 73, 75,140,105, 73" />
</g>
<g stroke="black" fill="black">
<polygon points="107, 76,106,119, 89,115" />
<polygon points="144, 45,109,116,109, 73" />
<polygon points="145, 41,167, 4,109, 71" />
<polygon points=" 66, 72, 75, 63, 84, 72" />
</g>
</svg>
Previous Previous Table of Contents
Mathematical Markup Language (MathML)
Mathematical Markup Language (MathML)
Previous Previous Table of Contents
Wireless Application Profile (WAP)
Wireless Application Profile (WAP)
Previous Previous Table of Contents