You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Dhruva B. Reddy" <sl...@yahoo.com> on 2004/01/06 05:02:18 UTC

Generate Multiple Files from Single XML Source with XSLT Task

We have one XML file from which I would like to generate multiple JSPs 
during the build process.  For example, from the following XML:

  <stuff>
    <thing>Thing1</thing>
    <thing>Thing2</thing>
    <thing>Thing3</thing>
  </stuff>
  
I would like to generate:

Thing1.jsp:

  <html>
    <h1>Thing1</h1>
    ...
  </html>
  
Thing2.jsp:

  <html>
    <h1>Thing2</h1>
    ...
  </html>

And so on.

Has anyone done anything like this?

Thanks,
Dhruva

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Generate Multiple Files from Single XML Source with XSLT Task

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> From: Dhruva B. Reddy [mailto:sledgehammer2010@yahoo.com]
> Subject: Generate Multiple Files from Single XML Source with XSLT Task
>
>
> We have one XML file from which I would like to generate multiple JSPs
> during the build process.  For example, from the following XML:
>
>
> Has anyone done anything like this?
>

You can use a Xalan extension to write to multiple files in an XSL.

Check out the junit-frames.xsl in Ant's source tree (should be included in a
distribution, I think, in the etc dir).


Conor



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Generate Multiple Files from Single XML Source with XSLT Task

Posted by Jacob Kjome <ho...@visi.com>.
See the xmltask at...
http://www.oopsconsultancy.com/software/xmltask.html

The recent announcement of version 1.9 on this list had an example of 
exactly what you are looking for.  Look it up in the archives.

Jake

At 08:02 PM 1/5/2004 -0800, you wrote:
>We have one XML file from which I would like to generate multiple JSPs
>during the build process.  For example, from the following XML:
>
>   <stuff>
>     <thing>Thing1</thing>
>     <thing>Thing2</thing>
>     <thing>Thing3</thing>
>   </stuff>
>
>I would like to generate:
>
>Thing1.jsp:
>
>   <html>
>     <h1>Thing1</h1>
>     ...
>   </html>
>
>Thing2.jsp:
>
>   <html>
>     <h1>Thing2</h1>
>     ...
>   </html>
>
>And so on.
>
>Has anyone done anything like this?
>
>Thanks,
>Dhruva
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
>http://hotjobs.sweepstakes.yahoo.com/signingbonus
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org