|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.dotnet.DotNetPlatform
public class DotNetPlatform
Implementation of the Platform interface containing methods appropriate to the .NET platform
Method Summary | |
---|---|
void |
addFunctionLibraries(FunctionLibraryList list,
Configuration config)
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 |
cli.System.Type |
dynamicLoad(java.lang.String uri,
java.lang.String baseURI,
boolean debug)
Dynamically load a .NET class with a given name, starting with a URI that contains information about the type and the assembly |
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 |
static DotNetPlatform |
getInstance()
Get the singular instance of this class |
javax.xml.transform.Source |
getParserSource(Configuration config,
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 |
static java.lang.String |
getSaxonSaFullyQualifiedClassName()
Get the fully qualified class name of the Saxon-SA Configuration class |
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 factory appropriate to the platform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static DotNetPlatform getInstance()
public static java.lang.String getSaxonSaFullyQualifiedClassName()
public void initialize(Configuration config)
initialize
in interface Platform
config
- the Saxon Configurationpublic boolean isJava()
isJava
in interface Platform
public boolean isDotNet()
isDotNet
in interface Platform
public java.net.URI makeAbsolute(java.lang.String relativeURI, java.lang.String base) throws java.net.URISyntaxException
makeAbsolute
in interface Platform
relativeURI
- the relative URIbase
- the base URI
java.net.URISyntaxException
public java.lang.String getPlatformVersion()
getPlatformVersion
in interface Platform
public java.lang.String getPlatformSuffix()
getPlatformSuffix
in interface Platform
public javax.xml.transform.Source getParserSource(Configuration config, javax.xml.transform.stream.StreamSource input, int validation, boolean dtdValidation, int stripspace)
getParserSource
in interface Platform
config
- the Saxon configurationinput
- the supplied StreamSourcevalidation
- indicates whether schema validation is required, adn in what modedtdValidation
- true if DTD validation is requiredstripspace
- defines the requird whitespace handling
public RegularExpression compileRegularExpression(java.lang.CharSequence regex, int xmlVersion, int syntax, java.lang.CharSequence flags) throws XPathException
compileRegularExpression
in interface Platform
regex
- the source text of the regular expression, in XML Schema or XPath syntaxxmlVersion
- One of Configuration.XML10
or Configuration.XML11
syntax
- one of XPath, XMLSchema, or native, indicating the regular expression syntax usedflags
- 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
public StringCollator makeCollation(Configuration config, java.util.Properties props, java.lang.String uri) throws XPathException
makeCollation
in interface Platform
config
- the configuration objectprops
- the desired properties of the collationuri
- the collation URI
XPathException
- if a fatal error occurspublic boolean canReturnCollationKeys(StringCollator collation)
canReturnCollationKeys
in interface Platform
collation
- the collation, provided as a Comparator
public java.lang.Object getCollationKey(NamedCollation namedCollation, java.lang.String value)
getCollationKey
in interface Platform
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)public void makeExtensionLibrary(Configuration config)
makeExtensionLibrary
in interface Platform
config
- the Saxon Configurationpublic void addFunctionLibraries(FunctionLibraryList list, Configuration config)
Configuration.setExtensionBinder(String, net.sf.saxon.functions.FunctionLibrary)
addFunctionLibraries
in interface Platform
list
- the function library list that is to be extendedconfig
- the Configurationpublic void declareJavaClass(FunctionLibrary library, java.lang.String uri, java.lang.Class theClass)
Platform
declareJavaClass
in interface Platform
library
- the library to contain the function, which must be a JavaExtensionLibraryuri
- the namespace of the function nametheClass
- the Java class that implements this namespacepublic cli.System.Type dynamicLoad(java.lang.String uri, java.lang.String baseURI, boolean debug) throws XPathException
uri
- A URI in the form
clitype:Full.Type.Name?param=value;
Query parameters in the URL may be separated by semicolons or ampersands. The recognized parameters are:
baseURI
- base URI of the expression containing an extension function call (null if not known). This
is used to resolve any relative URI appearing in the "from" parameter of the query part of the namespace URIdebug
- true if diagnostic tracing is enabled @return the cli.System.Type object representing the
dynamically loaded class
XPathException
public SchemaType getExternalObjectType(Configuration config, java.lang.String uri, java.lang.String localName)
Platform
getExternalObjectType
in interface Platform
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 |