Skip to content
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

kiwi/schema: Fix allowed value type for ISO publisher and application ID #2618

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

Conan-Kudo
Copy link
Member

@Conan-Kudo Conan-Kudo commented Aug 23, 2024

According to the spec, this should be constrained to 128 characters but also allow whitespaces. We didn't allow spaces in application ID, but allowed too much for Publisher.

Now we set up both correctly.

Fixes #2617.

@Conan-Kudo
Copy link
Member Author

@schaefi, @davidcassany: I'm pretty sure this necessitates a schema version bump, but I'm not sure how we handle implementing those.

@AdamWill
Copy link
Contributor

note this still isn't strictly correct. Per the spec, several other characters are allowed - ! " % & ' ( ) * + , - . / : ; < = > ?. The more restrictive character set (just upper-case letters, numbers, and the underscore) is referred to in the spec as "d-characters", and used for e.g. the volume ID. The less restrictive set is referred to as "a-characters", and used for the application ID and publisher (and also the data preparer, the system identifier, and the "standard identifier", though that is always the same string anyway).

@Conan-Kudo
Copy link
Member Author

Well, this isn't merged yet, so I can certainly add those in too. 😄

@schaefi
Copy link
Collaborator

schaefi commented Aug 26, 2024

@schaefi, @davidcassany: I'm pretty sure this necessitates a schema version bump, but I'm not sure how we handle implementing those.

Well so far we did not bump the schema version for this cases. You changed the strictness of a pattern applied to an attribute. Strictly speaking the schema did not change on any attribute or element or semantic structure. From that perspective no XSLT conversion is needed from old to new and thus we usually don't bump the schema version for such a change.

The version of kiwi itself will be bumped on a new tag that includes your change. Thus the increase of the pattern strictness can still be detected by a version compare of kiwi itself.

From my perspective this change can go in as soon as @AdamWill is fine with the final pattern

@Conan-Kudo Conan-Kudo force-pushed the fix-application-id-schema branch 2 times, most recently from fa20895 to 9674fc9 Compare November 20, 2024 00:56
@Conan-Kudo Conan-Kudo marked this pull request as ready for review November 20, 2024 00:57
@Conan-Kudo
Copy link
Member Author

The only character not added was the " character as I wasn't sure how to get that through with the file format (ie. I didn't know how to escape it properly).

@Conan-Kudo Conan-Kudo marked this pull request as draft November 20, 2024 00:58
@Conan-Kudo
Copy link
Member Author

And now all the tests fail anyway because the regex is somehow invalid 😩

According to the spec, this should be constrained to 128 characters
but also allow quite a few other special characters (as well as spaces).
We didn't allow spaces in application ID, but allowed too much for Publisher.

Now we set up both correctly.
@Conan-Kudo Conan-Kudo marked this pull request as ready for review November 20, 2024 01:16
@Conan-Kudo
Copy link
Member Author

Now everything should be good now! 😄

Copy link
Collaborator

@schaefi schaefi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks much 👍

@Conan-Kudo Conan-Kudo merged commit 8ab85d3 into main Nov 20, 2024
14 checks passed
@Conan-Kudo Conan-Kudo deleted the fix-application-id-schema branch November 20, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ISO application ID disallows spaces
3 participants