Changes

Jump to navigation Jump to search
588 bytes added ,  23:39, 7 March 2016
|-
| width='120' | '''Signatures'''
|{{Func|inspect:static-context|$function as function(*)?, $name as xs:string|mapitem(xs:QName, xs:anyAtomicType)*)}}<br/>
|-
| '''Summary'''
|Returns a component of the annotations [https://www.w3.org/TR/xquery-31/#dt-static-context static context] of a {{Code|$function}} with the specified {{Code|$name}}. If no functionis supplied, the current static context is considered.<br/>The following components can be requested:* {{Code|base-uri}}: The static base URI.* {{Code|namespaces}} in a : A prefix/URI mapwith all statically known namespaces.* {{Code|element-namespace}}: The the default element/type namespace URI, or an empty sequence if it is absent.* {{Code|function-namespace}}: The default function namespace URI, or an empty sequence if it is absent.* {{Code|collation}}: The URI of the default collation.
|-
| '''Examples'''
|
* Returns an empty mapthe static base URI (same as {{Code|static-base-uri()}}):
<pre class="brush:xquery">
inspect:functionstatic-annotationscontext(true#0(), 'base-uri')
</pre>
* Returns a map with a single key <code><nowiki>Q{http://www.w3.org/2012/xquery}private</nowiki></code> and an empty sequence as valueall namespaces that are statically known in the module of the specified function:
<pre class="brush:xquery">
declare %private function local:f() { import module namespace data = 'well hiddendata.xqm' };inspect:functionstatic-annotationscontext(localdata:fget#01, 'namespaces')
</pre>
|}
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu