ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahh_5.4.0.1/rzahhxpcmlusingerrors.htm

72 lines
4.1 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="reference" />
<meta name="DC.Title" content="Identifying parse errors in XPCML" />
<meta name="abstract" content="When validating XPCML schema documents, a fully validating XML parser may generate warnings, non-fatal parse errors, and fatal parse errors." />
<meta name="description" content="When validating XPCML schema documents, a fully validating XML parser may generate warnings, non-fatal parse errors, and fatal parse errors." />
<meta name="DC.Relation" scheme="URI" content="rzahhxpcmlusing.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="rzahhxpcmlusingerrors" />
<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>Identifying parse errors in XPCML</title>
</head>
<body id="rzahhxpcmlusingerrors"><a name="rzahhxpcmlusingerrors"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Identifying parse errors in XPCML</h1>
<div><p>When validating XPCML schema documents, a fully validating XML
parser may generate warnings, non-fatal parse errors, and fatal parse errors.</p>
<div class="section"><p>Warnings and non-fatal parse errors do not cause the parse
to fail. You might want to examine warnings and non-fatal errors to help you
determine problems with your XPCML source. Fatal parse errors cause the parse
to terminate with an exception.</p>
<p>To display warnings and non-fatal parser
errors when parsing an XPCML document, turn tracing on in your application
and set the trace category to PCML.</p>
</div>
<div class="section"><h4 class="sectiontitle">Example</h4><p>A fully validating XML parser generates
an error for any numeric parameter type that does not have a value. The following
example shows sample XPCML source and the resulting non-fatal parse error:</p>
<p><strong>XPCML
source</strong></p>
<pre> &lt;program name="prog1"/&gt;
&lt;parameterList&gt;
&lt;intParm name="parm1"/&gt;
&lt;/parameterList&gt;
&lt;/program&gt;</pre>
<p><strong>Resulting error</strong></p>
<pre> Tue Mar 25 15:21:44 CST 2003 [Error]: cvc-complex-type.2.2: Element
'intParm' must have no element [children], and the value must be valid.</pre>
<p>To
prevent logging this kind of error, add the nil=true attribute to the intParm
element. The nil=true atttribute signals to the parser that you have deliberately
left the element empty.. Here is the previous XPCML source with the nil=true
atttribute added:</p>
<pre> &lt;program name="prog1"/&gt;
&lt;parameterList&gt;
&lt;intParm xsi:nil="true" name="parm1"/&gt;
&lt;/parameterList&gt;
&lt;/program&gt;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzahhxpcmlusing.htm" title="Using XPCML is similar to using PCML. The following steps serve as a general outline for the actions that you need to perform to use XPCML.">Using XPCML</a></div>
</div>
</div>
</body>
</html>