simple-oai-pmh/doc/xml__creater_8php.html

131 lines
7.8 KiB
HTML

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OAI PHP: xml_creater.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<img id="MSearchSelect" src="search/search.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</div>
</li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
</div>
<div class="contents">
<h1>xml_creater.php File Reference</h1>
<p>functions and class related to generating XML response file.
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classANDS__XML.html">ANDS_XML</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classANDS__Error__XML.html">ANDS_Error_XML</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classANDS__Response__XML.html">ANDS_Response_XML</a></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xml__creater_8php.html#a863b3749e57cc2856411d76c82eaec2c">oai_error</a> ($code, $argument= '', $value= '')</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Example usage:</p>
<div class="fragment"><pre class="fragment"> $par_array = array(<span class="stringliteral">&quot;verb&quot;</span>=&gt;<span class="stringliteral">&quot;ListRecords&quot;</span>,<span class="stringliteral">&quot;resumptionToken&quot;</span>=&gt;<span class="stringliteral">&quot;9CD1DA87F59C3E960871F4F3C9D093887C17D174&quot;</span>);
<span class="comment">// Example 1: Error response</span>
$error_array[] = <a class="code" href="xml__creater_8php.html#a863b3749e57cc2856411d76c82eaec2c">oai_error</a>(<span class="stringliteral">&quot;badVerb&quot;</span>,<span class="stringliteral">&quot;Rubish&quot;</span>);
$error_array[] = <a class="code" href="xml__creater_8php.html#a863b3749e57cc2856411d76c82eaec2c">oai_error</a>(<span class="stringliteral">&quot;sameVerb&quot;</span>);
$e = <span class="keyword">new</span> <a class="code" href="classANDS__Error__XML.html">ANDS_Error_XML</a>($par_array,$error_array);
$e-&gt;display();
<span class="comment">// Example 2: Normal response without error codes</span>
$par_array = array(<span class="stringliteral">&quot;verb&quot;</span>=&gt;<span class="stringliteral">&quot;ListRecords&quot;</span>,<span class="stringliteral">&quot;resumptionToken&quot;</span>=&gt;<span class="stringliteral">&quot;9CD1DA87F59C3E960871F4F3C9D093887C17D174&quot;</span>);
$test = <span class="keyword">new</span> <a class="code" href="classANDS__Response__XML.html">ANDS_Response_XML</a>($par_array);
$record_node = $test-&gt;create_record();
$test-&gt;create_header(<span class="stringliteral">&quot;function: identifier string&quot;</span>,gmdate(<span class="stringliteral">&quot;Y-m-d\TH:i:s\Z&quot;</span>),<span class="stringliteral">&quot;collection&quot;</span>,$record_node);
$test-&gt;create_metadata($record_node);
$test-&gt;display();
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a href="http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions">http://www.openarchives.org/OAI/openarchivesprotocol.html#ErrorConditions</a> </dd></dl>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a863b3749e57cc2856411d76c82eaec2c"></a><!-- doxytag: member="xml_creater.php::oai_error" ref="a863b3749e57cc2856411d76c82eaec2c" args="($code, $argument= '', $value= '')" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">oai_error </td>
<td>(</td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>code</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>argument</em> = <code>''</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">$&nbsp;</td>
<td class="paramname"> <em>value</em> = <code>''</code></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>utility funciton to mapping error codes to readable messages </p>
</div>
</div>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Enumerations</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Jun 16 12:49:22 2011 for OAI PHP by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>