Changes

Jump to navigation Jump to search
21 bytes removed ,  18:37, 20 June 2023
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|convert:binary-to-string|$bytes as xs:anyAtomicType|xs:string}}<br/pre>{{Func|convert:binary-to-string|( $bytes as xs:anyAtomicType, $encoding as xs:string|xs:string}}<br/>{{Func|convert:binary-to-string|$bytes as xs:anyAtomicType, $encoding as xs :string= (), $fallback as xs:boolean|? := false()) as xs:string}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|convert:string-to-base64|$string as xs:string|xs:base64Binary}}<br/pre>{{Func|convert:string-to-base64|( $string as xs:string, $encoding as xs:string| := ()) as xs:base64Binary}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|convert:string-to-hex|$string as xs:string|xs:hexBinary}}<br/pre>{{Func|convert:string-to-hex|( $string as xs:string, $encoding as xs:string| := ()) as xs:hexBinary}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:integers-to-base64|( $integers as xs:integer*|) as xs:base64Binary}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:integers-to-hex|( $integers as xs:integer*|) as xs:hexBinary}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:binary-to-integers|( $binary as xs:anyAtomicType|) as xs:integer*}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:binary-to-bytes|( $binary as xs:anyAtomicType|) as xs:byte*}}</pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:integer-to-base|( $number as xs:integer, $base as xs:integer|) as xs:string}}<br/pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:integer-from-base|( $string as xs:string, $base as xs:integer|) as xs:integer}}<br/pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:integer-to-dateTime|( $milliseconds as xs:integer|) as xs:dateTime}}<br/pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:dateTime-to-integer|( $dateTime as xs:dateTime|) as xs:integer}}<br/pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:integer-to-dayTime|( $milliseconds as xs:integer|) as xs:dayTimeDuration}}<br/pre>
|- valign="top"
| '''Summary'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|<pre>convert:dayTime-to-integer|( $dayTime as xs:dayTimeDuration|) as xs:integer}}<br/pre>
|- valign="top"
| '''Summary'''
=Keys=
 
The key conversion is employed by the [[JSON Module]] and the [[CSV Module]] to encode strings to valid element names and back to the original representation:
 
* If lax conversion is '''disabled''', invalid characters are replaced with underscores or (when invalid as first character of an element name) prefixed with an underscore. The resulting string may be better readable, but it cannot necessarily be converted back to the original form.
* With lax conversion '''enabled''', a string is encoded to a valid NCName representation:
** An empty string is converted to a single underscore ({{Code|_}}).
** Existing underscores are rewritten to two underscores ({{Code|__}}).
** Characters that are no valid NCName characters are rewritten to an underscore and the character’s four-digit Unicode. For example, the exclamation mark {{Code|?}} is transformed to {{Code|_003f}}.
==convert:encode-key==
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|convert:encode-key|$key as xs:string|xs:string}}<br/pre>{{Func|convert:encode-key|( $key as xs:string, $lax as xs:boolean|? := false()) as xs:string}}<br/pre>
|- valign="top"
| '''Summary'''
|Encodes the specified {{Code|$key}} (with the optional {{Code|$lax}} conversion method) to a valid NCName representation, which can be used to create an element node:* An empty string is converted to a single underscore ({{Code|_}}).* Existing underscores are rewritten to two underscores ({{Code|__}}).* Characters that are no valid NCName characters are rewritten to an underscore and the character’s four-digit Unicode. For example, the exclamation mark {{Code|?}} is transformed to {{Code|_003f}}.* If lax conversion is chosen, invalid characters are replaced with underscores or (when invalid as first character of an element name) prefixed with an underscore. The resulting string may be better readable, but it cannot necessarily be converted back to the original form.This encoding is employed by the {{Code|direct}} conversion format in the [[JSON Module]] and the [[CSV Module]].
|- valign="top"
| '''Examples'''
{| width='100%'
|- valign="top"
| width='120' | '''SignaturesSignature'''|{{Func|convert:decode-key|$key as xs:string|xs:string}}<br/pre>{{Func|convert:decode-key|( $key as xs:string, $lax as xs:boolean|? := false()) as xs:string}}<br/pre>
|- valign="top"
| '''Summary'''
|Decodes the specified {{Code|$key}} (with the optional {{Code|$lax}} conversion method) to the original string representation.<br/>Keys supplied to this function are usually can be element names from documents that have been created with by the [[JSON Module]] or [[CSV Module]].
|- valign="top"
| '''Examples'''
Bureaucrats, editor, reviewer, Administrators
13,554

edits

Navigation menu