function ARC_rdfxml_parser::calc_uri in Taxonomy import/export via XML 5
Same name and namespace in other branches
- 5.2 arc/ARC_rdfxml_parser.php \ARC_rdfxml_parser::calc_uri()
- 6.2 arc/ARC_rdfxml_parser.php \ARC_rdfxml_parser::calc_uri()
- 6 arc/ARC_rdfxml_parser.php \ARC_rdfxml_parser::calc_uri()
4 calls to ARC_rdfxml_parser::calc_uri()
File
- arc/
ARC_rdfxml_parser.php, line 270
Class
Code
function calc_uri($s = "", $path = "", $term = "") {
$result = "";
if (strpos($path, ":") !== false) {
/* is abs uri */
return $path;
}
$cur_base = $this
->get_cur_xml_base($s);
$cur_base = $this
->get_clean_base($cur_base);
if ($term == "ID") {
return $cur_base . "#" . $path;
}
elseif (strpos($path, "#") === 0) {
return $cur_base . $path;
}
elseif (strpos($path, "//") === 0) {
/* net path */
return "http:" . $path;
}
return $this
->calc_abs_path($path, $cur_base);
}