Package com.saxonica.ee.schema
Class WhitespaceFacet
java.lang.Object
com.saxonica.ee.schema.Facet
com.saxonica.ee.schema.WhitespaceFacet
Represents a whitespace facet on a schema-defined simple type
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkFacetRestriction
(UserSimpleType type, SimpleType base, SchemaCompiler compiler) Check that this facet is legal when used on a type derived by restrictionGet a function item that represents this Facet schema component.getName()
Returns the name of this FacetgetValue()
Returns the lexical representation of this facetint
Get the whitespace action required: one of PRESERVE, REPLACE, or COLLAPSEboolean
Ask whether this is a constraining facet (as distinct from a pre-lexical facet)void
boolean
testAtomicValue
(AtomicValue value) Test whether an atomic value conforms to this facetMethods inherited from class com.saxonica.ee.schema.Facet
getConstraintName, getMessage, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLong
-
Constructor Details
-
WhitespaceFacet
public WhitespaceFacet()
-
-
Method Details
-
isConstraining
public boolean isConstraining()Ask whether this is a constraining facet (as distinct from a pre-lexical facet)- Overrides:
isConstraining
in classFacet
- Returns:
- true if this is a constraining facet. Note: we return false, despite the fact that the XSD specification misleadingly classifies whiteSpace as a constraining facet
-
getName
Description copied from class:Facet
Returns the name of this Facet -
setValue
- Throws:
SchemaException
-
getValue
Returns the lexical representation of this facet -
getWhitespaceAction
public int getWhitespaceAction()Get the whitespace action required: one of PRESERVE, REPLACE, or COLLAPSE- Overrides:
getWhitespaceAction
in classFacet
- Returns:
- the whitespace action, by default PRESERVE
-
checkFacetRestriction
public void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException, ValidationException Check that this facet is legal when used on a type derived by restriction- Overrides:
checkFacetRestriction
in classFacet
- Parameters:
type
- the type on which the facet is definedbase
- the type from which the restricted type is derivedcompiler
- the schema compiler- Throws:
SchemaException
- if the facet is not legalValidationException
- if a value is found that does not conform to the facet
-
testAtomicValue
Test whether an atomic value conforms to this facet- Specified by:
testAtomicValue
in classFacet
- Parameters:
value
- the value to be tested- Returns:
- true if the value conforms; false if it doesn't conform, or if the test fails
-
getFacetAsFunctionItem
Description copied from class:Facet
Get a function item that represents this Facet schema component.- Specified by:
getFacetAsFunctionItem
in classFacet
-