116 lines
6.1 KiB
HTML
116 lines
6.1 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="reference" />
|
|
<meta name="DC.Title" content="Record format documents and RFML syntax" />
|
|
<meta name="abstract" content="RFML documents, called RFML source files, contain tags that define the specification for a particular data format." />
|
|
<meta name="description" content="RFML documents, called RFML source files, contain tags that define the specification for a particular data format." />
|
|
<meta name="DC.Relation" scheme="URI" content="rfmlmain.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rfmldtd.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rfmltagdata.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rfmltagrfml.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rfmltagrecordformat.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="rfmltagstruct.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="rfmlsyntax" />
|
|
<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>Record format documents and RFML syntax</title>
|
|
</head>
|
|
<body id="rfmlsyntax"><a name="rfmlsyntax"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Record format documents and RFML syntax</h1>
|
|
<div><p>RFML documents, called RFML source files, contain tags that define
|
|
the specification for a particular data format.</p>
|
|
<div class="section"><p>Because RFML is based on PCML, the syntax is familiar to PCML
|
|
users. Because RFML is an XML extension, RFML source files are easy to read
|
|
and simple to create. For example, you can create an RFML source file by
|
|
using a simple text editor. Also, RFML source files reveal the structure
|
|
of the data in a way that is easier to understand than in a programming language
|
|
like Java™.</p>
|
|
</div>
|
|
<div class="section"><p>The RFML example <a href="rfmlcompare.htm#rfmlcompare">Using
|
|
RFML compared to using IBM<sup>®</sup> Toolbox for Java Record classes</a> includes an example <a href="rfmlexqcustcdt.htm#rfmlexqcustcdt">RFML source file</a>.</p>
|
|
</div>
|
|
<div class="section"><p><strong>RFML DTD</strong></p>
|
|
</div>
|
|
<div class="section"><p>The <a href="rfmldtd.htm#rfmldtd">RFML document type definition
|
|
(DTD)</a> defines valid RFML elements and syntax. To ensure that an XML
|
|
parser can validate your RFML source file at runtime, declare the RFML DTD
|
|
in the source file:</p>
|
|
</div>
|
|
<div class="section"><div class="p"><pre><!DOCTYPE rfml SYSTEM "rfml.dtd"> </pre>
|
|
</div>
|
|
</div>
|
|
<div class="section"><p>The RFML DTD resides in the jt400.jar file (com/ibm/as400/data/rfml.dtd).</p>
|
|
</div>
|
|
<div class="section"><p><strong>RFML syntax</strong></p>
|
|
</div>
|
|
<div class="section"><p>The RFML DTD defines tags, each of which has its own attribute
|
|
tags. You use the RFML tags to declare and define the following elements
|
|
in your RFML source files:</p>
|
|
</div>
|
|
<div class="section"><ul><li>The <a href="rfmltagrfml.htm#rfmltagrfml">rfml tag</a> begins and
|
|
ends the RFML source file that describes the data format.</li>
|
|
<li>The <a href="rfmltagstruct.htm#rfmltagstruct">struct tag</a> defines
|
|
a named structure that you can reuse within the RFML source file. The structure
|
|
contains a data tag for each field in the structure.</li>
|
|
<li>The <a href="rfmltagrecordformat.htm#rfmltagrecordformat">recordformat
|
|
tag</a> defines a record format, which contains either data elements or
|
|
references to structure elements.</li>
|
|
<li>The <a href="rfmltagdata.htm#rfmltagdata">data tag</a> defines
|
|
a field within a record format or structure.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="section"><p>In the following example, RFML syntax describes one record format
|
|
and one structure:</p>
|
|
</div>
|
|
<div class="section"><div class="p"><pre><rfml>
|
|
|
|
<recordformat>
|
|
<data> </data>
|
|
</recordformat>
|
|
|
|
<struct>
|
|
<data> </data>
|
|
</struct>
|
|
|
|
</rfml></pre>
|
|
</div>
|
|
</div>
|
|
<div class="section"><p> </p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<ul class="ullinks">
|
|
<li class="ulchildlink"><strong><a href="rfmldtd.htm">RFML document type definition (DTD)</a></strong><br />
|
|
This is the RFML DTD. Note that the version is 4.0. The RFML DTD resides in the jt400.jar file (com/ibm/as400/data/rfml.dtd).</li>
|
|
<li class="ulchildlink"><strong><a href="rfmltagdata.htm">The RFML data tag</a></strong><br />
|
|
The data tag can have the following attributes.</li>
|
|
<li class="ulchildlink"><strong><a href="rfmltagrfml.htm">The RFML rfml tag</a></strong><br />
|
|
The rfml tag can have the following attributes.</li>
|
|
<li class="ulchildlink"><strong><a href="rfmltagrecordformat.htm">The RFML recordformat tag</a></strong><br />
|
|
The recordformat tag can have the following attributes.</li>
|
|
<li class="ulchildlink"><strong><a href="rfmltagstruct.htm">The RFML struct tag</a></strong><br />
|
|
The struct tag can have the following attributes.</li>
|
|
</ul>
|
|
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rfmlmain.htm" title="The Record Format Markup Language (RFML) is an XML extension for specifying record formats.">Record Format Markup Language</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |