public final class UpConversionUtilities extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
UPCONVERSION_OPTIONS_XML_LOCAL_NAME
Local name of XML container element when writing out options using
appendUpConversionOptionsElement(Document, Element, UpConversionOptions, boolean) |
| Constructor and Description |
|---|
UpConversionUtilities() |
| Modifier and Type | Method and Description |
|---|---|
static void |
appendUpConversionOptionsElement(Document document,
Element containerElement,
UpConversionOptions options,
boolean applyDefaults)
Writes out the given
UpConversionOptions Object as a child Element of the
given element, using a simple ad-hoc XML format. |
static UpConversionFailure |
extractUpConversionFailure(Element sFailElement)
Populates and returns an
UpConversionFailure for the given Element,
which is assumed to be a s:fail element having the appropriate structure. |
static List<UpConversionFailure> |
extractUpConversionFailures(Document upConvertedDocument)
Searches the given DOM
Document for all s:fail elements contained therein. |
static List<UpConversionFailure> |
extractUpConversionFailures(Element startSearchElement)
Searches the given DOM
Element and all its descendents for all s:fail elements
contained therein. |
static List<UpConversionFailure> |
extractUpConversionFailures(UnwrappedParallelMathMLDOM unwrappedDocument)
Extracts all of the
s:fail elements within the given UnwrappedParallelMathMLDOM |
static String |
getErrorMessage(String upConversionErrorCodeAsString,
Object... arguments)
Returns a full error message for the given
UpConversionErrorCode String and arguments,
using the SnuggleTeX MessageFormatter class to do the hard work. |
static String |
getErrorMessage(UpConversionFailure failure)
Returns a full error message for the given
UpConversionFailure, using
the SnuggleTeX MessageFormatter class to do the hard work. |
static boolean |
isUpConversionFailureElement(Node node)
Checks to see whether the given DOM Node is an
s:fail element. |
public static final String UPCONVERSION_OPTIONS_XML_LOCAL_NAME
appendUpConversionOptionsElement(Document, Element, UpConversionOptions, boolean)public static String getErrorMessage(UpConversionFailure failure)
UpConversionFailure, using
the SnuggleTeX MessageFormatter class to do the hard work.failure - public static String getErrorMessage(String upConversionErrorCodeAsString, Object... arguments)
UpConversionErrorCode String and arguments,
using the SnuggleTeX MessageFormatter class to do the hard work.public static UpConversionFailure extractUpConversionFailure(Element sFailElement)
UpConversionFailure for the given Element,
which is assumed to be a s:fail element having the appropriate structure.sFailElement - public static List<UpConversionFailure> extractUpConversionFailures(UnwrappedParallelMathMLDOM unwrappedDocument)
s:fail elements within the given UnwrappedParallelMathMLDOMpublic static List<UpConversionFailure> extractUpConversionFailures(Document upConvertedDocument)
Document for all s:fail elements contained therein.public static List<UpConversionFailure> extractUpConversionFailures(Element startSearchElement)
Element and all its descendents for all s:fail elements
contained therein.public static boolean isUpConversionFailureElement(Node node)
s:fail element.public static void appendUpConversionOptionsElement(Document document, Element containerElement, UpConversionOptions options, boolean applyDefaults)
UpConversionOptions Object as a child Element of the
given element, using a simple ad-hoc XML format.
This is used internally to pass Java-specified options to the stylesheets that perform the up-conversion process and may be useful in other situations as well.
document - Document to append tocontainerElement - Element that will be the parent of the resulting DOM fragmentoptions - UpConversionOptions to write, may be null.applyDefaults - if true, then default values for each option are written out
when not explicitly specified or if UpConversionOptions is null.Copyright © 2008–2026 The University of Edinburgh. All rights reserved.