bom-014

Tests that the BOM is not removed if a UTF-16BE document is read with the UTF-16LE encoding.

Test bom-014.xml is expected to pass.

The pipeline

<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-16LE" href="../documents/bom-utf-16be.txt"/>
      </p:with-input>
   </p:identity>
   <p:identity>
      <p:with-input>
         <result>{not(starts-with(., 'Some'))}</result>
      </p:with-input>
   </p:identity>
</p:declare-step>
MorganaXProc passing XML Calabash passing

Schematron validation

<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 not removed.</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

06 Feb 2025, Norm Tovey-Walsh

Initial commit.