thank you for the feedback - this does however not solve my problem.
I had a look at the sample, which demonstrates how to build up your
own document by constructing nodes and attributes and filling in the
data.
I would like to provide my data structure directly (either through
implementing interfaces or wrappers), because transforming my
structure into another structure is not possible (or at least not
reasonable).
This is because my data structure may have a lot of instances
(say 1000 is not uncommon) of different classes. In the sample
of my previous post, imagine that the customer may have 200 orders,
each order being assigned to a product, each product having
1-5 subcomponents, etc. Applying an xsl to the structure directly
doesn't hurt; converting the 1000 instances "just in case" and then
applying an xsl that (for example) accesses only customer and orders (not those
200 products and 500 subcomponents) would be a waste of
time and memory.
Still I appreciate any support here. Thanks
From: Dmitry Hayes <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Howto provide my own data structure as input to Xalan? Date: Mon, 28 Jul 2003 13:44:42 -0400
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
_________________________________________________________________
Fotos - MSN Fotos das virtuelle Fotoalbum. Allen Freunden zeigen oder einfach online entwickeln lassen: http://photos.msn.de/support/worldwide.aspx
