[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] I wrote an XSLT program that converts a mapping XML fi
Hi Folks, I created an XML file (a "mapping file") that describes how to convert a legacy XML format into a new XML format. To implement the conversion, I used a pipeline approach. The first step is an XSLT program that converts the mappings (in the mapping file) into a bunch of template rules, one template rule per mapping. In other words, the output of the first XSLT program is another XSLT program. (Cool! Dynamically generated XSLT program) The second step ran the generated XSLT program on a legacy XML file to produce XML in the new format. Here are some statistics on file sizes: Size of the mapping file: 383 KB Size of the XSLT program that converts the mappings (in the mapping file) to template rules: 154 KB Size of the XSLT program that was generated: 204622 KB <-- Huge! Lesson Learned: With a good description document (e.g., a good mappings document) and a few lines of XSLT code, you can dynamically generate a huge XSLT program that can do an enormous amount of work. I love this approach to programming. It harkens back to my time writing parsers and compilers. /Roger
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|