From: Adam Dickmeiss Date: Tue, 25 Mar 2008 12:46:50 +0000 (+0100) Subject: Changed messages for XSLT conversion errors. X-Git-Tag: v3.0.30~68 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=d3012f2c5f1c14c3d1ca5174cd929d1b9b31388b;p=yaz-moved-to-github.git Changed messages for XSLT conversion errors. --- diff --git a/src/record_conv.c b/src/record_conv.c index ab5f173..592f497 100644 --- a/src/record_conv.c +++ b/src/record_conv.c @@ -178,21 +178,28 @@ static int conv_xslt(yaz_record_conv_t p, const xmlNode *ptr) if (!yaz_filepath_resolve(stylesheet, p->path, 0, fullpath)) { wrbuf_printf(p->wr_error, "Element :" - " could not locate stylesheet '%s' with path '%s'", - stylesheet, fullpath, p->path); + " could not locate stylesheet '%s'", + stylesheet, fullpath); + if (p->path) + wrbuf_printf(p->wr_error, " with path '%s'", p->path); + return -1; } xsp = xsltParseStylesheetFile((xmlChar*) fullpath); if (!xsp) { - wrbuf_printf(p->wr_error, "Element :" - " parsing stylesheet '%s' with path '%s' failed," + wrbuf_printf(p->wr_error, "Element: :" + " xslt parse failed: %s", stylesheet, fullpath); + if (p->path) + wrbuf_printf(p->wr_error, " with path '%s'", p->path); + wrbuf_printf(p->wr_error, " (" #if YAZ_HAVE_EXSLT - " EXSLT enabled", + + "EXSLT enabled" #else - " EXSLT not supported", + "EXSLT not supported" #endif - stylesheet, fullpath, p->path); + ")"); return -1; } else