openpreserve / odf-validator

Open source Open Document Format (ODF) validation
http://odf.openpreservation.org/
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Bug or feature: XML-4 error for calcext? #153

Open RvanVeenendaal opened 2 months ago

RvanVeenendaal commented 2 months ago

The ODF Validator produces error messages for ODS files with calcext extensions: bug or feature? This is possibly a duplicate of #151.

Test corpus: ESCO dataset - v1.1.2, exported in Dutch (NL), opened, edited (added "TEST Remco") and saved in LibreOffice 7.3.2.2. Same result in LibreOffice 24.2.2.2. Tested under Windows 10 and java.exe from JDK 22.0.1. See also https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes#LibreOffice_ODF_extensions.

It seems that these are acceptable extensions as far as the standard is concerned, but the ODF Validator doesn't accept them, resulting in this XML-4 error. Note: an XML validator like XMLValidatorBuddy informs me that the file is well-formed.

Example of error message: XML-4: content.xml [ERROR] Not a valid XML document. Validation exception at line 2 and column 6574578: attribute "calcext:value-type" not allowed here; expected attribute "office:string-value", "table:content-validation-name", "table:formula", "table:number-columns-repeated", "table:number-columns-spanned", "table:number-matrix-columns-spanned", "table:number-matrix-rows-spanned", "table:number-rows-spanned", "table:protect", "table:protected", "table:style-name", "xhtml:about", "xhtml:content", "xhtml:datatype", "xhtml:property" or "xml:id".

for this XML snippet: (...)http://data.europa.eu/esco/concept-scheme/member-occupations,http://data.europa.eu/esco/concept-scheme/occupations</text:p></table:table-cell>Assemblagetechnici voertuigen installeren en monteren onderdelen en componenten van voertuigen. Zij inspecteren de motorvoertuigen op defecten en testen of de geassembleerde producten goed presteren en voldoen aan de kwaliteitsnormen.</text:p></table:table-cell>8211.5</text:p></table:table-cell></table:table-row>TEST Remco</text:p></table:table-cell>(...)

A namespace for this calcext is defined at the beginning of the file: _<?xml version="1.0" encoding="UTF-8"?>

_
carlwilson commented 1 month ago

Hi @RvanVeenendaal . This is an example of an extended file, and extended conformance is currently not supported, which was by design/request. It's apparent that it's needed, see #151. Expect this to get some attention soon.