public class AssertionFacet extends Facet
Constructor and Description |
---|
AssertionFacet(Assertion assertion)
Create a assertion facet
|
Modifier and Type | Method and Description |
---|---|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base,
SchemaCompiler compiler)
Check that this facet is legal when used on a type derived by restriction
|
Function |
getFacetAsFunctionItem()
Get a function item that represents this Facet schema component.
|
java.lang.String |
getName()
Returns the name of this Facet
|
java.lang.String |
getValue()
Returns the lexical representation of the value of this facet
|
void |
serializeFacet(SchemaModelSerializer serializer)
Serialize this facet
|
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
boolean |
testAtomicValue(AtomicValue value,
ConversionRules validationContext)
Test whether an atomic value conforms to this facet
|
boolean |
testListValue(AtomicSequence value)
Test whether a list value conforms to this facet.
|
boolean |
testListValue(AtomicSequence value,
ConversionRules rules)
Test whether a list value conforms to this facet.
|
getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, setFixed, setMessage, testLength, toLong
public AssertionFacet(Assertion assertion)
assertion
- the assertionpublic java.lang.String getName()
Facet
public java.lang.String getValue()
Facet
public void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException
checkFacetRestriction
in class Facet
type
- the derived typebase
- the type from which the restricted type is derivedcompiler
- the schema compilerSchemaException
- if the facet is not legalpublic boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be testedpublic boolean testAtomicValue(AtomicValue value, ConversionRules validationContext)
value
- the value to be testedvalidationContext
- includes values of validation parameters (as declared using saxon:param)public boolean testListValue(AtomicSequence value)
testListValue
in class Facet
value
- the value to be testedpublic boolean testListValue(AtomicSequence value, ConversionRules rules)
value
- the value to be testedrules
- context information including values of validation parameterspublic void serializeFacet(SchemaModelSerializer serializer) throws XPathException
serializeFacet
in class Facet
serializer
- receives the content for serializationXPathException
- if an error occurs writing the value to the outputpublic Function getFacetAsFunctionItem()
Facet
getFacetAsFunctionItem
in class Facet
Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.