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]

Re: OT: ICFP 2001 (xsl solution?)



> we'd also need to wrap a root element round it... any similarly concise
> one-liners?

grumble some people...

will 3 lines do:

xx.sh:
===================
sed -e "1 a\\
<foo>" -e "$ a\\
</foo>" -e "s/\\([0-9]\\)/x\\1/g" $1


xx.x:
===================

<1>xxx</1>

<b>gg</b>

<9>xxx</9>



bash$ ./xx.sh xx.x

<foo>

<x1>xxx</x1>

<b>gg</b>

<x9>xxx</x9>
</foo>


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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]