net.sf.saxon.expr
Class CollationMap
java.lang.Object
net.sf.saxon.expr.CollationMap
- Serializable
public class CollationMap
extends java.lang.Object
implements Serializable
This object maps collation URIs to collations. Logically this function is part of the static
context, but it is often needed dynamically, so it is defined as a separate component that can
safely be retained at run-time.
CollationMap
public CollationMap(Configuration config)
Create a collation map
config
- the Saxon configuration
CollationMap
public CollationMap(CollationMap in)
Create a copy of a collation map
in
- the collation map to be copied
getDefaultCollation
public StringCollator getDefaultCollation()
Get the default collation
- the default collation, as a StringCollator
getDefaultCollationName
public String getDefaultCollationName()
Get the name of the default collation
- the default collation name (should be a URI, but this is not enforced)
getNamedCollation
public StringCollator getNamedCollation(String name)
Get the collation with a given collation name. If the collation name has
not been registered in this CollationMap, the CollationURIResolver registered
with the Configuration is called. If this cannot resolve the collation name,
it should return null.
name
- the collation name (should be an absolute URI)
- the StringCollator with this name if known, or null if not known
setDefaultCollationName
public void setDefaultCollationName(String name)
Set the name of the default collation
name
- the default collation name (should be a URI, but this is not enforced)
setNamedCollation
public void setNamedCollation(String absoluteURI,
StringCollator collator)
Register a named collation
absoluteURI
- the name of the collation. This should be an absolute URI, but
this is not enforcedcollator
- the StringCollator that implements the collating rules