You are here

function taxonomy_xml_is_valid_curie in Taxonomy import/export via XML 6.2

Util function. adapted from D6 rdf.module

1 call to taxonomy_xml_is_valid_curie()
taxonomy_xml_parse_curie in ./rdf_format.inc
Utility function to try and figure out what a given CURIE means

File

./rdf_format.inc, line 1354
Include routines for RDF parsing and taxonomy/term creation. @author dman http://coders.co.nz

Code

function taxonomy_xml_is_valid_curie($curie) {

  // Looks a bit like an URL but has no slashes? Probably a CURIE.
  return preg_match('/^\\[?[\\w\\-\\.]+:[\\w\\-\\.]*\\]?$/', (string) $curie);
}