本文整理汇总了PHP中Agent::transform2方法的典型用法代码示例。如果您正苦于以下问题:PHP Agent::transform2方法的具体用法?PHP Agent::transform2怎么用?PHP Agent::transform2使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent
的用法示例。
在下文中一共展示了Agent::transform2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$myFile2 = base64_encode(trim($dc));
$agent->callModifyDatastreamByValue($val, $marcID, 'I', $marcLabel, $marc);
$agent->callModifyDatastreamByValue($val, $dcID, 'A', $dcLabel, $dc);
}
$htmlFinal .= "<h1> Added </h1>Datafield '" . $datafieldtag . "'<h1>for Objects</h1>";
} else {
if ($_POST['function_type'] == "Delete") {
// print_r($GLOBALS);
$deleteDataField = $_POST['dataFieldtag'];
foreach ($fields as $key => $val) {
$xml_MARC = get_Datastream($val, $marcID);
$xml_output_dc = get_Datastream($val, $dcID);
$handle = retrieveHandle($xml_output_dc, $dictionary['HandleNamespace']);
$marcxml = deleteNode($xml_MARC, $deleteDataField);
$agent = new Agent();
$dc_temp = $agent->transform2("./stylesheets/dc.xslt", $marcxml);
//append identifiers information into DC i.e Handles (namespace:port and pid extracted from Val) and Pid = val
$xmlDC = new simpleXMLElement($dc_temp);
$namespace = $xmlDC->getNamespaces(true);
$split = explode(":", $val);
// $handle=$dictionary['HandleNamespace'].$split[1];
$xmlDC->addChild('dc:identifier', $val, $namespace['dc']);
$xmlDC->addChild('dc:identifier', $handle, $namespace['dc']);
$dc = $xmlDC->saveXML();
$marc = $marcxml->saveXML();
$myFile1 = base64_encode(trim($marc));
$myFile2 = base64_encode(trim($dc));
$agent->callModifyDatastreamByValue($val, $marcID, 'I', $marcLabel, $marc);
$agent->callModifyDatastreamByValue($val, $dcID, 'A', $dcLabel, $dc);
}
$htmlFinal .= "<h1> Deleted all Occurances of </h1>Datafield '" . $deleteDataField . "' <h1> for Objects</h1>";