--- xmlcontent.module.orig	2009-03-29 03:17:19.000000000 +0100
+++ xmlcontent.module	2009-08-31 13:33:30.799125000 +0100
@@ -40,6 +40,8 @@
 
     case 'process':
       $xslt_path = drupal_get_path('module', 'xmlcontent'). '/' . variable_get("xmlcontent_xslt_path_$format", '');
+      if (!is_file($xslt_path))
+        $xslt_path = variable_get("xmlcontent_xslt_path_$format", '');
       return _xmlcontent_transform($text, $xslt_path);
 
     case 'settings':
@@ -160,8 +162,8 @@
     '#type'    => 'textfield',
     '#title'   => t('XSLT Script File Path'),
     '#default_value' => variable_get("xmlcontent_xslt_path_$format", ''),
-    '#field_prefix'  => drupal_get_path('module', 'xmlcontent'). '/',
-    '#description'  => t('The file path to the XSLT script to be used for this format.'),
+    '#field_prefix'  => 'Script location: ',
+    '#description'  => t('URL for XSLT script, or file path relative to modules/xmlcontent/.'),
   );
   $form['xmlcontent']['validation'] = array(
     '#type' => 'fieldset',
@@ -209,13 +211,7 @@
     watchdog('xmlcontent',"XML/XSLT PHP support misconfigured", array(), WATCHDOG_ERROR);
     return $xml;
   }
-  
-  // check that the XSLT file exists
-  if (!is_file($path_to_xslt)) {
-    watchdog('xmlcontent',"XSLT unavailable, invalid file or path: '$path_to_xslt'", array(), WATCHDOG_ERROR);
-    return $xml;  
-  }  
-  
+    
   // Load the XML document
   $dom = new DomDocument('1.0', 'UTF-8');
   $valid = $dom->loadXML($xml);
@@ -227,7 +223,12 @@
   // Load the XSLT script
   // TODO: is there a way to cache it, or not necessary
   $xsl = new DomDocument('1.0', 'UTF-8');
-  $xsl->load($path_to_xslt);   
+  $xslt_valid = $xsl->load($path_to_xslt);   
+  if (!$xslt_valid) {
+    watchdog('xmlcontent', "Unable to load XSLT transformer '$path_to_xslt'", WATCHDOG_WARNING);
+    return $xml;
+  }
+
 
   // Create the XSLT processor
   $proc = new XsltProcessor();
