-
Notifications
You must be signed in to change notification settings - Fork 2
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
Name- and number-tree handling of Name and Num array "keys" which are null #307
Labels
ISO approved
Resolved issue approved by ISO
Comments
My misunderstanding about veraPDF/veraPDF-library#1355 and pdf-association/arlington-pdf-model#90. That is not related. But my questions are still valid - can name-/number-trees have keys (even array elements 0, 2, 4, ...) that are |
I'd say no, same as for dictionaries:
|
And makes it very easy to then state "... and shall not be null". |
petervwyatt
changed the title
Name- and number-tree handling of keys which are null
Name- and number-tree handling of Name and Num array "keys" which are null
Jul 4, 2023
petervwyatt
added
documentation
Improvements or additions to documentation
and removed
bug
Something isn't correct
labels
Jul 6, 2023
PDF TWG agree |
petervwyatt
added
ISO approved
Resolved issue approved by ISO
and removed
documentation
Improvements or additions to documentation
proposed solution
Proposed solution is ready for review
labels
Nov 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See veraPDF/veraPDF-library#1355 and pdf-association/arlington-pdf-model#90.
One of the issues in veraPDF/veraPDF-library#1355 is that the key in the
name-tree
isnull
and name tree keys are defined as "where each keyi shall be a string" and "The keys shall be sorted in lexical order".number-tree
use slightly different wording for the key type ("each keyi is an integer" - "is" vs "shall") but the same wording for the sorting requirement ("The keys shall be sorted in numerical order").So
name-tree
/number-tree
keys cannot benull
(fails "shall be a string"/"is an integer") and no allowance is made in either the lexical or numeric sorting algorithms fornull
keys - for example, whether they need to come first, last, or are skipped over entirely. And what would it mean if you had anull
key but a non-null
value??? Is that meaningful? (I note in veraPDF/veraPDF-library#1355 that both the key and value are bothnull
).So referring to Tables 36 and 37:
null
?I think the answer is yes (it's relatively common as @bdoubrov points out) so we need to allownull
as an explicit key type for both. And name and number trees should both use the same "shall"-style wording for consistency.null
?I think the answer is that keys that arenull
can appear anywhere but are ignored (not involved/skipped over) when considering lexical or numeric sorting. Not sure how to best phrase this - either we can say that only keys that are string/integer are sorted, or we say something about keys that arenull
...null
key with a non-null
value mean anything special?I think no. It's syntactically valid but stupid as the value is "inaccessible" via a name/number tree lookup - so no real difference to a key and value both beingnull
. This is probably worth a short informative NOTE.The text was updated successfully, but these errors were encountered: