There’s the office:version
attribute for several XML streams of the document’s zip container. For ODF 1.3 it has the value 1.3
. See 19.390 office:version of the ODF standard part 3. Whether extensions are stored can be determined by expecting the declared XML namespaces.
A quick check can be done by inspecting the document zip’s META-INF/manifest.xml
stream (see also 4.16.14 manifest:version of ODF part 2), there is for example
<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0" manifest:version="1.3" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0">
where
manifest:version="1.3"
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
denote ODF 1.3 extended (with xmlns:loext, LibreOffice extensions).
Theoretically dDifferent streams can be in different versions, so content.xml or styles.xml might actually have different office:version attribute values than the overall <manifest:manifest manifest:version="1.3">
, but for LibreOffice in practice that doesn’t happen (AFAIK)(did not know enough).
You may have to check for different xmlns
extension namespaces for different streams though if you need details; the LibreOffice extensions are xmlns:loext
but other creators/generators may have other extension namespaces.