public class NamespaceUtil extends Object
| Constructor and Description |
|---|
NamespaceUtil() |
| Modifier and Type | Method and Description |
|---|---|
String |
generatePrefix(String namespace)
Generates a candidate prefix for the specified namespace.
|
Map<String,String> |
getNamespace2PrefixMap() |
String |
getPrefix(String namespace)
Gets a prefix for the given namespace.
|
static boolean |
isNCNameChar(char ch)
Deprecated.
|
static boolean |
isNCNameStartChar(char ch)
Deprecated.
|
void |
setPrefix(String namespace,
String prefix)
Sets the prefix for the specified namespace.
|
String[] |
split(String s)
Deprecated.
|
String[] |
split(String s,
String[] result)
Deprecated.
|
@Deprecated public static boolean isNCNameChar(char ch)
XMLUtils.isNCNameChar(int)@Deprecated public static boolean isNCNameStartChar(char ch)
XMLUtils.isNCNameStartChar(int)@Deprecated public String[] split(String s, String[] result)
XMLUtils.getNCNamePrefix(CharSequence)s - The string to be split.result - May be null. If not null the method will
fill the array with the result and return the passed in array. This allows a
String array to be reused. If this parameter is null then a new
String array will be created to hold the result. The size of the array
must be 2 @Deprecated public String[] split(String s)
XMLUtils.getNCNamePrefix(CharSequence)public String getPrefix(String namespace)
namespace - The namespace whose prefix is to be
retrieved.public String generatePrefix(String namespace)
namespace - The namespace that a prefix should be generated
for. The implementation attempts to generate a prefix based on
the namespace. If it cannot do this, a prefix of the form pn
is generated, where n is an integer.Copyright © 2013 The University of Manchester. All Rights Reserved.