142 lines
9.3 KiB
HTML
142 lines
9.3 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="XML standards and extensions" />
|
|
<meta name="abstract" content="Other standards and extensions to XML work together to make your information more portable and useful. You need to know about these standards and extensions in order to do the following:" />
|
|
<meta name="description" content="Other standards and extensions to XML work together to make your information more portable and useful. You need to know about these standards and extensions in order to do the following:" />
|
|
<meta name="DC.Relation" scheme="URI" content="rzamjintro.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="rzamjintrostandards" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>XML standards and extensions</title>
|
|
</head>
|
|
<body id="rzamjintrostandards"><a name="rzamjintrostandards"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">XML standards and extensions</h1>
|
|
<div><p>Other standards and extensions to XML work together to make your
|
|
information more portable and useful. You need to know about these standards
|
|
and extensions in order to do the following:</p>
|
|
<ul><li>Use XML with your Java™, C++, C, RPG, and COBOL programs.</li>
|
|
<li>Perform complex data searches in XML documents.</li>
|
|
<li>Display XML data on different types of devices.</li>
|
|
<li>Provide your XML documents with hierarchical linking capabilities.</li>
|
|
<li>Produce standard structures for related DTDs.</li>
|
|
</ul>
|
|
<p>XML is good for describing information, but it cannot do everything. For
|
|
example, XML documents do not contain the kind of information that current
|
|
browsers and many other devices require to display it in a useful way. The
|
|
same is true for linking to other information, transporting XML data so that
|
|
it can be used in a meaningful way by the receiving application, and so on.</p>
|
|
<p>The XML community has and continues to develop standards and extensions
|
|
to expand the capabilities of XML:</p>
|
|
<ul><li><a href="#rzamjintrostandards__APIs">DOM and SAX APIs</a></li>
|
|
<li><a href="#rzamjintrostandards__Namespaces">Namespaces</a></li>
|
|
<li><a href="#rzamjintrostandards__XSLandXSLT">XSL and XSLT</a></li>
|
|
<li><a href="#rzamjintrostandards__XLink">XLink</a></li>
|
|
<li><a href="#rzamjintrostandards__XPathandXPointer">XPath and XPointer</a></li>
|
|
<li><a href="#rzamjintrostandards__XMLSchema">XML Schema</a></li>
|
|
</ul>
|
|
<div class="section" id="rzamjintrostandards__APIs"><a name="rzamjintrostandards__APIs"><!-- --></a><h4 class="sectiontitle">APIs</h4><p>Application programming interfaces
|
|
(APIs) allow applications to work with XML information using a standard set
|
|
of portable interfaces.</p>
|
|
<p><strong>DOM 1.0 and DOM Level 2.0</strong></p>
|
|
<p>The Document
|
|
Object Model (DOM) API enables you to build XML documents as well as parse
|
|
them. These interfaces enable you to access, manipulate, and create XML documents
|
|
(and the data within) as programming objects that have methods and events.
|
|
Your programs can construct or change a DOM tree in memory and then persist
|
|
that DOM tree to a file or stream. DOM is best suited for instances where
|
|
you will parse few XML documents but require extensive control over the contents.</p>
|
|
</div>
|
|
<div class="section" id="rzamjintrostandards__Namespaces"><a name="rzamjintrostandards__Namespaces"><!-- --></a><h4 class="sectiontitle">Namespaces</h4><p>Namespaces are pointers
|
|
that enable you to differentiate between duplicate XML elements or attribute
|
|
names, a situation that can occur when using XSLT style sheets or more than
|
|
a single DTD. For example, the <code> element from one DTD might mean something
|
|
different from a <code> element in another DTD. To avoid name collisions
|
|
and ambiguity, give each pointer a unique local name. This makes it simple
|
|
to distinguish between the different namespaces.</p>
|
|
<p><strong>SAX 1.0 and SAX
|
|
2.0</strong></p>
|
|
<p>The Simple API for XML (SAX) is a read-only, single-pass interface
|
|
best suited for processing many documents or very large documents. You can
|
|
use this API to extract information from the XML documents, but you cannot
|
|
use it to add new data to or to change the content of the XML documents. The
|
|
SAX API is event-driven, notifying your application when certain events happen
|
|
as it parses your document. For example, your application might need to know
|
|
when the parser encounters the start or end of an element node. Note that
|
|
it is your application that must keep the necessary state information to determine
|
|
the content and context of these XML events.</p>
|
|
</div>
|
|
<div class="section" id="rzamjintrostandards__XSLandXSLT"><a name="rzamjintrostandards__XSLandXSLT"><!-- --></a><h4 class="sectiontitle">XSL and XSLT</h4><p>Extensible Stylesheet
|
|
Language (XSL) and XSL Transformation (XSLT) work in combination to enable
|
|
you to display XML data in a variety of ways, for example, displayed in a
|
|
browser or on a PDA, or printed in a brochure. XSL and XSLT processing also
|
|
enable you to transform an XML message or document from one XML markup language
|
|
to another, which has key applications in e-business.</p>
|
|
<p>See <a href="rzamjxslintro.htm#rzamjxslintro">XSL introduction</a> for
|
|
more information.</p>
|
|
</div>
|
|
<div class="section" id="rzamjintrostandards__XLink"><a name="rzamjintrostandards__XLink"><!-- --></a><h4 class="sectiontitle">XLink</h4><p>XML Linking Language (XLink) enables
|
|
you to link your XML document to other resources on the web, including files
|
|
of just about any format, database searches, and so on. Moreover, you can
|
|
link to the structure of the resource, not a predetermined place holder, like
|
|
an HTML <A NAME> anchor tag. Multiple links allow users to traverse the
|
|
linked information in any order according to restrictions that you specify.</p>
|
|
</div>
|
|
<div class="section" id="rzamjintrostandards__XPathandXPointer"><a name="rzamjintrostandards__XPathandXPointer"><!-- --></a><h4 class="sectiontitle">XPath and XPointer</h4><p>XML Path
|
|
Language (XPath) and XML Pointer Language (XPointer) enable you to search
|
|
for and identify data in the hierarchical XML document structure.</p>
|
|
<p>XPath
|
|
defines a syntax for locating data in an XML document. Both XSLT and XPointer
|
|
use XPath. XPath defines an XML document as a hierarchy of nodes, with the
|
|
top node being the root. Just like using a regular expression finds one or
|
|
more patterns in text, using XPath finds patterns in data within the nodes
|
|
of one or more XML documents.</p>
|
|
<p>XML Pointer Language (XPointer) extends
|
|
XPath to enable locating specific portions of data, called fragments, based
|
|
on XML attribute values, types, content, or relative position. These fragments
|
|
can be discrete pieces of data, a range of information between two points,
|
|
or a continuous series of elements.</p>
|
|
</div>
|
|
<div class="section" id="rzamjintrostandards__XMLSchema"><a name="rzamjintrostandards__XMLSchema"><!-- --></a><h4 class="sectiontitle">XML Schema</h4><p>XML Schema Language defines
|
|
the logical structure of an XML document, much like a document type definition
|
|
(DTD).</p>
|
|
<p>The significant difference between DTDs and XML Schemas are that
|
|
schemas do the following:</p>
|
|
<ul><li>Are written as XML markup language itself, making them extensible, unlike
|
|
DTDs</li>
|
|
<li>Focus on the problem of cardinality, enabling the enumeration of minimum
|
|
and maximum allowed elements</li>
|
|
<li>Allow constraints on values</li>
|
|
<li>Allow additional data types and definitions of data types that can be
|
|
inherited</li>
|
|
</ul>
|
|
<p>All of these enhancements give you more control over the allowable
|
|
content of the XML document or message. For example, you can add a different
|
|
type of element to an existing schema as long as your addition does not break
|
|
the original schema. Schemas also have many more available data types than
|
|
do DTDs, making importing and exporting data somewhat easier.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzamjintro.htm" title="Extensible Markup Language (XML) allows you to describe and organize information in ways that are easily understandable by both humans and computers. You can then share that information and its description with others over the Internet, an extranet, network, or in other ways.">XML introduction</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |