|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: document(lang_*.xml)?
Solved this prob somehow.... Here is how I in a "not so pretty" way managed to produce the desired output: <?xml version="1.0" encoding="UTF-8"?> <LangList> <language>lang_en.xml</language> <language>lang_fi.xml</language> <language>lang_no.xml</language> <language>lang_se.xml</language> </LangList> with this lang_list.sh #!/bin/sh # this skript reads the directory and selects all lang_*.xml files. # from them it generates list.xml file to be used by profiler.xsl path=/var/www/xslt beginline= /bin/cat begin rootbeginline= /bin/cat rootbegin rootendline= /bin/cat rootend cd $path /bin/echo "" /bin/echo "Creating backup of previous list.xml file to bu_list.xml file" cp $path/list.xml $path/bu_list.xml /bin/echo "Starting lang_list Listing" /bin/echo "" /bin/echo "List of languages in the file list.xml:" /bin/echo "********************************" ls lang_*.xml | sed -e "s@\(.*xml\)@<language>\1</language>@" /bin/echo "********************************" ls lang_*.xml | sed -e "s@\(.*xml\)@<language>\1</language>@" > list # put all three file contents to one file /bin/cat beginline rootbeginline list rootendline > list.xml /bin/echo "Stopping lang_list Listing" Cheers, Jarkko *************************************************** * Jarkko Moilanen * * Project Researcher, ITCM (www.itcm.org) * * Profound XML technology Expert * * University of Tampere * * Hypermedia Laboratory * *************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








