--- parser3/src/classes/xdoc.C 2023/09/26 20:49:06 1.202 +++ parser3/src/classes/xdoc.C 2024/11/11 05:50:09 1.205 @@ -1,7 +1,7 @@ /** @file Parser: @b xdoc parser class. - Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com) Authors: Konstantin Morshnev , Alexandr Petrosian */ @@ -28,7 +28,7 @@ #include "xnode.h" #include "pa_charsets.h" -volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.202 2023/09/26 20:49:06 moko Exp $"; +volatile const char * IDENT_XDOC_C="$Id: xdoc.C,v 1.205 2024/11/11 05:50:09 moko Exp $"; // defines @@ -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