RE: [xsl] Generic Lookup (Element Mapping)

Subject: RE: [xsl] Generic Lookup (Element Mapping)
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 08 May 2002 12:06:35 -0400
At 2002-05-08 08:46 -0500, Faroukh Fekravar wrote:
The reason that I did not consider more than stylesheet is that I will have
more than one mapping file (most likely 3) and am not sure how complicated
will the whole thing with that and if it's at all possible.

Sounds like the easiest is possibly to create a separate transform for each mapping and then run the results successively through each.

Having said that
I did not know that it has an impact on the performance.

Large files are generally not great for XSLT for any transform because of the need to have the entire source tree in memory. But, for your particular case of synthesizing stylesheets based on mapping files and then executing the synthesized stylesheets, I think XSLT will give you what you need.

My concern at this moment is whether XSLT is a proper approach to solve the
problem and if yes which patterns/techniques can be used to achieve that.

Hopefully the example I wrote for you gives you an appropriate approach, as it illustrates all the steps you would need to go through.

I try to explain my second mapping file to see whether the technique
proposed by you can handle that one too.

You will need to consider the kind of stylesheet you need and then write a stylesheet to accomplish that. That was how I approached your first issue. Don't jump in trying to write the synthesizing stylesheet until you know exactly what you need in your synthesized stylesheet. Write the end result you need by hand, and then write the stylesheet to create that from your mapping file.

My second mapping file defines the inter relationships of the traget
That looks like:

Good luck with your stylesheet writing ... I think you have the direction in hand now to proceed on your own.

.................... Ken

-- Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO: June 17-21, 2002 - : 3-days XML Information Modeling: July 31-August 2, 2002

G. Ken Holman                mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:               2002-05-06,07,09,10,13,15,20,
-                    06-04,07,10,11,13,14,17,20,07-31,08-05,27,30

XSL-List info and archive:

Current Thread