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

[off-list] document(lang_*.xml)

Subject: [off-list] document(lang_*.xml)
From: Mike Brown <mike@xxxxxxxx>
Date: Sat, 25 Jan 2003 04:45:12 -0700 (MST)
list.xml
Jarkko.Moilanen@xxxxxx wrote:
> So there is no root level element, how do I add it there? 

Most every shell uses '>' to redirect (creating/overwriting the destination),
and '>>' to append (raising an error if the destination does not exist).

Some shells have a 'noclobber' option that controls whether or not '>' will
overwrite an existing file or raise an error. How you set this option depends
on what shell you're using. #!/bin/sh implies Bourne shell, but on some Linux
systems they've replaced it with Bourne Again shell (bash), which was not a 
good idea, in my opinion. 'man sh' or 'man bash' will give you all the 
details. Anyway...

echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' > list.xml
echo '<LangList>' >> list.xml
ls lang_*.xml | sed -e "s@\(.*xml\)@<language>\1</language>@" >> list.xml
echo '</LangList>' >> list.xml

Instead of 'ls', you might want to do '/bin/ls -1'. Many people create
personal aliases for 'ls' that change the list format. By explicitly
specifying /bin/ls, you avoid using the alias. The -1 forces the output to be
one filename per line, in case the default on your system is multicolumn.

 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.