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.

_________________________________________________________________
MSN Hotmail� - �Absolut kostenfrei! Der weltweit gr��te E-Mail-Anbieter im Netz: http://www.msn.de/hotmail




Reply via email to