Package com.saxonica.ee.schema
Interface ComponentWithValueConstraint
-
- All Known Implementing Classes:
AttributeDecl
,AttributeUse
,ElementDecl
public interface ComponentWithValueConstraint
Interface for Element Declaration, Attribute Declaration and Attribute Use, created because they share common functionality for handling fixed and default values
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AtomicSequence
getDefaultValue()
Gets the default value, as a typed value.default ValueConstraint
getDefaultValueConstraint()
default UnicodeString
getDefaultValueLexicalForm()
Returns the lexical form of the default value of this componentdefault AtomicSequence
getFixedValue()
Returns the fixed value of this component.default ValueConstraint
getFixedValueConstraint()
default UnicodeString
getFixedValueLexicalForm()
Returns the lexical form of the fixed value of this attribute use.NamespaceResolver
getNamespaceResolver()
Get the namespace resolver used when the fixed or value constraints include lexical QNamesValueConstraint
getValueConstraint()
default Sequence
getValueConstraintAsFunction(ComponentWithValueConstraint att)
For use with the saxon:schema extension function, return the value constraint in the form of a functionvoid
setValueConstraint(ValueConstraint vc)
-
-
-
Method Detail
-
getValueConstraint
ValueConstraint getValueConstraint()
-
setValueConstraint
void setValueConstraint(ValueConstraint vc)
-
getFixedValueConstraint
default ValueConstraint getFixedValueConstraint()
-
getDefaultValueConstraint
default ValueConstraint getDefaultValueConstraint()
-
getValueConstraintAsFunction
default Sequence getValueConstraintAsFunction(ComponentWithValueConstraint att)
For use with the saxon:schema extension function, return the value constraint in the form of a function- Parameters:
att
- the component having the value constraint- Returns:
- a function whose result gives details of the value constraint
-
getFixedValueLexicalForm
default UnicodeString getFixedValueLexicalForm()
Returns the lexical form of the fixed value of this attribute use.- Returns:
- the fixed value defined by this attribute use, or null if no fixed value was specified. The value that is returned is the value as written in the schema document with whitespace normalization applied as defined by the whiteSpace facet.
-
getFixedValue
default AtomicSequence getFixedValue()
Returns the fixed value of this component. This corresponds to one aspect of the {valueConstraint} property defined in the schema component model.- Returns:
- the fixed value defined by this attribute declaration, element declaration, or attribute use, or null if no fixed value was specified. Once the schema has been compiled this will be the correctly-typed value; until then it will be the string value as specified in the source schema document.
-
getDefaultValueLexicalForm
default UnicodeString getDefaultValueLexicalForm()
Returns the lexical form of the default value of this component- Returns:
- the default value defined by this component, or null if no default was specified. The value returned is the value after whitespace normalization is applied to the value as written in the source schema.
-
getDefaultValue
default AtomicSequence getDefaultValue()
Gets the default value, as a typed value.- Returns:
- the default value. This will initially be saved as an UntypedAtomicValue; later, when the type is known, it will be converted to the correct type
-
getNamespaceResolver
NamespaceResolver getNamespaceResolver()
Get the namespace resolver used when the fixed or value constraints include lexical QNames- Returns:
- the namespace resolver for lexical QNames
-
-