[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: ODF date not validating
From: Jos van den Oever <Jos.van.den.Oever () kogmbh ! com>
Date: 2010-01-04 17:06:09
Message-ID: 201001041806.09662.Jos.van.den.Oever () kogmbh ! com
[Download RAW message or body]
Hi all,
The dates generated by the code in
filters/kpresenter/powerpoint/import/datetimeformat.cc is not valid XML
Schema date format. I changed it so that it is.
http://websvn.kde.org/?view=revision&revision=1069981
This is just a note to let you know that it can be an issue and to point out
that validating output from koconverter is important.
If you work on any of the filters that produce ODF, please validate the
resulting files. I have attached a simple script to do this. It references the
files OpenDocument-schema-v1.0-os.rng and OpenDocument-strict-schema-v1.0-
os.rng that you may find on the internet.
You run it simply as
validate.sh myodf.odp
or
validate.sh my_unzipped_odf_odp/
Cheers,
Jos
--
Jos van den Oever, software architect
+49 391 25 19 15 53
http://kogmbh.com/legal/
["validate.sh" (application/x-shellscript)]
#! /bin/sh
input="$1"
schemadir="/home/kde-devel/odfmetadata"
schema="$schemadir/OpenDocument-schema-v1.0-os.rng"
strictschema="$schemadir/OpenDocument-strict-schema-v1.0-os.rng"
#schema="$schemadir/OpenDocument-schema-v1.2-cd02-rev02.rng"
validate() {
input="$1"
file="$2"
required="$3"
strict="$4"
if test -n "$strict"; then
s="$strictschema"
else
s="$schema"
fi
echo $strictness validating $input/$file
if test -d "$input"; then
if test -n "$required" || test -e "$input/$file"; then
xmllint --nonet --noout --relaxng "$s" "$input/$file"
if test $? -ne 0; then
exit $?;
fi
fi
elif test -n "$required" || unzip -qq -t "$input" "$file"; then
unzip -qq -c "$input" "$file" | xmllint --nonet --noout --relaxng "$s" -
if test $? -ne 0; then
exit $?;
fi
fi
}
for strictness in "" "strict"; do
validate "$input" content.xml required "$strictness";
validate "$input" styles.xml required "$strictness";
validate "$input" meta.xml "" "$strictness";
validate "$input" settings.xml "" "$strictness";
done
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic