Implementation of the Platform interface containing methods appropriate to the .NET platform
canReturnCollationKeys
public boolean canReturnCollationKeys(StringCollator collation)
Given a collation, determine whether it is capable of returning collation keys.
The essential property of collation keys
is that if two values are equal under the collation, then the collation keys are
equal under the equals() method.
- canReturnCollationKeys in interface Platform
collation
- the collation, provided as a Comparator
- true if this collation can supply collation keys
compileRegularExpression
public RegularExpression compileRegularExpression(CharSequence regex,
int xmlVersion,
int syntax,
CharSequence flags)
throws XPathException
Create a compiled regular expression
- 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
dynamicLoad
public cli.System.Type dynamicLoad(String uri,
String baseURI,
boolean debug)
throws XPathException
Dynamically load a .NET class with a given name, starting with a URI that contains information
about the type and the assembly
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:
- asm - the name of the assembly
- ver - the version of the assembly
- loc - the culture
- sn - the strong name
- from - the location to load from
- partialname - the partial name of the assembly
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
- the successfully loaded Type
getCollationKey
public Object getCollationKey(NamedCollation namedCollation,
String value)
Given a collation, get a collation key. The essential property of collation keys
is that if two values are equal under the collation, then the collation keys are
equal under the equals() method.
- getCollationKey in interface Platform
getInstance
public static DotNetPlatform getInstance()
Get the singular instance of this class
- the singular DotNetPlatform
getParserSource
public 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
- 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
- the PullSource or SAXSource, initialized with a suitable parser, or the original
input Source, if now special handling is required or possible. This implementation
always returns either a PullSource or the original StreamSource.
getPlatformSuffix
public String getPlatformSuffix()
Get a suffix letter to add to the Saxon version number to identify the platform
- getPlatformSuffix in interface Platform
getSaxonSaFullyQualifiedClassName
public static String getSaxonSaFullyQualifiedClassName()
Get the fully qualified class name of the Saxon-SA Configuration class
- the fully-qualified class name
isDotNet
public boolean isDotNet()
Return true if this is the .NET platform
- isDotNet in interface Platform
isJava
public boolean isJava()
Return true if this is the Java platform
- isJava in interface Platform
makeAbsolute
public URI makeAbsolute(String relativeURI,
String base)
throws URISyntaxException
Construct an absolute URI from a relative URI and a base URI
- makeAbsolute in interface Platform
relativeURI
- the relative URIbase
- the base URI
makeCollation
public StringCollator makeCollation(Configuration config,
Properties props,
String uri)
throws XPathException
Obtain a collation with a given set of properties. The set of properties is extensible
and variable across platforms. Common properties with example values include lang=ed-GB,
strength=primary, case-order=upper-first, ignore-modifiers=yes, alphanumeric=yes.
Properties that are not supported are generally ignored; however some errors, such as
failing to load a requested class, are fatal.
- makeCollation in interface Platform
config
- the configuration objectprops
- the desired properties of the collationuri
- the collation URI
- a collation with these properties