#!/usr/bin/perl -w # This script takes a KWord XML file as entry (as saved by KWord) # and generates a KWord XML file that is ready to be used as a template. # Usually one will run unzip first, to extract maindoc.xml from the document, # and use that as the . # David Faure die "Usage: $0 inputFile outputFile.kwt" unless ($#ARGV == 1); open(IN, "<$ARGV[0]") or die "Can't open $ARGV[0] for reading"; open(OUT, ">$ARGV[1]") or die "Can't open $ARGV[1] for reading"; my $inStyle = 0; my $styleName = ''; while() { $inStyle = 1 if ( /