function taxonomy_xml_rdf_shortname in Taxonomy import/export via XML 5.2
Same name and namespace in other branches
- 5 rdf_format.inc \taxonomy_xml_rdf_shortname()
- 6.2 rdf_format.inc \taxonomy_xml_rdf_shortname()
- 6 rdf_format.inc \taxonomy_xml_rdf_shortname()
Return the shorthand label of a potentially long RDF URI
EG, for http://www.w3.org/1999/02/22-rdf-syntax-ns#Property return 'Property' ... for sanity
1 call to taxonomy_xml_rdf_shortname()
- taxonomy_xml_convert_triples_to_sorted_objects in ./
rdf_format.inc - Compile triple statements into information objects again.
File
- ./
rdf_format.inc, line 424 - Include routines for RDF parsing and taxonomy/term creation.
Code
function taxonomy_xml_rdf_shortname($uri) {
$parts = parse_url($uri);
$shortname = $parts['fragment'] ? $parts['fragment'] : ($parts['query'] ? $parts['query'] : basename($parts['path']));
// The proper method for guessing simple names is probably documented elsewhere.
// ... this does the trick for now.
return $shortname;
}