131 lines
7.8 KiB
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 Page</span></a></li>
|
||
|
<li><a href="pages.html"><span>Related 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 List</span></a></li>
|
||
|
<li><a href="globals.html"><span>File 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 </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 </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 </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"> </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">"verb"</span>=><span class="stringliteral">"ListRecords"</span>,<span class="stringliteral">"resumptionToken"</span>=><span class="stringliteral">"9CD1DA87F59C3E960871F4F3C9D093887C17D174"</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">"badVerb"</span>,<span class="stringliteral">"Rubish"</span>);
|
||
|
$error_array[] = <a class="code" href="xml__creater_8php.html#a863b3749e57cc2856411d76c82eaec2c">oai_error</a>(<span class="stringliteral">"sameVerb"</span>);
|
||
|
$e = <span class="keyword">new</span> <a class="code" href="classANDS__Error__XML.html">ANDS_Error_XML</a>($par_array,$error_array);
|
||
|
$e->display();
|
||
|
|
||
|
|
||
|
<span class="comment">// Example 2: Normal response without error codes</span>
|
||
|
$par_array = array(<span class="stringliteral">"verb"</span>=><span class="stringliteral">"ListRecords"</span>,<span class="stringliteral">"resumptionToken"</span>=><span class="stringliteral">"9CD1DA87F59C3E960871F4F3C9D093887C17D174"</span>);
|
||
|
$test = <span class="keyword">new</span> <a class="code" href="classANDS__Response__XML.html">ANDS_Response_XML</a>($par_array);
|
||
|
$record_node = $test->create_record();
|
||
|
$test->create_header(<span class="stringliteral">"function: identifier string"</span>,gmdate(<span class="stringliteral">"Y-m-d\TH:i:s\Z"</span>),<span class="stringliteral">"collection"</span>,$record_node);
|
||
|
$test->create_metadata($record_node);
|
||
|
$test->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">$ </td>
|
||
|
<td class="paramname"> <em>code</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"> <em>argument</em> = <code>''</code>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"> <em>value</em> = <code>''</code></td><td> </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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </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
|
||
|
<a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
|
||
|
</body>
|
||
|
</html>
|