public interface Platform
| Modifier and Type | Method and Description |
|---|---|
boolean |
canReturnCollationKeys(StringCollator collation)
Given a collation, determine whether it is capable of returning collation keys.
|
RegularExpression |
compileRegularExpression(Configuration config,
UnicodeString regex,
java.lang.String flags,
java.lang.String hostLanguage,
java.util.List<java.lang.String> warnings)
Compile a regular expression
|
AtomicMatchKey |
getCollationKey(SimpleCollation namedCollation,
java.lang.String value)
Given a collation, get a collation key.
|
java.lang.String |
getDefaultCountry()
Get the default country for localization.
|
IDynamicLoader |
getDefaultDynamicLoader()
Get the default DynamicLoader for the platform
|
java.lang.String |
getDefaultLanguage()
Get the default language for localization.
|
ExternalObjectType |
getExternalObjectType(Configuration config,
java.lang.String uri,
java.lang.String localName)
Get a SchemaType representing a wrapped external (Java or .NET) object
|
java.lang.String |
getInstallationDirectory(java.lang.String edition,
Configuration config)
Return the name of the directory in which the software is installed (if available)
|
java.lang.String |
getPlatformSuffix()
Get a suffix letter to add to the Saxon version number to identify the platform
|
java.lang.String |
getPlatformVersion()
Get the platform version
|
boolean |
hasICUCollator()
Indicate whether the ICU library is available and supports Collations
|
boolean |
hasICUNumberer()
Indicate whether the ICU library is available and supports Numberers
|
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
|
boolean |
JAXPStaticContextCheck(RetainedStaticContext retainedStaticContext,
StaticContext sc)
Checks if the supplied static context is an instance of the JAXP static context.
|
org.xml.sax.XMLReader |
loadParser()
Get a parser by instantiating the SAXParserFactory
|
org.xml.sax.XMLReader |
loadParserForXmlFragments()
Get an XML parser suitable for use for reading XML fragments.
|
java.io.InputStream |
locateResource(java.lang.String filename,
java.util.List<java.lang.String> messages)
Read a resource file issued with the Saxon product
|
StringCollator |
makeCollation(Configuration config,
java.util.Properties props,
java.lang.String uri)
Obtain a collation with a given set of properties.
|
java.lang.ClassLoader |
makeGeneratedClassLoader(Configuration config,
java.lang.Class<?> thisClass)
Return the class loader required to load the bytecode generated classes
|
ModuleURIResolver |
makeStandardModuleURIResolver(Configuration config)
Make an instance of the default module URI resolver for this platform
|
StringCollator |
makeUcaCollator(java.lang.String uri,
Configuration config)
If available, make a UCA collation.
|
void |
registerAllBuiltInObjectModels(Configuration config)
Register all the external object models that are provided as standard
with the relevant edition of Saxon for this Configuration
|
ActiveSource |
resolveSource(javax.xml.transform.Source source,
Configuration config)
Convert a Source to an ActiveSource.
|
void |
setDefaultSAXParserFactory(Configuration config)
Set the default XML parser to be loaded by the SAXParserFactory on this platform.
|
default void |
showEmbeddedResources()
Diagnostic method to list the embedded resources contained in the loaded software
|
void initialize(Configuration config)
config - the Saxon Configurationboolean isJava()
boolean isDotNet()
java.lang.String getPlatformVersion()
java.lang.String getPlatformSuffix()
IDynamicLoader getDefaultDynamicLoader()
java.lang.String getDefaultLanguage()
java.lang.String getDefaultCountry()
java.io.InputStream locateResource(java.lang.String filename,
java.util.List<java.lang.String> messages)
filename - the filename of the file to be readmessages - List to be populated with messages in the event of failuredefault void showEmbeddedResources()
org.xml.sax.XMLReader loadParser()
org.xml.sax.XMLReader loadParserForXmlFragments()
ActiveSource resolveSource(javax.xml.transform.Source source, Configuration config) throws XPathException
source - A source object, typically the source supplied as the first
argument to Transformer.transform(javax.xml.transform.Source, javax.xml.transform.Result)
or similar methods.config - The Configuration. This provides the SourceResolver with access to
configuration information; it also allows the SourceResolver to invoke the
resolveSource() method on the Configuration object as a fallback implementation.AugmentedSource,
NodeInfo,
or PullSource. Return null if the Source object is not
recognizedXPathException - if the Source object is recognized but cannot be processedStringCollator makeCollation(Configuration config, java.util.Properties props, java.lang.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 ComparatorAtomicMatchKey getCollationKey(SimpleCollation namedCollation, java.lang.String value)
namedCollation - the collation in usevalue - the string whose collation key is requiredjava.lang.ClassCastException - if the collation is not one that is capable of supplying
collation keys (this should have been checked in advance)boolean hasICUCollator()
boolean hasICUNumberer()
StringCollator makeUcaCollator(java.lang.String uri, Configuration config) throws XPathException
uri - the collation URI (which will always be a UCA collation URI as defined in XSLT 3.0)config - the Saxon configurationXPathException - if the URI is malformed in some wayRegularExpression compileRegularExpression(Configuration config, UnicodeString regex, java.lang.String flags, java.lang.String hostLanguage, java.util.List<java.lang.String> warnings) throws XPathException
config - the Saxon configurationregex - the regular expression as a stringflags - the value of the flags attributehostLanguage - one of "XSD10", "XSD11", XP20" or "XP30". Also allow combinations, e.g. "XP20/XSD11".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 invalidExternalObjectType getExternalObjectType(Configuration config, java.lang.String uri, java.lang.String localName)
config - the Saxon Configurationuri - the namespace URI of the schema typelocalName - the local name of the schema typejava.lang.String getInstallationDirectory(java.lang.String edition,
Configuration config)
edition - The edition of the software that is loaded ("HE", "PE", or "EE")config - the Saxon configurationvoid registerAllBuiltInObjectModels(Configuration config)
config - the Saxon configurationvoid setDefaultSAXParserFactory(Configuration config)
config - the Saxon configurationboolean JAXPStaticContextCheck(RetainedStaticContext retainedStaticContext, StaticContext sc)
retainedStaticContext - If the static context is a JAXPStaticContext, then its namespaces
are used to update the retainedStaticContextsc - the possible JAXPStaticContextModuleURIResolver makeStandardModuleURIResolver(Configuration config)
config - the Saxon configurationjava.lang.ClassLoader makeGeneratedClassLoader(Configuration config, java.lang.Class<?> thisClass)
config - The saxon configurationthisClass - The class object generatedCopyright (c) 2004-2022 Saxonica Limited. All rights reserved.