|
|||||||
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,
int hostLanguage)
Add the platform-specific function libraries to a function library list. |
boolean |
canReturnCollationKeys(StringCollator collation)
Given a collation, determine whether it is capable of returning collation keys. |
RegularExpression |
compileRegularExpression(java.lang.CharSequence regex,
int xmlVersion,
int syntax,
java.lang.CharSequence flags)
Create a compiled regular expression |
void |
declareJavaClass(FunctionLibrary library,
java.lang.String uri,
java.lang.Class theClass)
Register a namespace-to-Java-class mapping declared using saxon:script in an XSLT stylesheet |
java.lang.Object |
getCollationKey(NamedCollation namedCollation,
java.lang.String value)
Given a collation, get a collation key. |
SchemaType |
getExternalObjectType(Configuration config,
java.lang.String uri,
java.lang.String localName)
Get a SchemaType representing a wrapped external (Java or .NET) object |
javax.xml.transform.Source |
getParserSource(PipelineConfiguration pipe,
javax.xml.transform.stream.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 |
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 |
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 |
java.net.URI |
makeAbsolute(java.lang.String relativeURI,
java.lang.String base)
Construct an absolute URI from a relative URI and a base URI |
StringCollator |
makeCollation(Configuration config,
java.util.Properties props,
java.lang.String uri)
Obtain a collation with a given set of properties. |
void |
makeExtensionLibrary(Configuration config)
Make the default extension function library (or libraries) appropriate to the platform, and register them with the Configuration. |
Method Detail |
---|
void initialize(Configuration config)
config
- the Saxon Configurationboolean isJava()
boolean isDotNet()
java.net.URI makeAbsolute(java.lang.String relativeURI, java.lang.String base) throws java.net.URISyntaxException
relativeURI
- the relative URI. Null is permitted provided that the base URI is an absolute URIbase
- the base URI
java.net.URISyntaxException
java.lang.String getPlatformVersion()
java.lang.String getPlatformSuffix()
javax.xml.transform.Source getParserSource(PipelineConfiguration pipe, javax.xml.transform.stream.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)
RegularExpression compileRegularExpression(java.lang.CharSequence regex, int xmlVersion, int syntax, java.lang.CharSequence flags) throws XPathException
regex
- the source text of the regular expression, in XML Schema or XPath syntaxxmlVersion
- version of XML in use (1.0 or 1.1)syntax
- flags
- the flags argument as supplied to functions such as fn:matches(), in string form @throws XPathException if the syntax of the regular expression or flags is incorrect @return the compiled regular expression
XPathException
StringCollator 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 URI
XPathException
- if a fatal error occursboolean canReturnCollationKeys(StringCollator collation)
collation
- the collation being examined, provided as a Comparator
java.lang.Object getCollationKey(NamedCollation namedCollation, java.lang.String value)
namedCollation
- the collation in usevalue
- the string whose collation key is required
java.lang.ClassCastException
- if the collation is not one that is capable of supplying
collation keys (this should have been checked in advance)void makeExtensionLibrary(Configuration config)
config
- the Saxon Configurationvoid addFunctionLibraries(FunctionLibraryList list, Configuration config, int hostLanguage)
Configuration.setExtensionBinder(String, net.sf.saxon.functions.FunctionLibrary)
list
- the function library list that is to be extendedconfig
- the ConfigurationhostLanguage
- the host language (XSLT, XPath, XQuery)void declareJavaClass(FunctionLibrary library, java.lang.String uri, java.lang.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, 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 type
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |