saxon:is-defaulted

Tests whether an attribute node is present in the data model as a result of expansion of default or fixed values declared in a schema.

is-defaulted($node as node()) ➔ xs:boolean

Arguments

 

$node

node()

The attribute node in question

Result

xs:boolean

Namespace

http://saxon.sf.net/

Saxon availability

Requires Saxon-EE. Implemented since Saxon 9.7. Available for Java and C/C++ only (not .NET).

Notes on the Saxon implementation

Available since Saxon 9.7. Not available in SaxonCS.

Details

This function tests whether a supplied attribute node is present as a result of expansion of default or fixed values defined in a schema or DTD.

This information is available only if the options EXPAND_ATTRIBUTE_DEFAULTS and MARK_DEFAULTED_ATTRIBUTES are both enabled in the Configuration, and if the tree model in use is the TinyTree. If these conditions are not satisfied, or if the node supplied is not an attribute node, the function returns false.

In the case of DTD-defined attribute defaults, the function only works if Saxon is supplied with the necessary information by the XML parser. Generally this will be the case on the Java platform when the input is supplied as a SAXSource or StreamSource and DTD validation is requested.

If the input is an empty sequence, the function returns an empty sequence.

If running from the command line, use the option --markDefaultedAttributes:on to ensure that the information is available.

The function is not available in SaxonCS, because the Microsoft XML parser does not make the information available.

See also:

saxon:system-id()

saxon:column-number()