Closed ndw closed 6 months ago
To my understanding the c:data
document is an XML document to be converted to a binary document with "application/octet-stream". The section above the error starts with "Casting from an XML media type to any other media type..." So
<p:cast-content-type content-type="image/jpeg">
<p:with-input>
<c:data content-type="image/jpeg">SSBhbSBqdXN0IGEgdGV4dC4=</c:data>
</p:with-input>
</p:cast-content-type>
would convert the XML document to the binary "image/jpeg". But as "image/jpeg" != "application/octet-stream" is choose to raise an error.
What's more, I would have expected that casting from one binary content type to application/octet-stream would always succeed, though the spec doesn't say so.
Thats true, but we are taking about XML documents here. In a pipeline you would have to cast the XML to an image/jpeg first and then the image/jpeg (XML -> binary document) to application/octet-stream (binary -> binary).
Does this make sense?
RIght. I'm confused. Nevermind.
And thank you.
The test is supposed to raise
err:XC0074
:But the test is:
That appears to be a cast from one binary format to another, so I don't think
err:XC0074
applies. What's more, I would have expected that casting from one binary content type toapplication/octet-stream
would always succeed, though the spec doesn't say so.Or am I confused?