XSL: output to several files


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: XSL: output to several files

Hybrid View

  1. #1
    Jesper Tejlgaard Guest

    XSL: output to several files


    Hi

    I would like to use XSL to split up a xml file into several xml files. How
    can I do this. The example source file can be thought of as

    <root>
    <elem>.......</elem>

  2. #2
    Russell Jones Guest

    Re: output to several files

    Create an XSLT stylesheet that has one or more parameters that control the
    content for the separate documents. The stylesheet retrieves the specified
    elements from the input document and returns a new document containing just
    the specified information. You would transform the original input document
    repeatedly, changing the parameters and saving the results for each
    iteration.

    Another way is to process the document with a programming language, using
    the DOM to extract the items you want to place in separate files, either
    creating a new DOMDocument object and saving that for each file, or just
    creating a string and saving that.

    Finally, you could simply process the original document as a text string,
    breaking it up however you please.

    Russell Jones
    Executive Editor,
    DevX.com

    "Jesper Tejlgaard" <tejl@it-c.dk> wrote in message
    news:3cce802e$1@10.1.10.29...
    >
    > Hi
    >
    > I would like to use XSL to split up a xml file into several xml files. How
    > can I do this. The example source file can be thought of as
    >
    > <root>
    > <elem>.......</elem>




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center