|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transforming XML 'on-the-fly' / Dynamic XSLT???
Nick,
Joseph Dane brought up a good example of how to implement a solution from within Java that allows you the ability to do "mini" transforms of data which can then be passed to another transformation process based on the results of each transformation or upon the variables that you are speaking of. Without seeing an example of the variables I can't give you an example of the Java code beyond pointing you to Dr. Kays company site (http://www.saxonica.com) to download the latest Saxon bits which come packaged with tons of Java examples that implement all sorts of transformations using various streams (dynamic and static) and document types (DOM, SAX, etc...)... I would pay specific attention to the TrAX examples (part of the JAXP API) as this will get you more inline with what Joseph is refering to. Adding to this a bit you might also want to consider the idea of creating a generic XSLT stylesheet that simply acts as a mechanism for matching one set of input XML patterns to another set of output XML patterns. In essence you will be creating an XML output definition file that can be mapped to the input file and then used to weave together any data elements necessary to give the proper output you desire. This gives you much more freedom and is more inline with what XSLT was designed for in the first place... a way to locate patterns in your XML data and then output a specified pattern of data once that pattern has been matched w/o hardcoding your stylesheets in a way that makes them harder to reuse for other types of output. Data weaving is not a new concept by any stretch of the imagination but its something that hasn't seen a lot of airtime as it can sometimes be a little tricky getting things to work just as you want them to. Best rest assured that just like XSLT, once you get it you get it and life becomes that much easier and your coding that much more productice than before. An example of this type of transformation process can be found at http://www.aspectxml.org. This takes the weaving concept and applies it to the Aspect Oriented Software Development paradigm but it should adequately showcase the concept that I am speaking of and give you some ideas on how to implement this concept into your own solution. If any of this is helpful and you still have further questions don't hesitate to ask. Best regards, <M:D/> Nick Roberts wrote: Hi all,
|
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
|

Cart








