Home Forums Programming XML SSIS - XSLT file generating multiple xml files RE: SSIS - XSLT file generating multiple xml files

  • Provided that the XML files are similar you can absolutely do this. If they're not you can still do this, its just more complicated. You would have to post some sample XML and the XSLT files but this is the kind of thing I used to do all the time.

    What you are talking about is a good idea too. There are many ways to accomplish this, I can't get too specific with out sample XSLT and XML but here's some general thoughts:

    1. You can have an XSLT file that has a multitude of different templates and accommodates each possible scenario/XML file.

    2. Create a "catch all" type of XSLT file with some if/then scenarios.

    3. You can have a routine that runs before the XSLT task that creates the required XSLT dynamically. You could use SQL, some .NET language, or even an XSLT file that creates the XSLT file you need before the XSLT task runs. This way you have one routine that handles all 10 XML files.

    Post some sample XML and your XSLT and I can get more specific.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001