--- xmlcontent.module 2007/03/14 21:59:59 1.1 +++ xmlcontent.module 2007/07/31 20:26:31 @@ -39,7 +39,10 @@ return t('Allows users to post XML node content and get it transformed through a configured XSLT script'); case 'process': - $xslt_path = drupal_get_path('module', 'xmlcontent'). '/' . variable_get("xmlcontent_xslt_path_$format", ''); + $xslt_path = variable_get("xmlcontent_xslt_path_$format", ''); + if (strpos($xslt_path, '/') !== 0) { + $xslt_path = drupal_get_path('module', 'xmlcontent'). '/' . $xslt_path; + } return _xmlcontent_transform($text, $xslt_path); case 'settings': @@ -82,8 +85,10 @@ if ($validation == 'none') { return; } - - $schema_path = drupal_get_path('module', 'xmlcontent'). '/' . variable_get("xmlcontent_schema_path_$format",''); + $schema_path = variable_get("xmlcontent_schema_path_$format",''); + if (strpos($schema_path, '/') !== 0) { + $schema_path = drupal_get_path('module', 'xmlcontent'). '/' . $schema_path; + } if (!is_file($schema_path) && ($validation == 'xsd' or $validation == 'rng')) { $schema_path = null; watchdog( 'xmlcontent', t('Validation required but no schema file'), WATCHDOG_WARNING );