Update of data use policy


I finally looked a bit more at the code and instead of putting the policy in the template I modified the template and eml.module to allow eml doc markup.  The changes to eml--node--data-set.tpl.php template was just to remove the  <literalLayout> markup.  For eml.module at line 286 $variables['data_policies'] = check_plain(strip_tags(variable_get('eml_data_policies', ''))); 
was replaced with:
$variables['data_policies'] = check_markup(strip_tags(variable_get('eml_data_policies', ''),'<para><itemizedlist><listitem>'),'eml_text',false);

The syntax of check_markup  includes a format filter which in this case is one called 'eml_text'.  The 'eml_text' format filter was added  (admin/config/content/formats) as a text filter called  EML Text and configured to limit allowed HTML tags to <para><itemizedlist><listitem>.  Other tags could be added as needed.

The final step is to add the tags to the EML data policy text box (admin/config/services/eml) .  Care must be taken in getting the tags correct.

Further thoughts:

If a custom filter is developed it may be possible to a html tags converted to EML doc tags.  There is a custom filter module that may work.


I updated the site wide data use policy to CC-BY - Attribution.  However EML produced does not format it so it is very readable.  I could re-word so that it's just a paragraph but instead I hand edited to include the <para> and <listitems> codes.  because the eml module runs the text through clean_markup function which converts the < para> to code that displays the "<" I hard coded the data policy in the eml--node--data-set.tpl.php template.  AT line 53 where

        <title>Data Policies</title>

I put in the data use text

In the long run it would be best to have it use a research project rights.  But for now it works.