Tests that the p:document charset does not override server metadata.
Test bom-012a.xml is expected to pass.
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:document content-type="text/plain; charset=UTF-8" href="http://localhost:8246/docs/not-a-bom.txt"/>
</p:with-input>
</p:identity>
<p:identity>
<p:with-input>
<!-- UTF-8 BOM, overwrite ISO-8859-1 from server-->
<p:inline>
<result>{starts-with(., "It's not a BOM.")}</result>
</p:inline>
</p:with-input>
</p:identity>
</p:declare-step>
<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<s:ns uri="http://www.w3.org/1999/xhtml" prefix="html"/>
<s:pattern>
<s:rule context="/">
<s:assert test="result='true'">The BOM was removed.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Ported from bom12: Overwriting server supplied encoding.
Initial commit.