xproc / 3.0-test-suite

The 3.0 test suite.
https://test-suite.xproc.org/
MIT License
4 stars 3 forks source link

Is ab-contenttypes-025 correct? #740

Closed ndw closed 3 days ago

ndw commented 3 days ago

The test in ab-contenttypes-025 is that

    <p:input port="source" content-types="-xml"/>

is invalid: "Tests XS0111 is raised for negated contenttype(sic) shortcut."

The spec doesn't say that you can negate shortcuts, but we decided we could use them in p:invisible-xml:

     <p:input port="source" primary="true" content-types="any -xml -html"/>

I'm still open to the idea that ab-contenttypes-025 is an error; what does it mean to have a content type that exists entirely of exclusions? But I don't think it's err:XS0111.

xml-project commented 3 days ago

The test is from April 2019, p:invisible-xml was specified first December 2021. So I would say this is just a leftover. However: I do think we should explictly say that you can negate shortcuts. Additionally we should handle "-any". I would argue that this is an error. Does this make sense?

ndw commented 3 days ago

I wonder if it's possible to work out that the set of acceptable content types is empty and make that an error. I agree that -any is nonsensical, but equally, xml html -html -xml is nonsensical. But I'm not sure how practical it is to detect the error.

ndw commented 3 days ago

https://github.com/xproc/3.0-specification/issues/1115