You are here

function ARC_sparql_parser::parse_PrefixDecl in Taxonomy import/export via XML 6.2

Same name and namespace in other branches
  1. 5.2 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse_PrefixDecl()
  2. 5 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse_PrefixDecl()
  3. 6 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse_PrefixDecl()
1 call to ARC_sparql_parser::parse_PrefixDecl()
ARC_sparql_parser::parse_Prolog in arc/ARC_sparql_parser.php

File

arc/ARC_sparql_parser.php, line 468

Class

ARC_sparql_parser

Code

function parse_PrefixDecl() {
  $q = $this->q;
  while (preg_match("/^PREFIX\\s*([^\\s]*\\:)\\s+\\|(.*)\\|/isU", $q, $matches)) {
    $qname_ns = trim($matches[1]);
    $q_iri_ref = $this->iri_placeholders[trim($matches[2])];
    $this->prefixes[$qname_ns] = $this
      ->calc_iri($q_iri_ref);
    $this->logs[] = "adding prefix '" . $qname_ns . "' -> '" . $this->prefixes[$qname_ns] . "'";
    $q = trim(substr($q, strlen($matches[0])));
  }
  $this->q = trim($q);
}