Entries in the stack must be structured items - that is, either JSON Objects or Arrays, or XML Nodes.
copy
($destName as xs:QName, $sourceName as xs:QName) as empty-sequence()
Copy all items from source stack to a destination stack. |
create
($name as xs:QName) as empty-sequence()
Create a stack with this name. |
empty
($name as xs:QName) as xs:boolean
Checks if a stack exists and is empty. |
pop
($name as xs:QName) as structured-item()?
Return the top item in the stack, and remove it. |
push
($name as xs:QName, $value as structured-item()) as empty-sequence()
Add a new item to the stack; the stack will contain a copy of the given item. |
size
($name as xs:QName) as xs:integer
Count of items in the stack. |
top
($name as xs:QName) as structured-item()?
Return the top item in the stack, without removing it. |
declare %ann:sequential function stack:copy($destName as xs:QName, $sourceName as xs:QName) as empty-sequence()
If destination stack does not exist, it is created first.
If destination stack is not empty, the items are appended on top.
declare %ann:sequential function stack:create($name as xs:QName) as empty-sequence()
declare function stack:empty($name as xs:QName) as xs:boolean
declare %ann:sequential function stack:pop($name as xs:QName) as structured-item()?
declare %ann:sequential function stack:push($name as xs:QName, $value as structured-item()) as empty-sequence()
declare function stack:size($name as xs:QName) as xs:integer
declare function stack:top($name as xs:QName) as structured-item()?