Fung Wai keung <[EMAIL PROTECTED]>
> I've downloaded and installed Dia 0.83 in RedHat 5.2. However, my
>Dia can't open any sample dia files, even the files that are saved by
>itself. The error message I have is "not a dia file". I can only open
>dia files given in the samples directory of the Dia source. I gunzip
>the UML-demo.dia and ER-demo.dia and I can open them in dia 0.83. If I
>then save them as other files, I can't open the newly saved files.
>
> how to solve the problem?
i have seen a similar situation (dia 83 & libxml 1.8.3 & slakware 7.0)
anyway for whatever reason dia is stripping out the xml 'namespace' stuff
when it writes the files -- no clue why, i'm not that close to this stuff
yet -- anyway following script can get you by till they determine how/if
they're gonna fix this in the binary....
use at your own risk (this works for me but maybe not you...)
/usr/local/bin/fix-dia <dia-file>
#! /bin/csh
setenv FTMP $1
cat $FTMP | \
sed s'/</<dia:/g' | \
sed 's/dia:\//\/dia:/g' |\
sed 's/<dia:?xml/<?xml/g'|\
sed 's/<dia:diagram>/<dia:diagram
xmlns:dia=\"http:\/\/www.lysator.liu.se\/\~alla\/dia\/\">/g' > /tmp/ftmp
mv /tmp/ftmp $FTMP
exit 0
steves