Annotation of parser3/src/types/pa_vxdoc.C, revision 1.2

1.1       parser      1: /** @dom
                      2:        Parser: @b dom parser type.
                      3: 
                      4:        Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com)
                      5:        Author: Alexander Petrosyan <paf@design.ru>(http://design.ru/paf)
                      6: 
1.2     ! parser      7:        $Id: pa_vxdoc.C,v 1.1 2001/09/26 11:24:07 parser Exp $
1.1       parser      8: */
                      9: #include "pa_config_includes.h"
                     10: #ifdef XML
1.2     ! parser     11: static const char *RCSId="$Id: pa_vxdoc.C,v 1.1 2001/09/26 11:24:07 parser Exp $"; 
1.1       parser     12: 
                     13: #include "pa_vxdoc.h"
                     14: 
1.2     ! parser     15: #include <XalanDOM/XalanDocumentType.hpp>
        !            16: #include <XalanDOM/XalanElement.hpp>
        !            17: 
1.1       parser     18: void VXdoc_cleanup(void *vxdoc) {
                     19:        //_asm int 3;
                     20:        static_cast<VXdoc *>(vxdoc)->cleanup();
                     21: }
1.2     ! parser     22: 
        !            23: /// VXdoc: $CLASS,$method
        !            24: Value *VXdoc::get_element(const String& name) { 
        !            25:        try {
        !            26:                // $CLASS,$method
        !            27:                if(Value *result=VStateless_object::get_element(name))
        !            28:                        return result;
        !            29: 
        !            30:                // fields
        !            31:                XalanDocument& document=get_document(pool(), &name);
        !            32: 
        !            33:                if(name=="doctype") {
        !            34:                        // readonly attribute DocumentType doctype;
        !            35:                        return NEW VXnode(pool(), document.getDoctype());
        !            36:                } else if(name=="implementation") {
        !            37:                        // readonly attribute DOMImplementation implementation;
        !            38:                        return 0;
        !            39:                } else if(name=="documentElement") {
        !            40:                        // readonly attribute Element documentElement;
        !            41:                        return NEW VXnode(pool(), document.getDocumentElement());
        !            42:                }       
        !            43:        
        !            44:        } catch(const XalanDOMException& e)     {
        !            45:                exception()._throw(pool(), &name, e);
        !            46:        }
        !            47: 
        !            48:        return 0;
        !            49: }
        !            50: 
1.1       parser     51: #endif

E-mail: