json-bom-001
Tests that a BOM is ignored in an UTF-8 json document.
Test is expected to pass.
The pipeline
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:t="http://xproc.org/ns/testsuite/3.0" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:document href="../documents/json-utf-8-bom.json"/>
</p:with-input>
</p:identity>
<p:identity>
<p:with-input>
<result>{starts-with(.?key, 'A JSON string')}</result>
</p:with-input>
</p:identity>
</p:declare-step>
Result
<result xmlns:t="http://xproc.org/ns/testsuite/3.0">true</result>
Schematron checks
<s:schema xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://purl.oclc.org/dsdl/schematron" xmlns:t="http://xproc.org/ns/testsuite/3.0"
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 not removed.</s:assert>
</s:rule>
</s:pattern>
</s:schema>
Revision history
- 07 Feb 2025, Achim Berndzen
- Initial commit.