function url_taxonomy_service_form in Taxonomy import/export via XML 7
A sub-form that provides UI additions to the taxonomy import form
1 string reference to 'url_taxonomy_service_form'
- url_taxonomy_service_info in services/
url.taxonomy_service.inc - hook_taxonomy_service_info()
File
- services/
url.taxonomy_service.inc, line 30 - declare how to import a taxonomy from remote url.
Code
function url_taxonomy_service_form($form_values, $service_info) {
$form = array(
'#type' => 'fieldset',
);
$form['url'] = array(
'#type' => 'textfield',
'#title' => t('URL to import from'),
'#description' => t('
Enter the URL of a file or web service containing a vocabulary definition.
<br/>eg <em>http://www.w3.org/TR/2003/PR-owl-guide-20031215/food</em>
<br/>The URL will be fetched requesting a content-type rdf/xml if available,
this means sometimes you can enter URLs that look like web pages
but we will actually retrieve the raw data.
(On well-behaved sources that provide content-negotiation)
'),
'#default_value' => variable_get('taxonomy_xml_url', ''),
);
$formats = taxonomy_xml_formats();
$form['format'] = array(
'#type' => 'select',
'#title' => t('Format of file'),
'#default_value' => variable_get('taxonomy_xml_format', 'xml_format'),
'#options' => $formats,
);
$form['format']['#description'] = t('
The RDF parser can also do a pretty good job of importing RDFa-enhanced XHTML.
Try it on a Drupal7 taxonomy term page.
');
return $form;
}