pdf-association / arlington-pdf-model

A vendor- and implementation-independent specification-derived, machine-readable model of PDF.
Apache License 2.0
77 stars 6 forks source link

FunctionTypeN tests #32

Closed faceless2 closed 2 years ago

faceless2 commented 2 years ago

FunctionType0 makes a special-case test on the Size and Decode keys, but they are against another key which is optional, so the test will often be skipped. It can be rephrased against a required key. Proposed changes:

Size      [fn:Eval(fn:ArrayLength(Domain)==(2 * fn:ArrayLength(Size)))]
Decode    [fn:Eval(fn:ArrayLength(Decode)==fn:ArrayLength(Range))]
petervwyatt commented 2 years ago

Nice. Arguably ISO 32K would also be easier to understand if it was worded this way too!