--- parser3/src/include/pa_stylesheet_connection.h 2002/01/21 16:44:48 1.22 +++ parser3/src/include/pa_stylesheet_connection.h 2002/08/01 11:41:16 1.30 @@ -1,15 +1,15 @@ /** @file Parser: Stylesheet connection decl. - Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) - Author: Alexander Petrosyan (http://paf.design.ru) - - $Id: pa_stylesheet_connection.h,v 1.22 2002/01/21 16:44:48 paf Exp $ + Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_STYLESHEET_CONNECTION_H #define PA_STYLESHEET_CONNECTION_H +static const char* IDENT_STYLESHEET_CONNECTION_H="$Date: 2002/08/01 11:41:16 $"; + #include "libxslt/xslt.h" #include "libxslt/xsltInternals.h" @@ -79,14 +79,16 @@ private: void load(time_t new_disk_time) { Pool& pool=*fservices_pool; - xsltStylesheet *nstylesheet; - nstylesheet=xsltParseStylesheetFile(BAD_CAST ffile_spec.cstr(String::UL_FILE_SPEC)); - if(!nstylesheet || xmlHaveGenericErrors()) { + xsltStylesheet *nstylesheet= + xsltParseStylesheetFile(BAD_CAST ffile_spec.cstr(String::UL_FILE_SPEC)); + if(xmlHaveGenericErrors()) { GdomeException exc=0; - throw Exception(0, 0, - &ffile_spec, - exc); + throw Exception(&ffile_spec, exc); } + if(!nstylesheet) + throw Exception("file.missing", + &ffile_spec, + "stylesheet failed to load"); xsltFreeStylesheet(fstylesheet); fstylesheet=nstylesheet; @@ -96,7 +98,7 @@ private: time_t get_disk_time() { size_t size; time_t atime, mtime, ctime; - String stamp_file_spec(ffile_spec); + String stamp_file_spec(ffile_spec); stamp_file_spec << STYLESHEET_FILENAME_STAMP_SUFFIX; // {file_spec}.stamp modification time OR {file_spec} const String& stat_file_spec=file_readable(stamp_file_spec)?stamp_file_spec:ffile_spec;