/** * * @param STRING $elementName * @access private */ function getElementText($elementName) { $namespace = RDF_Util::guessNamespace($elementName); $localName = RDF_Util::guessName($elementName); if ($namespace == "") { return $localName; } $prefix = array_search($namespace, $this->m_namespaces); if ($prefix === false) { $errmsg = "Prefix for element '{$elementName}' cannot be found."; return RDF::raiseError(RDF_ERROR, null, null, $errmsg); } if ($prefix != RDF_NAMESPACE_PREFIX) { return $prefix . ':' . $localName; } else { return $this->rdf_qname_prefix . $localName; } }
/** * Delivers the Localname (without the namespace prefix) out of the URI of a Resource. * * @param Object Resource $resource * @return string * @access public */ function getLocalName($resource) { return RDF_Util::guessName($resource->getURI()); }