public interface Platform extends Serializable
Modifier and Type | Method and Description |
---|---|
boolean |
canReturnCollationKeys(StringCollator collation)
Given a collation, determine whether it is capable of returning collation keys.
|
RegularExpression |
compileRegularExpression(CharSequence regex,
String flags,
String hostLanguage,
List<String> warnings)
Compile a regular expression
|
ClassLoader |
getClassLoaderForGeneratedClass(String definedClassName,
byte[] classFile,
Configuration config,
Class thisClass)
Return the class loader required to load the bytecode generated classes
|
Object |
getCollationKey(SimpleCollation namedCollation,
String value)
Given a collation, get a collation key.
|
SchemaType |
getExternalObjectType(Configuration config,
String uri,
String localName)
Get a SchemaType representing a wrapped external (Java or .NET) object
|
String |
getInstallationDirectory(String edition,
Configuration config)
Return the name of the directory in which the software is installed (if available)
|
Source |
getParserSource(PipelineConfiguration pipe,
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
|
boolean |
isDotNet()
Return true if this is the .NET platform
|
boolean |
isJava()
Return true if this is the Java platform
|
XMLReader |
loadParser()
Get a parser by instantiating the SAXParserFactory
|
StringCollator |
makeCollation(Configuration config,
Properties props,
String uri)
Obtain a collation with a given set of properties.
|
void |
registerAllBuiltInObjectModels(Configuration config)
Register all the external object models that are provided as standard
with the relevant edition of Saxon for this Configuration
|
void |
setDefaultSAXParserFactory()
Set the default XML parser to be loaded by the SAXParserFactory on this platform.
|
void initialize(Configuration config)
config
- the Saxon Configurationboolean isJava()
boolean isDotNet()
String getPlatformVersion()
String getPlatformSuffix()
XMLReader loadParser()
Source getParserSource(PipelineConfiguration pipe, StreamSource input, int validation, boolean dtdValidation, int stripspace)
pipe
- the pipeline Configurationinput
- the supplied StreamSourcevalidation
- required validation mode, for example Validation.STRICTdtdValidation
- true if DTD-based input validation is requiredstripspace
- option for whitespace-stripping (ALL, NONE, or IGNORABLE)StringCollator makeCollation(Configuration config, Properties props, String uri) throws XPathException
config
- the configuration objectprops
- the desired properties of the collationuri
- the collation URIXPathException
- if a fatal error occursboolean canReturnCollationKeys(StringCollator collation)
collation
- the collation being examined, provided as a ComparatorObject getCollationKey(SimpleCollation namedCollation, String value)
namedCollation
- the collation in usevalue
- the string whose collation key is requiredClassCastException
- if the collation is not one that is capable of supplying
collation keys (this should have been checked in advance)RegularExpression compileRegularExpression(CharSequence regex, String flags, String hostLanguage, List<String> warnings) throws XPathException
regex
- the regular expression as a stringflags
- the value of the flags attributehostLanguage
- one of "XSD", XP20" or "XP30"warnings
- if non-null, any warnings from the regular expression compiler will be added to this list.
If null, the warnings are ignored.XPathException
- if the regular expression or the flags are invalidSchemaType getExternalObjectType(Configuration config, String uri, String localName)
config
- the Saxon Configurationuri
- the namespace URI of the schema typelocalName
- the local name of the schema typeString getInstallationDirectory(String edition, Configuration config)
edition
- The edition of the software that is loaded ("HE", "PE", or "EE")config
- the Saxon configurationvoid registerAllBuiltInObjectModels(Configuration config)
void setDefaultSAXParserFactory()
ClassLoader getClassLoaderForGeneratedClass(String definedClassName, byte[] classFile, Configuration config, Class thisClass)
definedClassName
- The generated class nameclassFile
- The bytecode of the generated classconfig
- The cThe saxon configurationthisClass
- The class object generatedCopyright (c) 2004-2013 Saxonica Limited. All rights reserved.