Hi Yuraukar! I think this link can help you: http://xml.apache.org/xalan-c/samples.html#documentbuilder sample: you can programmatically build a DOM tree and then run XSLT templates Dmitry XSLT Development "Yuraukar Nec" <[EMAIL PROTECTED] To: [EMAIL PROTECTED] .com> cc: Subject: Re: Howto provide my own data structure as input to Xalan? 28/07/2003 01:26 PM Please respond to xalan-dev Haven't had any feed back yet... Is this the wrong list or doesn't anyone have any info for me? I really would appreciate some help >From: "Yuraukar Nec" <[EMAIL PROTECTED]> >Reply-To: [EMAIL PROTECTED] >To: [EMAIL PROTECTED] >Subject: Howto provide my own data structure as input to Xalan? >Date: Mon, 28 Jul 2003 05:19:09 +0000 > >I am trying to find a way to provide my own data structure as an input to >Xalan C++, so I can use XSL to generate reports from my data. To achieve >this, I am currently investigating the different options: > >1. Wrap my data structure so it appears and behaves like a XalanNode that I >can provide to Xalan >2. Wrap my data structure so it appears and behaves like a Xerces DOM node >and use the existing wrapper to provide it to Xalan >3. any other idea? > >For further clarification: assume I have a data structure like this: >class Order >{ > int nQuantity; > string sProduct; >}; >class Customer >{ > string sName; > vector<Order> orders; >}; >I would like to be able to feed an instance of Customer into Xalan an apply >a stylesheet with templates such such as <xsl:for-each >select="Customer/Orders[quantity>10]"> etc. >Does anyone have any experience with writing custom subclasses/wrappers for >XalanNode, such as >class Order : public XalanNode >{ > //attributes as above > > // overwrite/implement all those methods that descendants of XalanNode >needs to define >} >Is XalanNode the correct place to start from or is there another, simpler >entry point? >The reason to look for a wrapper is that the data structure may be fairly >large, partly residing in a database, so I think its not an option to >transform it into XML or some structure and then call Xalan. > >I would appreciate any help here. > _________________________________________________________________ Fotos - MSN Fotos das virtuelle Fotoalbum. Allen Freunden zeigen oder einfach online entwickeln lassen: http://photos.msn.de/support/worldwide.aspx
