Changes

Jump to navigation Jump to search
202 bytes added ,  13:00, 14 April 2020
no edit summary
=Keys=
==convert:decodeencode-key==
{{Mark|Introduced with Version 9.4:}}
|-
| width='120' | '''Signatures'''
|{{Func|convert:decodeencode-key|$key as xs:string|xs:string}}<br />{{Func|convert:decodeencode-key|$key as xs:string, $lax as xs:boolean|xs:string}}<br />
|-
| '''Summary'''
|Decodes Encodes the specified {{Code|$key}} (with the optional {{Code|$lax}} conversion method) to the original string a valid NCName representation, which can be used to create an element node.<br />Keys supplied to this function are usually element names from documents The encoding is the same that have been created with is used in the [[JSON Module]] and the [[CSV Module]] and the {{Code|direct}} conversion format.
|-
| '''Examples'''
|
* <code>element { convert:decodeencode-key('_0021'))</code> yields <code>"!</code>.* <code>json:doc("doc.json")//* ! convert:decode-key(name())} { 'text' }</code> yields the original string representation of all names of creates a JSON documentnew element with an encoded name key.
|}
==convert:encodedecode-key==
{{Mark|Introduced with Version 9.4:}}
|-
| width='120' | '''Signatures'''
|{{Func|convert:encodedecode-key|$key as xs:string|xs:string}}<br />{{Func|convert:encodedecode-key|$key as xs:string, $lax as xs:boolean|xs:string}}<br />
|-
| '''Summary'''
|Encodes Decodes the specified {{Code|$key}} (with the optional {{Code|$lax}} conversion method) to a valid NCName the original string representation, which can be used to create an element node.<br />The encoding is the same Keys supplied to this function are usually element names from documents that is used in have been created with the [[JSON Module]] and the [[CSV Module]] and the {{Code|direct}} conversion format.
|-
| '''Examples'''
|
* <code>element { convert:encodedecode-key('_0021'))</code> yields <code>!</code>.* <code>json:doc("doc.json")//* !"convert:decode-key(name()) } { 'text' }</code> creates yields the original string representation of all names of a new element with an encoded name JSON document.|-| '''Errors'''|{{Error|key|#Errors}} The specified keycannot be decoded to its original string representation.
|}
|{{Code|integer}}
|The specified digit is not valid for the given range.
|-
|{{Code|key}}
|The specified key cannot be decoded to its original representation.
|-
|{{Code|string}}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu