- if (schema->stylesheet){
- yaz_filepath_resolve(schema->stylesheet, tinfo->profile_path,
- NULL, tmp_xslt_full_name);
- schema->stylesheet_xsp
- = xsltParseStylesheetFile((const xmlChar*) tmp_xslt_full_name);
- if (!schema->stylesheet_xsp)
- yaz_log(YLOG_WARN,
- "alvis filter: could not parse xslt stylesheet %s",
- tmp_xslt_full_name);
+ if (schema->stylesheet)
+ {
+ char tmp_xslt_full_name[1024];
+ if (!yaz_filepath_resolve(schema->stylesheet, tinfo->profile_path,
+ NULL, tmp_xslt_full_name))
+ {
+ yaz_log(YLOG_WARN,
+ "alvis filter: stylesheet %s not found in path %s",
+ schema->stylesheet, tinfo->profile_path);
+ return ZEBRA_FAIL;
+ }
+ schema->stylesheet_xsp
+ = xsltParseStylesheetFile((const xmlChar*) tmp_xslt_full_name);
+ if (!schema->stylesheet_xsp)
+ {
+ yaz_log(YLOG_WARN,
+ "alvis filter: could not parse xslt stylesheet %s",
+ tmp_xslt_full_name);
+ return ZEBRA_FAIL;
+ }