Changes

Jump to navigation Jump to search
2,880 bytes added ,  17:24, 16 November 2013
no edit summary
|}
...=Bitwise Operations=
==bin:or==
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|bin:or|$a as xs:base64Binary?, $b as xs:base64Binary?|xs:base64Binary?}}
|-
| '''Summary'''
|Returns the "bitwise or" of two binary arguments.<br/>If either argument is the empty sequence, an empty sequence is returned.
|-
| '''Errors'''
|{{Error|differing-length-arguments|#Errors}} the input arguments are of differing length.
|}
==bin:xor==
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|bin:xor|$a as xs:base64Binary?, $b as xs:base64Binary?|xs:base64Binary?}}
|-
| '''Summary'''
|Returns the "bitwise xor" of two binary arguments.<br/>If either argument is the empty sequence, an empty sequence is returned.
|-
| '''Errors'''
|{{Error|differing-length-arguments|#Errors}} the input arguments are of differing length.
|}
==bin:and==
{| width='100%'
|-
| width='120' | '''Signatures'''
|{{Func|bin:and|$in a as xs:base64Binary?, $b as xs:base64Binary?|xs:base64Binary?}}
|-
| '''Summary'''
|Returns the "bitwise and" of two binary arguments.<br/>If either argument is the empty sequence, an empty sequence is returned.
|-
| '''Errors'''
|{{Error|nondiffering-numericlength-characterarguments|#Errors}} the input arguments are of differing length.|} ==bin:not=={| width='100%'|-| width='120' | '''Signatures'''|{{Func|bin:not|$in as xs:base64Binary?|xs:base64Binary?}}|-| '''Summary'''|Returns the "bitwise not" of a binary argument.<br/>If the argument is the empty sequence, an empty sequence is returned.|} ==bin:shift=={| width='100%'|-| width='120' | '''Signatures'''|{{Func|bin:shift|$in as xs:base64Binary?, $by as xs:integer|xs:base64Binary?}}
|-
| '''ExamplesSummary'''|Shifts bits in binary data.<code>bin:hex('11223F4E')<br/code> yields If {{Code|$by}} is zero, the result is identical to {{Code|$in}}. If {{Code|$by}} is positive then bits are shifted to the left. Otherwise, bits are shifted to the right. If <code>ESI/Tg==|$by|</code>is greater than the bit-length of {{Code|$in}} then an all-zeros result is returned. The result always has the same size as {{Code|$in}}. The shifting is logical: zeros are placed into discarded bits. If the value of $in is the empty sequence, the function returns an empty sequence.
|}
 
=Errors=
 
{| class="wikitable" width="100%"
! width="110"|Code
|Description
|-
|{{Code|differing-length-arguments}}
|The arguments to a bitwise operation have different lengths.
|-
|{{Code|negative-offset}}
|An offset value is negative.
|-
|{{Code|offset-beyond-end}}
|An offset value extends beyond the binary data.
|-
|{{Code|negative-size}}
|A size value is negative.
|-
|{{Code|empty-search-item}}
|Binary search data is empty.
|-
|{{Code|octet-out-of-range}}
|An octet value lies outside the range 0-255.
|-
|{{Code|non-numeric-character}}
|Binary data cannot be parsed as number.
|-
|{{Code|unknown-encoding}}
|An encoding is not supported.
|-
|{{Code|decoding-error}}
|An error or malformed input during decoding a string.
|-
|{{Code|decoding-error}}
|An error or malformed input during encoding a string.
|-
|{{Code|unknown-significance-order}}
|An octet-order value is unknown.
|}
 
=Changelog=
 
Introduced with Version 7.8.
 
[[Category:XQuery]]
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu