This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

using xsl to generate shell scripts


I realized that using XSL to generate scripts is a 'good' thing a few 
days ago.

I am generating html pages from an XML file. The XML has info to build 
100 or so different pages.  I pass a PARAM to say which page I want to 
generate. I was adding the info for each page a few pages at a time and 
then updating a script file to see the new pages. I was also generating 
a page that had pointers to all the pages.

As I was adding the most recent batch of pages and updating the script I 
realized the the difference between the output of the stylesheet that 
had pointers to all the html pages and the script was some literal text.

ding...

I spent upward of 47 seconds modifying the stylesheet and now have 
another stylesheet that generates the script file with ALL the web pages.

It's the kind of thing that we have done with perl or sed or awk in the 
past. The benefit of doing it with XSL for me is I usually have some XSL 
code that reads the XML I'm interested in. That makes it easy to 
generate scripts.


A simple thought that makes life a bit easier.

Gary



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]