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

fn:IsPresent in SpecialCase of "A" of "OutlineItem" #127

Open
Afloat6715 opened this issue Sep 18, 2024 · 0 comments
Open

fn:IsPresent in SpecialCase of "A" of "OutlineItem" #127

Afloat6715 opened this issue Sep 18, 2024 · 0 comments

Comments

@Afloat6715
Copy link

Afloat6715 commented Sep 18, 2024

The ISO 32000-2 Specification reads for "A": "shall not be present if a Dest entry is present".

fn:IsPresent(key) shall be interpreted as: "asserts that the current row must be present if key is present".

The current logic should, to my understanding, be evaluated as:

Dest A IsPresent (logical implication: Dest => A) Not
0 0 True False
0 1 True False
1 0 False True
1 1 True False

While the condition should be interpreted as:

Dest A Both Present (logical and: Dest and A) Not
0 0 False True
0 1 False True
1 0 False True
1 1 True False

In my opinion the functionality of "IsPresent" should be reworked so that it only takes one Key/Path as argument and resolves to True if that Key is present. This would be a breaking change but, in the end, a more intuitive implementation.
Additionally there could be a "Implication(A, B)" function where A and B both resolve to a boolean and the Implication function implements the first Table of this issue.

For cases where the first logic is needed a function would look like this:
fn:Implication(fn:IsPresent(Other), fn:IsPresent(CurrentRow))

And where the second logic is needed a function would look like this:
fn:Eval(fn:IsPresent(A) && fn:IsPresent(B))

I was looking at the veraPDF project and how they interpret "fn:IsPresent" and they basically change the implementation if the function is wrapped in a "fn:Not"

@pdf-association pdf-association deleted a comment Oct 23, 2024
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

No branches or pull requests

1 participant