|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Platform
This interface provides access to methods whose implementation depends on the chosen platform (typically Java or .NET)
Method Summary | |
---|---|
void |
addFunctionLibraries(FunctionLibraryList list,
Configuration config)
Add platform-specific function libraries to the function library list |
boolean |
canReturnCollationKeys(StringCollator 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 |
void |
declareJavaClass(FunctionLibrary library,
String uri,
Class theClass)
Register a namespace-to-Java-class mapping declared using saxon:script in an XSLT stylesheet |
Object |
getCollationKey(NamedCollation namedCollation,
String value)
Given a collation, get a collation key. |
SchemaType |
getExternalObjectType(Configuration config,
String uri,
String localName)
|
Source |
getParserSource(Configuration config,
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 |
URI |
makeAbsolute(String relativeURI,
String base)
Construct an absolute URI from a relative URI and a base URI |
StringCollator |
makeCollation(Configuration config,
Properties props,
String uri)
Obtain a collation with a given set of properties. |
FunctionLibrary |
makeExtensionLibrary(Configuration config)
Make the default extension function factory appropriate to the platform |
Method Detail |
---|
void initialize(Configuration config)
boolean isJava()
boolean isDotNet()
URI makeAbsolute(String relativeURI, String base) throws URISyntaxException
relativeURI
- the relative URI. Null is permitted provided that the base URI is an absolute URIbase
- the base URI
URISyntaxException
String getPlatformVersion()
String getPlatformSuffix()
Source getParserSource(Configuration config, StreamSource input, int validation, boolean dtdValidation, int stripspace)
config
- 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 form
XPathException
- if the syntax of the regular expression or flags is incorrectStringCollator makeCollation(Configuration config, Properties props, String uri) throws XPathException
config
- the configuration objectprops
- the desired properties of the collationuri
-
XPathException
- if a fatal error occursboolean canReturnCollationKeys(StringCollator collation)
collation
- the collation being examined, provided as a Comparator
Object getCollationKey(NamedCollation namedCollation, String value)
ClassCastException
- if the collation is not one that is capable of supplying
collation keys (this should have been checked in advance)FunctionLibrary makeExtensionLibrary(Configuration config)
void addFunctionLibraries(FunctionLibraryList list, Configuration config)
void declareJavaClass(FunctionLibrary library, String uri, Class theClass)
library
- the library to contain the function, which must be a JavaExtensionLibraryuri
- the namespace of the function nametheClass
- the Java class that implements this namespaceSchemaType getExternalObjectType(Configuration config, String uri, String localName)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |