bin:infer-encoding

Examines a binary value that encodes a string, to determine the encoding and the start offset of the content.

infer-encoding($value as (xs:hexBinary | xs:base64Binary), $encoding as xs:string?:=()) ➔ record(encoding as xs:string, offset as xs:integer)

Arguments

 

$value

(xs:hexBinary | xs:base64Binary)

Input binary data

 

$encoding

xs:string?

:= ()

The encoding type to be used

Result

record(encoding as xs:string, offset as xs:integer)

Namespace

http://expath.org/ns/binary

Links to specifications

EXPath Binary Module 4.0

Saxon availability

Available in XPath 4.0 and later versions. Implemented since Saxon 13. Requires Saxon-PE or Saxon-EE. Available for all platforms.