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

1.1       parser      1: /** @dom
                      2:        Parser: @b dom parser type.
                      3: 
                      4:        Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com)
1.6       paf         5:        Author: Alexander Petrosyan <paf@design.ru>(http://paf.design.ru)
1.1       parser      6: 
1.8     ! paf         7:        $Id: pa_vxdoc.C,v 1.7 2001/11/21 14:00:28 paf Exp $
1.1       parser      8: */
                      9: #include "pa_config_includes.h"
                     10: #ifdef XML
1.8     ! paf        11: static const char *RCSId="$Id: pa_vxdoc.C,v 1.7 2001/11/21 14:00:28 paf 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.7       paf        18: void VXdoc_destructor(void *vxdoc) {
1.1       parser     19:        //_asm int 3;
1.7       paf        20:        static_cast<VXdoc *>(vxdoc)->~VXdoc();
1.1       parser     21: }
1.2       parser     22: 
                     23: /// VXdoc: $CLASS,$method
                     24: Value *VXdoc::get_element(const String& name) { 
1.8     ! paf        25:        // $CLASS,$method
        !            26:        if(Value *result=VStateless_object::get_element(name))
        !            27:                return result;
        !            28: 
        !            29:        // fields
        !            30:        GdomeDocument *document=get_document(pool(), &name);
        !            31:        GdomeException exc;
        !            32: 
        !            33:        if(name=="doctype") {
        !            34:                // readonly attribute DocumentType doctype;
        !            35:                return NEW VXnode(pool(), gdome_doc_doctype(document, &exc), false);
        !            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.gdome_doc_documentElement(document, &exc), false);
        !            42:        }       
1.2       parser     43: 
                     44:        return 0;
                     45: }
                     46: 
1.1       parser     47: #endif

E-mail: