how to create a node set of elements through C++ code while executing a style sheet and process the

Discussion in 'XML' started by pvssvikas@gmail.com, Jan 25, 2006.

  1. Guest

    Good Afternoon,

    I'am badly in need of help.

    My task :--- I would like to create a node set of elements
    through C++ code while executing a style sheet and process the created
    node set.

    Node set is getting created properly, but node-set NODES are
    are misbehaving ie.. the methods in the object are pointing to
    PureFunctionCall's and my application is getting crashed.

    I've debuggued the code at the time of creation they are pointing the
    right ones. and when the Nodeset is passed to the next Extension
    Function every thing is currupt :(.


    Kindly help me out.

    It would be of great help if I could find any person who already worked
    hands on XALAN-C++ and XERECES-C++.


    Extension Function Body,

    DOMString ds("test"),ds2("testing"),ds1("test1"),ds3("testing1") ;
    DOM_Element ele = theDocument.createElement(ds),ele1=
    theDocument.createElement(ds1);
    DOM_Text prodDataVal = theDocument.createTextNode(ds2) ;
    DOM_Text prodDataVal1= theDocument.createTextNode(ds3) ;

    ele .appendChild(prodDataVal) ;
    ele1.appendChild(prodDataVal1) ;

    XercesToXalanNodeMap parserNodeMap ;

    XPathExecutionContext::BorrowReturnMutableNodeRefList theNodeList(executionContext);

    XercesDocumentBridge theDocBridge(theDocument) ;

    XercesBridgeNavigator bNavig(&theDocBridge) ;

    XercesElementBridge eleBridge(ele,bNavig),ele1Bridge(ele1,bNavig) ;

    eleBridge.getNodeType() ;

    parserNodeMap.addAssociation(ele ,&eleBridge ) ;
    parserNodeMap.addAssociation(ele1,&ele1Bridge) ;

    XalanNode *theNode = parserNodeMap.getNode(ele) ;
    XalanNode *theNode1 = parserNodeMap.getNode(ele1) ;

    MutableNodeRefList *pRefL = theNodeList.operator->() ;

    pRefL->addNode(theNode) ;

    theNodeList->addNode(theNode) ;
    theNodeList->addNode(theNode1) ;

    executionContext.getXObjectFactory() ;
    return
    executionContext.getXObjectFactory().createNodeSet(theNodeList) ;


    Thanking U all,

    vikas.
     
    , Jan 25, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    1,568
  2. Replies:
    3
    Views:
    3,730
    Thomas 'PointedEars' Lahn
    Dec 2, 2005
  3. Replies:
    0
    Views:
    532
  4. Tjerk Wolterink
    Replies:
    2
    Views:
    1,458
    Dimitre Novatchev
    Aug 24, 2006
  5. Replies:
    3
    Views:
    193
    Thomas 'PointedEars' Lahn
    Dec 2, 2005
Loading...

Share This Page