Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > how to create a node set of elements through C++ code while executing a style sheet and process the created node set.

Reply
Thread Tools

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

 
 
pvssvikas@gmail.com
Guest
Posts: n/a
 
      01-25-2006
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("testin g1") ;
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::BorrowReturnMutableNodeRefL ist 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Process.Start... started process not executing any code jpock76 ASP .Net 0 08-23-2010 02:16 PM
xsl variable $node/text() but $node can non-node-set help! Tjerk Wolterink XML 2 08-24-2006 03:28 AM
How to set the node indent property between the parent node and the leaf node viveknatani@gmail.com ASP .Net 0 02-13-2006 07:11 PM
Appending style sheet elements delraydog@gmail.com HTML 3 12-02-2005 02:40 PM
Appending style sheet elements delraydog@gmail.com Javascript 3 12-02-2005 02:40 PM



Advertisments