--- parser3/src/classes/xdoc.C 2021/10/19 16:16:35 1.201 +++ parser3/src/classes/xdoc.C 2026/04/25 13:38:46 1.207 @@ -1,8 +1,8 @@ /** @file Parser: @b xdoc parser class. - Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) - Author: Alexandr Petrosian (http://paf.design.ru) + Copyright (c) 2001-2026 Art. Lebedev Studio (https://www.artlebedev.com) + Authors: Konstantin Morshnev , Alexandr Petrosian */ #include "pa_config_includes.h" @@ -28,7 +28,7 @@ #include "xnode.h" #include "pa_charsets.h" -volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.201 2021/10/19 16:16:35 moko Exp $"; +volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.207 2026/04/25 13:38:46 moko Exp $"; // defines @@ -523,7 +523,7 @@ static void _file(Request& r, MethodPara static void _save(Request& r, MethodParams& params) { VXdoc& vdoc=GET_SELF(r, VXdoc); - const String& file_spec=r.full_disk_path(params.as_string(0, FILE_NAME_MUST_BE_STRING)); + const String& file_spec=r.full_disk_path(params.as_file_name(0)); XDocOutputOptions oo(vdoc.output_options); oo.append(r, get_options(params, 1)); @@ -631,9 +631,8 @@ static void _transform(Request& r, Metho } VXdoc* result; - if(Value *vxdoc=params[0].as(VXDOC_TYPE)) { // stylesheet (xdoc) - VXdoc& vstylesheet=static_cast(*vxdoc); - xmlDoc& stylesheetdoc=vstylesheet.get_xmldoc(); + if(VXdoc *vxdoc=dynamic_cast(¶ms[0])) { // stylesheet (xdoc) + xmlDoc& stylesheetdoc=vxdoc->get_xmldoc(); // compile xdoc stylesheet xsltStylesheet *stylesheet=xsltParseStylesheetDoc(&stylesheetdoc); @@ -727,13 +726,4 @@ MXdoc::MXdoc(): MXnode(XDOC_CLASS_NAME) } -# else - -#include "classes.h" - -// global variable - -DECLARE_CLASS_VAR(xnode, 0); // fictive -DECLARE_CLASS_VAR(xdoc, 0); // fictive - #endif