ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzakl_5.4.0.1/rzaklintrostandards.htm

185 lines
12 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?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." />
<meta name="description" content="Other standards and extensions to XML work together to make your information more portable and useful." />
<meta name="DC.Relation" scheme="URI" content="rzaklintro.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakltools.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaklreference.htm" />
<meta name="DC.Relation" scheme="URI" content="rzakltools.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2001, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaklintrostandards" />
<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="rzaklintrostandards"><a name="rzaklintrostandards"><!-- --></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.</p>
<div class="p">You need to know about these standards and extensions in order to do the
following:<ul><li>Use XML with your Java™, 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 orderly linking capabilities</li>
<li>Produce standard structures for related DTDs</li>
</ul>
</div>
<p>XML is very 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="#rzaklintrostandards__APIs">APIs</a></li>
<li><a href="#rzaklintrostandards__XSLandXSLT">XSL and XSLT</a></li>
<li><a href="#rzaklintrostandards__XLink">XLink</a></li>
<li><a href="#rzaklintrostandards__XPathandXPointer">XPath and XPointer</a></li>
<li><a href="#rzaklintrostandards__NamespacesandXMLSchema">Namespaces and XML Schema</a></li>
</ul>
<div class="section" id="rzaklintrostandards__APIs"><a name="rzaklintrostandards__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. For more information, see XML tools integrated in <span class="keyword">i5/OS™</span> for links to API documentation
for a supported parser.</p>
<p><strong>DOM and DOM Level 2</strong></p>
<p>The Document
Object Model (DOM) API enables you to build XML documents as well as parse
them. With these interfaces you can 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>
<p><strong>SAX</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
data to or 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>
<p>For links to more information about the DOM and
SAX APIs, see the XML related information.</p>
<p>For the most current versions
of these APIs, see the <a href="../rzamj/rzamjmain.htm">XML
Toolkit for iSeries</a> (5733-XT1) product documentation.</p>
</div>
<div class="section" id="rzaklintrostandards__XSLandXSLT"><a name="rzaklintrostandards__XSLandXSLT"><!-- --></a><h4 class="sectiontitle">XSL and XSLT</h4><p>Extensible Stylesheet
Language (XSL) and Extensible Stylesheet Language Transformations (XSLT) work
in combination for you to display XML data in a variety of ways, for example,
in a browser or on a PDA, or printed in a brochure. With XSL and XSLT processing
you can transform an XML message or document from one XML markup language
to another, which has key applications in e-business.</p>
<p>A detailed explanation
of the mechanics of this process is beyond this article. Briefly, however,
the process has two basic components:</p>
<ul><li>Use XSL stylesheets to define a set of patterns and templates you want
to use to replace XML elements. A pattern identifies the XML element, and
the corresponding template is used by an XSL processor, like Xalan (which
is included in <span class="keyword">i5/OS</span>),
to actually replace the XML element. For example, you can transform data elements
in an XML document to display appropriately, say, in a browser or mailing
label.</li>
<li>Use XSLT documents to transform the hierarchical tree of XML data into
a different kind of tree, reordering elements as required. For example, you
can add a table of contents or an index to a set of data that does not have
one. You can also use XSLT to transform the grammar of XML documents. For
example, you can transform the grammar for a set of incoming XML request documents
to a different XML grammar required by the receiving application.</li>
</ul>
<p>These technologies do more than format the display of an XML document,
they change it so that it becomes a different kind of document. In conjunction
with other XML tools and extensions, such as parsers and XLink, you can produce
documents formats such as specific word processing formats, PDF, HTML, and
more.</p>
<p>For links to more information about XSL and XSLT, see the XML
related information.</p>
</div>
<div class="section" id="rzaklintrostandards__XLink"><a name="rzaklintrostandards__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 &lt;A NAME&gt; anchor tag. Multiple links allow users to traverse
the linked information in any order based on restrictions that you specify.</p>
<p>For
links to more information about XLink, see the XML related information.</p>
</div>
<div class="section" id="rzaklintrostandards__XPathandXPointer"><a name="rzaklintrostandards__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 seperate pieces of data, a range of information between two points,
or a continuous series of elements.</p>
<p>For links to more information about
XPath and XPointer, see the XML related information.</p>
</div>
<div class="section" id="rzaklintrostandards__NamespacesandXMLSchema"><a name="rzaklintrostandards__NamespacesandXMLSchema"><!-- --></a><h4 class="sectiontitle">Namespaces and XML Schema</h4><p>Namespaces
are pointers (URIs) that enable you to differentiate between duplicate XML
elements or attribute names, a situation that can occur when using XSLT stylesheets
or more than a single DTD. For example, the &lt;code&gt; element from one
DTD might mean something very different from a &lt;code&gt; element in another
DTD. To avoid name collisions and ambiguity, giving each URI a unique local
name makes it simple to distinguish between the different namespaces.</p>
<p>XML
Schema Language defines the logical structure of an XML document, much like
a DTD.</p>
<p>The significant difference between DTDs and XML Schemas are that
schemas:</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 datatypes that can be inherited</li>
</ul>
<p>All of these enhancements giving you more control over the allowable
content of the XML document/message.</p>
<p>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 datatypes than
do DTDs, making importing and exporting data somewhat easier.</p>
<p>For links
to more information about Namespaces and XML Schema Language, see the XML
related information.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaklintro.htm" title="This topic explains what XML is, what extensions and companion standards it uses, and what it can do for you.">Using XML</a></div>
</div>
<div class="relconcepts"><strong>Related concepts</strong><br />
<div><a href="rzakltools.htm" title="i5/OS integrates XML parsers and an XSL processor for Java right into the operating system. Additionally, you can use a wide variety of free and licensed programs to help you use XML.">XML tools for i5/OS</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzaklreference.htm" title="The XML community continually improves existing tools, adds tools, and helps evolve standards and extensions that increase the usefulness and flexibility of XML.">Related information for XML</a></div>
</div>
</div>
</body>
</html>