Subject: RE: n2n linking. Call 4 better solution
From: Miles Sabin <msabin@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 3 Aug 2000 16:13:32 +0100
|
Rudolf P. Weinmann wrote,
> I have three xml files. Their elements have relationships
> with each other. For example: element <c id="L1"/> of
> three.xml belongs to the elements with the ids M1,M2,M3 of
> two.xml and so on. In terms of a DTD the attribute LinkedTo
> is of type IDREFS. I have written a stylesheet to produce the
> file output.xml (see below). Are there more efficient
> solutions than mine (not using extensions).
I think a lot turns on what you mean by 'efficient'.
Unless I'm missing something, given input docs with number of
significant elements n1, n2, n3, the size of the output doc
will be of size roughly proportional to n1*n2*n3. So it looks
as though if the total size of the input is O(n), the total
size of the output will be O(n^3), and hence the time to
construct the output will be O(n^3) no matter how clever you
get with the stylesheet, and no matter how good your XSLT
processor is.
In other words you shouldn't expect this transform to scale up
particularly nicely.
Cheers,
Miles
--
Miles Sabin Cromwell Media
Internet Systems Architect 5/6 Glenthorne Mews
+44 (0)20 8817 4030 London, W6 0LJ, England
msabin@xxxxxxxxxxxxxxxxx http://www.cromwellmedia.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|