You are here

function ARC_rdfxml_parser::calc_uri in Taxonomy import/export via XML 5

Same name and namespace in other branches
  1. 5.2 arc/ARC_rdfxml_parser.php \ARC_rdfxml_parser::calc_uri()
  2. 6.2 arc/ARC_rdfxml_parser.php \ARC_rdfxml_parser::calc_uri()
  3. 6 arc/ARC_rdfxml_parser.php \ARC_rdfxml_parser::calc_uri()
4 calls to ARC_rdfxml_parser::calc_uri()
ARC_rdfxml_parser::handle_close in arc/ARC_rdfxml_parser.php
ARC_rdfxml_parser::handle_open_1 in arc/ARC_rdfxml_parser.php
ARC_rdfxml_parser::handle_open_2 in arc/ARC_rdfxml_parser.php
ARC_rdfxml_parser::handle_open_4 in arc/ARC_rdfxml_parser.php

File

arc/ARC_rdfxml_parser.php, line 270

Class

ARC_rdfxml_parser

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);
}