|
|
sc:component-property(
|
|
$propname as xs:string,
|
|
[$arg as schema-component()]
|
| ) as item()* |
|
 |
Summary:
Returns the named property of the schema component.
The context item is used for the second argument if it is not given.
Properties include:
- name
- Same as sc:name
- type
- Same as sc:type
- complex-type
- Same as sc:complex-type
- simple-type
- Same as sc:simple-type
- element-decl
- Same as sc:element-decl
- attribute-decl
- Same as sc:attribute-decl
- schema
- Same as sc:schema
- annotations
- Same as sc:annotations
- facets
- Same as sc:facets
- attributes
- Same as sc:attributes
- particles
- Same as sc:particles
- attribute-groups
- The attribute groups of the schema
- model-groups
- The model groups of the schema
- notations
- The notations of the schema
- types
- The types of the schema
- elements
- The element declarations of the schema
- attribute-wildcard
- The attribute wildcard on the type or in
the attribute group
- identity-constraints
- The identity constraints on the element
declaration or schema
- scope
- The scope of the element or attribute declaration
- fixed
- The fixed value of the element or attribute declaration
or whether a facet is fixed
- default
- The default value of the element or attribute
declaration
- substitution-group
- The element declaration serving as the
substitution group head of the element declaration
- nillable
- Whether the element declaration is declared as
nillable
- abstract
- Whether the element declaration or type is declared as
abstract
- block-extension
- Whether the element declaration or complex type
is declared as blocking extensions
- block-restriction
- Whether the element declaration or complex type
is declared as blocking restrictions
- block-substitution
- Whether the element declaration is declared as
blocking substitutions
- final-extension
- Whether the element declaration or complex type is
declared as final for extensions
- final-restriction
- Whether the element declaration or complex type
is declared as final for restrictions
- variety
- The variety of the simple type (atomic, list, or
union)
- base
- The base type of the type
- primitive
- The primitive type of the simple type
- item-type
- The item type of the list simple type
- member-types
- The member types of the union simple type
- ordered
- The ordering of the simple type
- numeric
- Whether the simple type is numeric
- finite
- Whether the simple type is finite
- bounded
- Whether the simple type is bounded
- final-list
- Whether the simple type is declared as final
for lists
- final-union
- Whether the simple type is declared as final
for unions
- final-restriction
- Whether the simple type is declared as final
for restrictions
- derivation-method
- The derivation method of the complex type
(extension, restriction)
- content-type
- The kind of content type of the complex type
(empty, simple, element-only, mixed)
- min-occurs
- The declared minimum occurrences of the particle
- max-occurs
- The declared maximum occurrences of the particle
- process-contents
- What processing is declared for the wildcard
(strict, lax, skip)
- namespaces
- What namespaces the wildcard references
- value
- The value of the facet
- category
- The kind of identity constraint (key, unique, keyref)
- referenced-key
- The key referenced by the keyref
- selector
- The selector path in the identity constraint
- fields
- The field paths in the identity constraint
- system
- The notation's system identifier
- public
- The notation's public identifier
- version
- The schema's version
- schema-location
- The schema's location
|
Parameters:
$propname
:
The name of the component property to return.
|
$arg
(optional):
The component whose associated schema is to be returned.
|
|
Example:
declare namespace th="http://marklogic.com/xdmp/thesaurus";
xdmp:describe(
<th:thesaurus>
<th:entry><th:term>dog</th:term>
<th:synonym><th:term>canine</th:term></th:synonym>
</th:entry>
</th:thesaurus>//th:entry/sc:schema()!sc:component-property("schema-location")
)
=>
"thesaurus.xsd"
|
|
|
|
sc:function-parameter-type(
|
|
$arg as function(*),
|
|
$param as xs:integer
|
| ) as schema-type()? |
|
 |
Summary:
Returns the declared parameter type of a specific parameter of the
function item as a schema component.
|
Parameters:
$arg
:
The function item whose return type is to be returned.
|
$param
:
The number of the parameter, 1 for the first, 2 for the second, and
so on. If the param is out of range, the empty sequence is returned.
|
|
Example:
let $f := function-lookup(xs:QName("sc:function-parameter-type"),2)
return (
for $a in 1 to function-arity($f)
return (concat("arg",$a,"=",sc:function-parameter-type($f,$a)))
)
=>
arg1=#xdmp:function
arg2=#xs:anyAtomicType
|
|
|