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

P

pvssvikas

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.
 

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top