function taxonomy_xml_label_from_uri in Taxonomy import/export via XML 6.2
Given a URI ening in a #fragment or a /basename, return just that string.
A definition entity may arrive without a proper readable label - only the string at the end of the URI to identify it.
2 calls to taxonomy_xml_label_from_uri()
- taxonomy_xml_absorb_vocabulary_definitions in ./
taxonomy_xml.module - Create Vocabulary definitions.
- taxonomy_xml_rdf_make_term in ./
rdf_format.inc - Create the placeholder and fill in the values for this term - NOT its relationships yet.
File
- ./
taxonomy_xml.module, line 1761 - This module makes it possible to import and export taxonomies as XML documents.
Code
function taxonomy_xml_label_from_uri($uri) {
$url_parts = @parse_url($uri);
if (!empty($url_parts['fragment'])) {
return $url_parts['fragment'];
}
else {
return basename($uri);
}
}