|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.novell.xsl.util.Util
This class consists exclusively of static utility methods.
Field Summary | |
static String |
SPACE_DEFAULT
One of the valid values for the xml:space attribute. |
static String |
SPACE_PRESERVE
One of the valid values for the xml:space attribute. |
Method Summary | |
static double |
getWildcardNamePriority(WildcardName name)
Convenience function to return the default priority for a WildcardName. |
static String |
getXSLStringValue(List nodeList)
Returns the XSL-defined string value for the specified node list. |
static String |
getXSLStringValue(Node node)
Returns the XSL-defined string value for the specified node. |
static void |
indent(PrintWriter writer,
int tabs)
Output specified number of tabs. |
static Locale |
parseLang(String lang)
Parses the value of the specified xml:lang value and
returns a corresponding java.util.Locale object.
|
static boolean |
stripWhitespaceNode(Node node)
Evaluate a stylesheet node to see if it should be stripped according to the XSL whitespace stripping rules |
static String |
unicodeEscape(char ch)
Returns the specified character as a Java-style Unicode escape of the form "\\u XXXX" . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String SPACE_DEFAULT
xml:space
attribute.
public static final String SPACE_PRESERVE
xml:space
attribute.
Method Detail |
public static String getXSLStringValue(Node node)
node
- the node whose string value is to be returned
public static String getXSLStringValue(List nodeList)
nodeList
- the node list whose string value is to be returned
public static Locale parseLang(String lang) throws IllegalArgumentException
xml:lang
value and
returns a corresponding java.util.Locale
object.
Currently this method supports the two-letter language codes defined by
ISO-639 and the two-letter country codes defined by ISO-3166, since that
is what the javadocs for java.util.Locale
say it supports.
This method does not yet support the IANA-defined and user-defined codes
allowed in XML 1.0.
lang
- the xml:lang
value to be parsed;
null
causes the current default locale to be
returned
IllegalArgumentException
- if the passed language string is invalidpublic static String unicodeEscape(char ch)
"\\u
XXXX"
.
ch
- the character to escape
public static boolean stripWhitespaceNode(Node node)
node
- the DOM node to evaluate
public static double getWildcardNamePriority(WildcardName name)
name
- The WildcardName to examine.
public static void indent(PrintWriter writer, int tabs)
writer
- PrintWriter to output to.tabs
- Number of tabs to output.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |