|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.schema.Facet com.saxonica.schema.PreprocessFacet
public class PreprocessFacet
Represents the preprocess facet on a schema-defined simple type. This is a pre-lexical facet defined as a Saxon extension to XML Schema 1.1: it allows an XPath expression to be used to convert the value as written (after whitespace normalization) to a different form, which is then validated using the constraining facets. For example the preprocessing action translate($value, ',', '.') allows the input value 3,14159 to be converted to 3.14159 which then validates as a double.
Constructor Summary | |
---|---|
PreprocessFacet()
|
|
PreprocessFacet(Assertion action,
Assertion reverseAction)
|
Method Summary | |
---|---|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base)
Check that this facet is legal when used on a type derived by restriction |
Assertion |
getAction()
Get the XPath expression representing the action performed by this facet, represented as an Assertion object |
String |
getName()
Returns the name of this Facet |
Assertion |
getReverseAction()
Get the XPath expression representing the reverse action performed by this facet, represented as an Assertion object |
String |
getValue()
Returns the lexical representation of this facet |
boolean |
isConstraining()
Ask whether this is a constraining facet (as distinct from a pre-lexical facet) |
CharSequence |
postprocess(CharSequence input)
Apply the postprocessing defined by this facet |
CharSequence |
preprocess(CharSequence input)
Apply the preprocessing defined by this facet |
void |
serializeFacet(SchemaModelSerializer serializer)
Serialize this facet |
void |
setAction(Assertion action)
Set the XPath expression representing the action performed by this facet, represented as an Assertion object |
void |
setReverseAction(Assertion action)
Set the XPath expression representing the reverse action performed by this facet, represented as an Assertion object |
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet |
Methods inherited from class com.saxonica.schema.Facet |
---|
getMessage, getWhitespaceAction, isFacetName, isFixed, isNewlyIntroduced, makeFacet, setFixed, setMessage, testLength, testListValue, toLong |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PreprocessFacet()
public PreprocessFacet(Assertion action, Assertion reverseAction)
Method Detail |
---|
public boolean isConstraining()
isConstraining
in class Facet
public String getName()
Facet
getName
in class Facet
public String getValue()
getValue
in class Facet
public Assertion getAction()
public Assertion getReverseAction()
public void setAction(Assertion action)
public void setReverseAction(Assertion action)
public void checkFacetRestriction(UserSimpleType type, SimpleType base) throws SchemaException, ValidationException
checkFacetRestriction
in class Facet
base
- the type from which the restricted type is derivedtype
- the type on which the facet is defined
SchemaException
- if the facet is not legal
ValidationException
public CharSequence preprocess(CharSequence input) throws ValidationException
input
- the lexical value, after whitespace normalization, to be converted
ValidationException
public CharSequence postprocess(CharSequence input) throws ValidationException
input
- the lexical value to be converted
ValidationException
public boolean testAtomicValue(AtomicValue value)
testAtomicValue
in class Facet
value
- the value to be tested
public void serializeFacet(SchemaModelSerializer serializer) throws XPathException
Facet
serializeFacet
in class Facet
serializer
- receives the content for serialization
XPathException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |