-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misleading error messages for extended package formats #151
Comments
So I think that this breaks down to two issues:
Comments/thoughts are welcome. |
I think it is fine to split this into two. We do not anticipate allowing extended packages, but of course this could be relevant for other users. |
We discussed possibly resolving this by looking at the headers and namespaces, but unfortunately, I don't think that will work. I have (so far) found four prefixes/namespaces related to extended packages: calcext:"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" field:"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" Of these, the namespace for "loext" seems to be found in the manifest header of ODF 1.3 package conforming (i.e not extended) format, and the namespace for "formx" is found in the content.xml header of ODF 1.3 package conforming format. This is fine of course, but I believe this means, we cannot just validate the headers. The specification defines the valid prefixes associated with defined XML namespaces (Table 1-6, Section 1.5 of the ODF Schema Specification). So we may need to check for elements containing any invalid prefixes (or possibly one of the four extended ones - I am not sure if this is all of them) and report that as "extended package format". Ideally, we would have a single error message for this and #150 saying something like (with the relevant selection based on validation of the file): "The file must be an ODF package v1.3. Version detected: Then any XML-4 errors related to such prefixes should not be shown. |
According to POL_2 the file MUST comply with the standard “OASIS Open Document Format for Office Applications (OpenDocument) v1.3”. Note that an ODF 1.3 extended package is not permitted.
These checks are not reporting back that an extended package format is being validated. Instead a long list (hundreds!) of XML-4 errors are reported, creating some confusion as to what the issue is.
I would expect this to produce a POL_2 error message along with a more specific error message indicating what the compliance issue is, i.e. use of extended package format.
The behaviour is similar (only difference is the number of XML errors) for 1.2 Extended and 1.3 Extended. For 1.2 Extended, it should also flag that the version is wrong (see other issue).
The text was updated successfully, but these errors were encountered: