public class PatternFacet extends Facet
| Constructor and Description |
|---|
PatternFacet(Configuration config)
Create a pattern facet
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBranch(String pat)
Add a branch to a pattern: that is, combine this pattern with another,
so that the resulting pattern is the "or" of the two patterns
|
void |
checkFacetRestriction(UserSimpleType type,
SimpleType base,
SchemaCompiler compiler)
Check that this facet is legal when used on a type derived by restriction
|
void |
compile(List<String> warnings)
Compile the regular expression
|
FunctionItem |
getFacetAsFunctionItem()
Get a function item that represents this Facet schema component.
|
String |
getFlags()
Get the flags for the regular expression
|
String |
getName()
Returns the name of this Facet
|
String |
getValue()
Returns the lexical representation of the value of this facet
|
boolean |
isDoNotMerge() |
void |
setDoNotMerge(boolean dont) |
void |
setFlags(String flags)
Saxon allows flags for the regular expression (e.g.
|
void |
setValue(String value) |
boolean |
testAtomicValue(AtomicValue value)
Test whether an atomic value conforms to this facet
|
getMessage, getWhitespaceAction, isConstraining, isFacetName, isFixed, isNewlyIntroduced, makeFacet, serializeFacet, setFixed, setMessage, testLength, testListValue, toLongpublic PatternFacet(Configuration config)
config - the Saxon configurationpublic String getValue()
Facetpublic void setValue(String value) throws SchemaException
SchemaExceptionpublic void setFlags(String flags)
flags - the regular expression flagspublic String getFlags()
public void compile(List<String> warnings) throws SchemaException
warnings - if non-null, receives any warnings that arise from compiling the regular expressionSchemaException - if the regular expression is invalidpublic void setDoNotMerge(boolean dont)
public boolean isDoNotMerge()
public void addBranch(String pat)
pat - the new branch, which must be a valid regular expressionpublic void checkFacetRestriction(UserSimpleType type, SimpleType base, SchemaCompiler compiler) throws SchemaException
checkFacetRestriction in class Facetbase - the type from which the restricted type is derivedcompiler - the schema compilertype - the type on which the facet is definedSchemaException - if the facet is not legalpublic boolean testAtomicValue(AtomicValue value)
testAtomicValue in class Facetvalue - the value to be testedpublic FunctionItem getFacetAsFunctionItem()
FacetgetFacetAsFunctionItem in class FacetCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.