Add Javascript with 'id' attribute? I've been asked to add the following to a page :

&lt;script id="dsxc_script" type="text/javascript" src="https://www.docserver1.co.uk/dsxc/client.js?acc=xx&amp;integrated=true"&gt;&lt;/script&gt;


However I don't think the drupal_add_js() function will allow me to set an 'id' attribute.

How should I proceed ?
drupal_add_js does not support an ID attribute as it seems. 
However, as a workaround, you can use drupal_add_html_head to add stuff to the head section. 

Ex:

$element = array(
  '#tag' =&gt; 'script',
  '#type' =&gt; 'html_tag',
  '#attributes' =&gt; array(
    'src' =&gt; 'https://www.docserver1.co.uk/dsxc/client.js?acc=xx&amp;integrated=true',
    'type' =&gt; 'text/javascript',
    'id' =&gt; 'dsxc_script',
  ),
);
drupal_add_html_head($element, 'dsxc');


//dpm(drupal_render($element)); Gives the following:
// &lt;script src="https://www.docserver1.co.uk/dsxc/client.js?acc=xx&amp;amp;integrated=true" type="text/javascript" id="dsxc_script" /&gt;


You can always embed these scripts in your html.tpl.php file, but if you want to add the stuff conditionally, I think this will work.