[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: document(lang_*.xml)?

Subject: Re: document(lang_*.xml)?
From: Jarkko.Moilanen@xxxxxx
Date: Sat, 25 Jan 2003 13:22:38 +0200
lang_
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.