RE: [xsl] XSL transformations on hundreds of XML documents held up against single large XML document

Subject: RE: [xsl] XSL transformations on hundreds of XML documents held up against single large XML document
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Thu, 16 Jun 2005 11:11:59 +0100
This depends on the API of your processor, but I would expect you to be able
to construct a stylesheet parameter whose value represents a node-set, being
the set of document nodes that the stylesheet is to process. In the case of
a Microsoft processor, I'd expect this normally to be a DOM NodeList -
though I can't be certain without checking that a DOM NodeList allows nodes
from multiple documents. 

So you should be able to create each of your A1..An documents as a DOM
Document, construct a NodeList containing the document nodes (or the
document elements if you prefer), and pass this to a stylesheet parameter
that you then treat as a node-set.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Ragulf Pickaxe [mailto:ragulf.pickaxe@xxxxxxxxx] 
> Sent: 16 June 2005 10:41
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] XSL transformations on hundreds of XML 
> documents held up against single large XML document
> 
> Hi all,
> 
> I have a problem that probably has to do with architechture (though I
> do not know that).
> 
> My problem is this:
> I have an XML "X" that I have gotten from a database.
> With stylesheet "Y" I need to transform this data many times. Each
> time differ by what is to be extracted from the "X" document. The
> informations on what to be extracted are in other XML documents "A1,
> A2, A3, etc." that are all generated in memory.
> 
> Usually I would be able to include the other documents in the XSL (as
> a variable), but as they are generated in memory, I have no idea on
> how to do this. The "X" document is also in memory at this time. It is
> not viable to save them to disc at this time.
> 
> Is there some way of doing this, or is there something else 
> that I can do?
> 
> If the solution depends on development environment, I am using C# and
> XSLT.NET (that is: XSL version 1.0).
> 
> In the time of writing this, I have come to think of another solution
> which is the only thing I can think of at the moment, that is to add
> the A1, etc. to X via DOM before transforming the whole with Y
> stylesheet. If someone has anything to say about this solution, I
> would be glad to hear it, as well.
> 
> X + A1 + Y -> B1
> X + A2 + Y -> B2
> X + A3 + Y -> B3
> ...
> 
> Thank you
> Ragulf Pickaxe :-|

Current Thread