public interface Platform extends Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
canReturnCollationKeys(Comparator collation)
Given a collation, determine whether it is capable of returning collation keys.
|
RegularExpression |
compileRegularExpression(CharSequence regex,
boolean isXPath,
CharSequence flags)
Create a compiled regular expression
|
Object |
getCollationKey(Comparator collation,
String value)
Given a collation, get a collation key.
|
Source |
getParserSource(StreamSource input,
int validation,
boolean dtdValidation,
int stripspace)
Convert a StreamSource to either a SAXSource or a PullSource, depending on the native
parser of the selected platform
|
String |
getPlatformSuffix()
Get a suffix letter to add to the Saxon version number to identify the platform
|
String |
getPlatformVersion()
Get the platform version
|
void |
initialize(Configuration config)
Perform platform-specific initialization of the configuration
|
URI |
makeAbsolute(String relativeURI,
String base)
Construct an absolute URI from a relative URI and a base URI
|
Comparator |
makeCollation(Configuration config,
Properties props)
Obtain a collation with a given set of properties.
|
void initialize(Configuration config)
URI makeAbsolute(String relativeURI, String base) throws URISyntaxException
relativeURI
- the relative URIbase
- the base URIURISyntaxException
String getPlatformVersion()
String getPlatformSuffix()
Source getParserSource(StreamSource input, int validation, boolean dtdValidation, int stripspace)
input
- the supplied StreamSourcevalidation
- dtdValidation
- stripspace
- RegularExpression compileRegularExpression(CharSequence regex, boolean isXPath, CharSequence flags) throws XPathException
regex
- the source text of the regular expression, in XML Schema or XPath syntaxisXPath
- set to true if this is an XPath regular expression, false if it is XML Schemaflags
- the flags argument as supplied to functions such as fn:matches(), in string formXPathException
- if the syntax of the regular expression or flags is incorrectComparator makeCollation(Configuration config, Properties props) throws XPathException
config
- the configuration objectprops
- the desired properties of the collationXPathException
- if a fatal error occursboolean canReturnCollationKeys(Comparator collation)
collation
- the collation being examined, provided as a ComparatorObject getCollationKey(Comparator collation, String value)
ClassCastException
- if the collation is not one that is capable of supplying
collation keys (this should have been checked in advance)