http://zorba.io/modules/schema

View as XML or JSON.

This module provides function that are related to XML Schema support in Zorba.

Function Summary

is-validated ($node as node()) as xs:boolean external

This function returns true if the given node has been validated, and false otherwise.

schema-type ($item as item()) as xs:QName? external

This function returns the name of the type of the item passed as parameter.

validate-in-place ($node as node()) external

Updating function that validates the document in place.

Functions

is-validated#1

declare  function schema:is-validated($node as node()) as xs:boolean external
This function returns true if the given node has been validated, and false otherwise.

Parameters

node as node()
the node item that should be checked for validation

Returns

xs:boolean
true if the given node has been validated, false otherwise.

schema-type#1

declare  function schema:schema-type($item as item()) as xs:QName? external
This function returns the name of the type of the item passed as parameter.

Parameters

item as item()
the item from which the name of the type should be returned.

Returns

xs:QName?
the name of the type (as QName) of the item passed as parameter.

validate-in-place#1

declare  function schema:validate-in-place($node as node()) external
Updating function that validates the document in place. After the updating query is applied the $node will contain the validated content.

Parameters

node as node()
the document or element to be validated, otherwise error

Returns

The result of the function is an empty XDM instance and a pending update list that consists the schema:validate-in-place($node)) primitive.