You are here

constant TAXONOMY_SERVER_CONTENT_NEGOTATION_DIR in Taxonomy import/export via XML 7

@file Extends taxonomy_xml to publish downloadable or queriable taxonomy vocabularies and terms. Extends the Drupal URLs to make vocabulary information available under /taxonomy/vocabulary and /taxonomy/vocabulary/{vid}.

This tool is more technical, and publishes the data in a machine-readable way, such as rdf from /taxonomy/vocabulary/{vid}/rdf

Publishing RDF Vocabularies] (Recipe 4)

When serving these resources, the server also tries to honor content- negotiation.

A normal web browser asking for /taxonomy/vocabulary/{vid} will be given an HTML tree view of the entire vocab.

An RDF-aware client asking for /taxonomy/vocabulary/{vid} (having "Accept: application/rdf+xml" in its $_REQUEST ) will be given a 303 Redirect to the rdf version of that resource.

As well as transparent content-negotiation, an html link 'alternate' is embedded in the HTML document, so that other user-agents can also detect that an rdf+xml version is available nearby.

@author dman dan@coders.co.nz

See also

vocabindex which presents this information also, in a sitemap way.

http://www.w3.org/TR/swbp-vocab-pub/ [Best Practice Recipes for

http://www.w3.org/TR/cooluris/

1 use of TAXONOMY_SERVER_CONTENT_NEGOTATION_DIR
taxonomy_server_get_preferred_content in taxonomy_server/taxonomy_server.module
Get the best content type requested, depending on what the server asked for.

File

taxonomy_server/taxonomy_server.module, line 38
Extends taxonomy_xml to publish downloadable or queriable taxonomy vocabularies and terms. Extends the Drupal URLs to make vocabulary information available under /taxonomy/vocabulary and /taxonomy/vocabulary/{vid}.

Code

define("TAXONOMY_SERVER_CONTENT_NEGOTATION_DIR", drupal_get_path('module', 'taxonomy_server') . "/content_negotiation");