Top Description Inners Fields Constructors Methods
uk.ac.ed.ph.snuggletex

public Class WebPageOutputOptions

extends XMLStringOutputOptions
Class Inheritance
Annotations
@SuppressWarnings:javadoc
Imports
uk.ac.ed.ph.snuggletex.definitions.W3CConstants, uk.ac.ed.ph.snuggletex.internal.util.ConstraintUtilities, javax.xml.transform.Transformer

Builds on XMLStringOutputOptions to add in options for configuring how to build a web page using the relevant methods in SnuggleSession (e.g. SnuggleSession#buildWebPage(WebPageOutputOptions)).

As of SnuggleTeX 1.3, you will generally want to use the various static methods in WebPageOutputOptionsBuilder to create instances of this class that you can tweak slightly.

The older WebPageOutputOptionsTemplates is now deprecated and will be removed in SnuggleTeX 1.4.

Author
David McKain
Version
$Revision$
See Also
DOMOutputOptions, XMLStringOutputOptions, WebPageOutputOptionsBuilder, WebPageOutputOptionsTemplates

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
WebPageOutputOptions.WebPageType

Deprecated Use WebPageOutputOptionsBuilder to generate different types of web pages.
Enumerates the different web page "types" supported.

Field Summary

Modifier and TypeField and Description
private boolean
addingMathPlayerImport

Indicates whether to include the necessary processing instruction and object element required to explicitly trigger the MathPlayer plugin.

private boolean
addingTitleHeading

Indicates whether page title should be inserted at the start of the web page body as an XHTML h1 element.

private String[]
clientSideXSLTStylesheetURLs

Array of relative URLs specifying client-side XSLT stylesheets to be specified in the resulting page.

private String
contentType

MIME type for the resulting page.

private String[]
cssStylesheetURLs

Array of relative URLs specifying client-side CSS stylesheets to be specified in the resulting page.

private String
customMathJaxUrl

Specifies a custom MathJax URL to use when invoking MathJax.

public static final String
DEFAULT_CONTENT_TYPE

Default content type

public static final String
DEFAULT_LANG

Default language

private boolean
html5

Determines whether to generate HTML (or XHTML 5) output, which uses a "charset" meta attribute and a different DOCTYPE declaration.

private boolean
includingStyleElement

Set to include SnuggleTeX-related CSS as a style element within the resulting page.

private String
lang

Language code for the resulting page.

private boolean
mathJax

Determines whether to add the required JavaScript to invoke MathJax to render the resulting web page.

private String
mathPrefRenderer

Value of the optional pref:renderer attribute (in the W3CConstants#MATHML_PREF_NAMESPACE) that can be added to the HTML root element to control certain aspects of the client-side

private boolean
noCharsetInContentTypeHeader

Determines whether to omit character set details in the Content-Type HTTP header when streaming web pages.

private Transformer[]
stylesheets

Optional JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised.

private String
title

Title for the resulting page.

private WebPageOutputOptions.WebPageType
webPageType

Deprecated As of SnuggleTeX 1.3.0, this property no longer controls anything. This will be removed in SnuggleTeX 1.4
Desired "type" of web page to be constructed.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addClientSideXSLTStylesheetURLs(String...
array of URLs to append, which may be empty.
clientSideXSLTStylesheetURLs
)

Appends to existing array of relative URLs specifying client-side XSLT stylesheets to be referenced in the resulting page.

public void
addCSSStylesheetURLs(String...
array of CSS stylesheet URLs to add, which may be empty
cssStylesheetURLs
)

Appends to existing array of relative URLs specifying client-side CSS stylesheets to be referenced in the resulting page.

public void
addStylesheets(Transformer...
array of additional XSLT stylesheets to apply, which may be null. They are applied in the order specified.
stylesheets
)

Appends to existing array of JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised.

public String[]
getClientSideXSLTStylesheetURLs()

Returns specified array of relative URLs specifying client-side XSLT stylesheets to be referenced in the resulting page.

public String
getContentType()

Returns the MIME type for the resulting page.

public String[]
getCSSStylesheetURLs()

Returns specified array of relative URLs specifying client-side CSS stylesheets to be referenced in the resulting page.

public String
public String
getLang()

Returns the language of the resulting page, null if not set.

public String
getMathPrefRenderer()

Gets the value of the optional pref:renderer attribute (in the W3CConstants#MATHML_PREF_NAMESPACE) that can be added to the HTML root element to control certain aspects of the client-side Universal StyleSheets for MathML

The default is null, indicating that no attribute will be added

public Transformer[]
getStylesheets()

Returns an array of specified JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised.

public String
getTitle()

Returns the title for the resulting page, null if not set.

public WebPageOutputOptions.WebPageType
getWebPageType()
Deprecated Use various methods in WebPageOutputOptionsBuilder to generate suitable options for various types of pages, which you can then tweak.

Before SnuggleTeX 1.3.0, this returned the desired "type" of web page to be constructed.

public boolean

Returns:

true if adding MathPlayer import gubbins, false otherwise.
isAddingMathPlayerImport
()

Returns whether to include the necessary processing instruction and object element required to explicitly trigger the MathPlayer plugin.

public boolean
isAddingTitleHeading()

Returns whether page title should be inserted at the start of the web page body as an XHTML h1 element.

public boolean
public boolean
isIncludingStyleElement()

Returns whether to include SnuggleTeX-related CSS as a style element within the resulting page.

public boolean
public boolean
public void
setAddingMathPlayerImport(boolean
true to add gubbins for importing MathPlayer, false otherwise.
addingMathPlayerImport
)

Sets whether to include the necessary processing instruction and object element required to explicitly trigger the MathPlayer plugin.

public void
setAddingTitleHeading(boolean
true to add a title header if a title has been set, false otherwise.
addingTitleHeading
)

Sets whether page title should be inserted at the start of the web page body as an XHTML h1 element.

public void
setClientSideXSLTStylesheetURLs(String...
array of URLs to use, which may be empty.
clientSideXSLTStylesheetURLs
)

Sets an array of relative URLs specifying client-side XSLT stylesheets to be referenced in the resulting page.

public void
setContentType(String
desired contentType, which must not be null.
contentType
)

Sets the MIME type for the resulting page.

public void
setCSSStylesheetURLs(String...
array of CSS stylesheet URLs, which may be empty
cssStylesheetURLs
)

Specifies an array of relative URLs specifying client-side CSS stylesheets to be referenced in the resulting page.

public void
public void
setHtml5(boolean html5)

public void
setIncludingStyleElement(boolean
set to true to include a style element, false otherwise.
includingStyleElement
)

Sets whether to include SnuggleTeX-related CSS as a style element within the resulting page.

public void
setLang(String
desired language, which may be null.
lang
)

Sets the language of the resulting page.

public void
setMathJax(boolean mathJax)

public void
setMathPrefRenderer(String mathPrefRenderer)

Sets the value of the optional pref:renderer attribute (in the W3CConstants#MATHML_PREF_NAMESPACE) that can be added to the HTML root element to control certain aspects of the client-side Universal StyleSheets for MathML

A null value is allowed, which prevents such an attribute being added.

public void
setNoCharsetInContentTypeHeader(boolean noCharsetInContentTypeHeader)

public void
setStylesheets(Transformer...
array of XSLT stylesheets to apply, which may be null. They are applied in the order specified.
stylesheets
)

Sets an array of JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised.

public void
setTitle(String
title for the required page, which may be null to indicate that no title should be included.
title
)

Sets the title for the resulting page.

public void
setWebPageType(WebPageOutputOptions.WebPageType webPageType)
Deprecated Use various methods in WebPageOutputOptionsBuilder to generate suitable options for various types of pages, which you can then tweak.

Before SnuggleTeX 1.3.0, this returned the desired "type" of web page to be constructed.

Inherited from uk.ac.ed.ph.snuggletex.XMLStringOutputOptions:
getDoctypePublicgetDoctypeSystemgetEncodinggetIndentgetSerializationMethodisIncludingXMLDeclarationisIndentingisUsingNamedEntitiessetDoctypePublicsetDoctypeSystemsetEncodingsetIncludingXMLDeclarationsetIndentsetIndentingsetSerializationMethodsetUsingNamedEntities

Field Detail

addingMathPlayerImportback to summary
private boolean addingMathPlayerImport

Indicates whether to include the necessary processing instruction and object element required to explicitly trigger the MathPlayer plugin.

The default is false.

Since
1.3.0
addingTitleHeadingback to summary
private boolean addingTitleHeading

Indicates whether page title should be inserted at the start of the web page body as an XHTML h1 element. This has no effect if title is null.

Default is false.

clientSideXSLTStylesheetURLsback to summary
private String[] clientSideXSLTStylesheetURLs

Array of relative URLs specifying client-side XSLT stylesheets to be specified in the resulting page.

The URLs are used as-is; the caller should have ensured they make sense in advance!

This is ignored for WebPageType#MATHPLAYER_HTML. Also, if nothing is set here for a WebPageType#CLIENT_SIDE_XSLT_STYLESHEET then WebPageType#MOZILLA will be used as a template instead.

contentTypeback to summary
private String contentType

MIME type for the resulting page.

Default is DEFAULT_CONTENT_TYPE.

This must not be null.

cssStylesheetURLsback to summary
private String[] cssStylesheetURLs

Array of relative URLs specifying client-side CSS stylesheets to be specified in the resulting page.

The URLs are used as-is; the caller should have ensured they make sense in advance!

The caller can use this to specify the location of snuggletex.css, as well as any other required stylesheets.

customMathJaxUrlback to summary
private String customMathJaxUrl

Specifies a custom MathJax URL to use when invoking MathJax. Use this if you want to use a local installation of MathJax, or want to specify custom configuration directives. See the MathJax Getting Started documentation for more details.

The default is null, which will use the MathJax CDN with a reasonable default configuration if isMathJax() returns true.

Since
1.3.0
DEFAULT_CONTENT_TYPEback to summary
public static final String DEFAULT_CONTENT_TYPE

Default content type

DEFAULT_LANGback to summary
public static final String DEFAULT_LANG

Default language

html5back to summary
private boolean html5

Determines whether to generate HTML (or XHTML 5) output, which uses a "charset" meta attribute and a different DOCTYPE declaration.

Note that if set to true, then this will override whatever is returned by getDoctypePublic() and getDoctypeSystem().

The default is false.

Since
1.3.0
includingStyleElementback to summary
private boolean includingStyleElement

Set to include SnuggleTeX-related CSS as a style element within the resulting page. If you choose not to do this, you probably want to put snuggletex.css somewhere accessible and pass its location in clientSideXSLTStylesheetURLs.

Default is true, as that's the simplest way of getting up to speed quickly.

langback to summary
private String lang

Language code for the resulting page.

Default is DEFAULT_LANG.

This may be set to null

mathJaxback to summary
private boolean mathJax

Determines whether to add the required JavaScript to invoke MathJax to render the resulting web page.

The default is false.

Since
1.3.0
mathPrefRendererback to summary
private String mathPrefRenderer

Value of the optional pref:renderer attribute (in the W3CConstants#MATHML_PREF_NAMESPACE) that can be added to the HTML root element to control certain aspects of the client-side The default is null, indicating that no attribute will be added

Since
1.3.0
noCharsetInContentTypeHeaderback to summary
private boolean noCharsetInContentTypeHeader

Determines whether to omit character set details in the Content-Type HTTP header when streaming web pages.

MathPlayer can only handle application/xhtml+xml without a "charset" clause, so this should be used in those cases.

Since
1.3.0
stylesheetsback to summary
private Transformer[] stylesheets

Optional JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised. This can be useful if you want to add in headers and footers to the resulting XHTML web page.

Remember that the XHTML is all in its correct namespace so you will need to write your stylesheet appropriately. Ensure that any further XHTML you generate is also in the correct namespace; it will later be converted to no-namespace HTML if required by the serialisation process.

Note

Source documents may contain Processing Instructions (e.g. to invoke MathPlayer) so these must be handled as appropriate.

If null or empty, then no stylesheet is applied.

titleback to summary
private String title

Title for the resulting page. Default is null. If null, then a boilerplate title is added.

webPageTypeback to summary
private WebPageOutputOptions.WebPageType webPageType

Deprecated

As of SnuggleTeX 1.3.0, this property no longer controls anything. This will be removed in SnuggleTeX 1.4

Desired "type" of web page to be constructed.

Annotations
@SuppressWarnings:unused
@Deprecated
See Also
WebPageOutputOptionsBuilder

Constructor Detail

WebPageOutputOptionsback to summary
public WebPageOutputOptions()

Method Detail

addClientSideXSLTStylesheetURLsback to summary
public void addClientSideXSLTStylesheetURLs(String... clientSideXSLTStylesheetURLs)

Appends to existing array of relative URLs specifying client-side XSLT stylesheets to be referenced in the resulting page.

The URLs are used as-is; the caller should have ensured they make sense in advance!

This is ignored for WebPageType#MATHPLAYER_HTML. Also, if nothing is set here for a WebPageType#CLIENT_SIDE_XSLT_STYLESHEET then WebPageType#MOZILLA will be used as a template instead.

Parameters
clientSideXSLTStylesheetURLs:String[]

array of URLs to append, which may be empty.

addCSSStylesheetURLsback to summary
public void addCSSStylesheetURLs(String... cssStylesheetURLs)

Appends to existing array of relative URLs specifying client-side CSS stylesheets to be referenced in the resulting page.

The URLs are used as-is; the caller should have ensured they make sense in advance!

The caller can use this to specify the location of snuggletex.css, as well as any other required stylesheets.

Parameters
cssStylesheetURLs:String[]

array of CSS stylesheet URLs to add, which may be empty

addStylesheetsback to summary
public void addStylesheets(Transformer... stylesheets)

Appends to existing array of JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised. This can be useful if you want to add in headers and footers to the resulting XHTML web page.

Remember that the XHTML is all in its correct namespace so you will need to write your stylesheet appropriately. Ensure that any further XHTML you generate is also in the correct namespace; it will later be converted to no-namespace HTML if required by the serialisation process.

Note

Source documents may contain Processing Instructions (e.g. to invoke MathPlayer) so these must be handled as appropriate.

Parameters
stylesheets:Transformer[]

array of additional XSLT stylesheets to apply, which may be null. They are applied in the order specified.

getClientSideXSLTStylesheetURLsback to summary
public String[] getClientSideXSLTStylesheetURLs()

Returns specified array of relative URLs specifying client-side XSLT stylesheets to be referenced in the resulting page.

Default is null

The URLs are used as-is; the caller should have ensured they make sense in advance!

This is ignored for WebPageType#MATHPLAYER_HTML. Also, if nothing is set here for a WebPageType#CLIENT_SIDE_XSLT_STYLESHEET then WebPageType#MOZILLA will be used as a template instead.

getContentTypeback to summary
public String getContentType()

Returns the MIME type for the resulting page.

Defaults to DEFAULT_CONTENT_TYPE.

getCSSStylesheetURLsback to summary
public String[] getCSSStylesheetURLs()

Returns specified array of relative URLs specifying client-side CSS stylesheets to be referenced in the resulting page.

Default is null.

The URLs are used as-is; the caller should have ensured they make sense in advance!

The caller can use this to specify the location of snuggletex.css, as well as any other required stylesheets.

getCustomMathJaxUrlback to summary
public String getCustomMathJaxUrl()
getLangback to summary
public String getLang()

Returns the language of the resulting page, null if not set.

Defaults to DEFAULT_LANG.

getMathPrefRendererback to summary
public String getMathPrefRenderer()

Gets the value of the optional pref:renderer attribute (in the W3CConstants#MATHML_PREF_NAMESPACE) that can be added to the HTML root element to control certain aspects of the client-side Universal StyleSheets for MathML

The default is null, indicating that no attribute will be added

Since
1.3.0
getStylesheetsback to summary
public Transformer[] getStylesheets()

Returns an array of specified JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised. This can be useful if you want to add in headers and footers to the resulting XHTML web page.

Default is null.

Remember that the XHTML is all in its correct namespace so you will need to write your stylesheet appropriately. Ensure that any further XHTML you generate is also in the correct namespace; it will later be converted to no-namespace HTML if required by the serialisation process.

Note

Source documents may contain Processing Instructions (e.g. to invoke MathPlayer) so these must be handled as appropriate.

getTitleback to summary
public String getTitle()

Returns the title for the resulting page, null if not set.

Default is null.

This is used to generate a title and possible a h1 header if isAddingTitleHeading() returns true.

getWebPageTypeback to summary
public WebPageOutputOptions.WebPageType getWebPageType()

Deprecated

Use various methods in WebPageOutputOptionsBuilder to generate suitable options for various types of pages, which you can then tweak.

Before SnuggleTeX 1.3.0, this returned the desired "type" of web page to be constructed.

From SnuggleTeX 1.3.0, this property no longer controls anything.

Annotations
@Deprecated
isAddingMathPlayerImportback to summary
public boolean isAddingMathPlayerImport()

Returns whether to include the necessary processing instruction and object element required to explicitly trigger the MathPlayer plugin.

Returns:boolean

true if adding MathPlayer import gubbins, false otherwise.

Since
1.3.0
isAddingTitleHeadingback to summary
public boolean isAddingTitleHeading()

Returns whether page title should be inserted at the start of the web page body as an XHTML h1 element.

Default is false.

This has no effect if getTitle() returns null.

isHtml5back to summary
public boolean isHtml5()
isIncludingStyleElementback to summary
public boolean isIncludingStyleElement()

Returns whether to include SnuggleTeX-related CSS as a style element within the resulting page. If you choose not to do this, you probably want to put snuggletex.css somewhere accessible and pass its location in via setClientSideXSLTStylesheetURLs(String...).

As of SnuggleTeX 1.2.3, this option is ignored if isInliningCSS() returns true as its effect is clearly redundant in this case.

Default is true, as that's the simplest way of getting up to speed quickly.

isMathJaxback to summary
public boolean isMathJax()
isNoCharsetInContentTypeHeaderback to summary
public boolean isNoCharsetInContentTypeHeader()
setAddingMathPlayerImportback to summary
public void setAddingMathPlayerImport(boolean addingMathPlayerImport)

Sets whether to include the necessary processing instruction and object element required to explicitly trigger the MathPlayer plugin.

Parameters
addingMathPlayerImport:boolean

true to add gubbins for importing MathPlayer, false otherwise.

Since
1.3.0
setAddingTitleHeadingback to summary
public void setAddingTitleHeading(boolean addingTitleHeading)

Sets whether page title should be inserted at the start of the web page body as an XHTML h1 element.

This has no effect if getTitle() returns null.

Parameters
addingTitleHeading:boolean

true to add a title header if a title has been set, false otherwise.

setClientSideXSLTStylesheetURLsback to summary
public void setClientSideXSLTStylesheetURLs(String... clientSideXSLTStylesheetURLs)

Sets an array of relative URLs specifying client-side XSLT stylesheets to be referenced in the resulting page.

The URLs are used as-is; the caller should have ensured they make sense in advance!

This is ignored for WebPageType#MATHPLAYER_HTML. Also, if nothing is set here for a WebPageType#CLIENT_SIDE_XSLT_STYLESHEET then WebPageType#MOZILLA will be used as a template instead.

Parameters
clientSideXSLTStylesheetURLs:String[]

array of URLs to use, which may be empty.

setContentTypeback to summary
public void setContentType(String contentType)

Sets the MIME type for the resulting page.

Parameters
contentType:String

desired contentType, which must not be null.

setCSSStylesheetURLsback to summary
public void setCSSStylesheetURLs(String... cssStylesheetURLs)

Specifies an array of relative URLs specifying client-side CSS stylesheets to be referenced in the resulting page.

The URLs are used as-is; the caller should have ensured they make sense in advance!

The caller can use this to specify the location of snuggletex.css, as well as any other required stylesheets.

Parameters
cssStylesheetURLs:String[]

array of CSS stylesheet URLs, which may be empty

setCustomMathJaxUrlback to summary
public void setCustomMathJaxUrl(String mathJaxPath)
setHtml5back to summary
public void setHtml5(boolean html5)
setIncludingStyleElementback to summary
public void setIncludingStyleElement(boolean includingStyleElement)

Sets whether to include SnuggleTeX-related CSS as a style element within the resulting page. If you choose not to do this, you probably want to put snuggletex.css somewhere accessible and pass its location in via setClientSideXSLTStylesheetURLs(String...).

As of SnuggleTeX 1.2.3, this option is ignored if isInliningCSS() returns true as its effect is clearly redundant in this case.

Parameters
includingStyleElement:boolean

set to true to include a style element, false otherwise.

setLangback to summary
public void setLang(String lang)

Sets the language of the resulting page.

Parameters
lang:String

desired language, which may be null.

setMathJaxback to summary
public void setMathJax(boolean mathJax)
setMathPrefRendererback to summary
public void setMathPrefRenderer(String mathPrefRenderer)

Sets the value of the optional pref:renderer attribute (in the W3CConstants#MATHML_PREF_NAMESPACE) that can be added to the HTML root element to control certain aspects of the client-side Universal StyleSheets for MathML

A null value is allowed, which prevents such an attribute being added.

Since
1.3.0
setNoCharsetInContentTypeHeaderback to summary
public void setNoCharsetInContentTypeHeader(boolean noCharsetInContentTypeHeader)
setStylesheetsback to summary
public void setStylesheets(Transformer... stylesheets)

Sets an array of JAXP Transformers representing XSLT stylesheet(s) that will be applied to the resulting web page once it has been built but before it is serialised. This can be useful if you want to add in headers and footers to the resulting XHTML web page.

Remember that the XHTML is all in its correct namespace so you will need to write your stylesheet appropriately. Ensure that any further XHTML you generate is also in the correct namespace; it will later be converted to no-namespace HTML if required by the serialisation process.

Note

Source documents may contain Processing Instructions (e.g. to invoke MathPlayer) so these must be handled as appropriate.

Parameters
stylesheets:Transformer[]

array of XSLT stylesheets to apply, which may be null. They are applied in the order specified.

setTitleback to summary
public void setTitle(String title)

Sets the title for the resulting page.

This is used to generate a title and possible a h1 header if isAddingTitleHeading() returns true.

Parameters
title:String

title for the required page, which may be null to indicate that no title should be included.

setWebPageTypeback to summary
public void setWebPageType(WebPageOutputOptions.WebPageType webPageType)

Deprecated

Use various methods in WebPageOutputOptionsBuilder to generate suitable options for various types of pages, which you can then tweak.

Before SnuggleTeX 1.3.0, this returned the desired "type" of web page to be constructed.

From SnuggleTeX 1.3.0, this property no longer controls anything.

Annotations
@Deprecated
uk.ac.ed.ph.snuggletex back to summary

public final Enum WebPageOutputOptions.WebPageType

extends Enum<WebPageOutputOptions.WebPageType>
Class Inheritance
Annotations
@Deprecated

Deprecated

Use WebPageOutputOptionsBuilder to generate different types of web pages. More properties have been added to this class to control some of the finer aspects of this.

Enumerates the different web page "types" supported. This is used to tweak certain parts of the page generation process. You should avoid setting this explicitly unless you know what you're doing - use WebPageOutputOptionsBuilder instead.

Field Summary

Modifier and TypeField and Description
public static final WebPageOutputOptions.WebPageType
CLIENT_SIDE_XSLT_STYLESHEET

Deprecated Use WebPageOutputOptionsBuilder#createUniversalStylesheetOptions(String) if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.
XHTML + MathML containing one or more processing instructions designed to invoke client-side XSLT.
public static final WebPageOutputOptions.WebPageType
CROSS_BROWSER_XHTML

Deprecated Use WebPageOutputOptionsBuilder#createLegacyCrossBrowserOptions() if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.
"Cross-browser" XHTML + MathML; has XML declaration and DOCTYPE declaration consisting of the Public identifier defined in W3CConstants#XHTML_11_MATHML_20_PUBLIC_IDENTIFIER and System identifier defined in W3CConstants#XHTML_11_MATHML_20_SYSTEM_IDENTIFIER.
public static final WebPageOutputOptions.WebPageType
MATHPLAYER_HTML

Deprecated See WebPageOutputOptionsBuilder#createIEMathPlayerSpecificOptions() if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.
HTML + MathML intended for Internet Explorer 6/7 with the MathPlayer plug-in.

Intended to be served as text/html.

public static final WebPageOutputOptions.WebPageType
MOZILLA

Deprecated Use WebPageOutputOptionsBuilder#createMozillaSpecificOptions() if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.
Mozilla-compatible output.
public static final WebPageOutputOptions.WebPageType
PROCESSED_HTML

HTML deemed suitable for use by any User Agent.
public static final WebPageOutputOptions.WebPageType
UNIVERSAL_STYLESHEET

Deprecated Use WebPageOutputOptionsBuilder#createUniversalStylesheetOptions(String) if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.
"Cross-browser" XHTML + MathML suitable for Mozilla and Internet Explorer 6/7.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static WebPageOutputOptions.WebPageType
valueOf(String name)
References Deprecated WebPageOutputOptions.WebPageType is deprecated or references (maybe indirectly) at least one deprecated element.

public static WebPageOutputOptions.WebPageType[]
values()
References Deprecated WebPageOutputOptions.WebPageType is deprecated or references (maybe indirectly) at least one deprecated element.

Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CLIENT_SIDE_XSLT_STYLESHEETback to summary
public static final WebPageOutputOptions.WebPageType CLIENT_SIDE_XSLT_STYLESHEET

Deprecated

Use WebPageOutputOptionsBuilder#createUniversalStylesheetOptions(String) if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.

XHTML + MathML containing one or more processing instructions designed to invoke client-side XSLT. No XML declaration and no DOCTYPE.

Intended to be served as application/xhtml+xml.

Combining this with the Universal Math Stylesheet or something similar can give good cross-browser results.

Annotations
@Deprecated
CROSS_BROWSER_XHTMLback to summary
public static final WebPageOutputOptions.WebPageType CROSS_BROWSER_XHTML

Deprecated

Use WebPageOutputOptionsBuilder#createLegacyCrossBrowserOptions() if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.

"Cross-browser" XHTML + MathML; has XML declaration and DOCTYPE declaration consisting of the Public identifier defined in W3CConstants#XHTML_11_MATHML_20_PUBLIC_IDENTIFIER and System identifier defined in W3CConstants#XHTML_11_MATHML_20_SYSTEM_IDENTIFIER. The charset is declared only in the meta element in order to appease MathPlayer.

Intended to be served as application/xhtml+xml

Works on both Mozilla and IE6/7 (provided MathPlayer has been installed). This will display wrongly on IE6/7 if MathPlayer is not installed.

The main issue with this is that IE will want to download the relevant DTD, which hinders performance slightly.

Annotations
@Deprecated
MATHPLAYER_HTMLback to summary
public static final WebPageOutputOptions.WebPageType MATHPLAYER_HTML

Deprecated

See WebPageOutputOptionsBuilder#createIEMathPlayerSpecificOptions() if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.

HTML + MathML intended for Internet Explorer 6/7 with the MathPlayer plug-in.

Intended to be served as text/html.

This only works on IE clients with the MathPlayer plug-in preinstalled, but is a good option if that's your target audience.

This will display wrongly on IE6/7 if MathPlayer is not installed.

Annotations
@Deprecated
MOZILLAback to summary
public static final WebPageOutputOptions.WebPageType MOZILLA

Deprecated

Use WebPageOutputOptionsBuilder#createMozillaSpecificOptions() if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.

Mozilla-compatible output. XHTML + MathML; no XML declaration; no DOCTYPE.

This is intended to be served as application/xhtml+xml with encoding declared via HTTP header and meta element.

This is the best option for serving content exclusively on Mozilla-based browsers.

This will display as an XML tree on IE, which is not useful.

Annotations
@Deprecated
PROCESSED_HTMLback to summary
public static final WebPageOutputOptions.WebPageType PROCESSED_HTML

HTML deemed suitable for use by any User Agent.

Intended to be served as text/html.

You will have to use a suitable DOMPostProcessor to convert any MathML islands into other forms. (E.g. replace by an applet, replace by images, ...)

Annotations
@Deprecated
UNIVERSAL_STYLESHEETback to summary
public static final WebPageOutputOptions.WebPageType UNIVERSAL_STYLESHEET

Deprecated

Use WebPageOutputOptionsBuilder#createUniversalStylesheetOptions(String) if you really need this, otherwise consider some of the MathJax outputs for better cross-browser impact.

"Cross-browser" XHTML + MathML suitable for Mozilla and Internet Explorer 6/7. Intended to be used in conjunction with the client-side Universal StyleSheet XSLT to accommodate the two cases, prompting for the download of MathPlayer on IE6/7 if it is not already installed.

Page is created with an XML declaration but no DOCTYPE declaration.

The pref:renderer attribute on the html element will be set to mathplayer-dl.

You MUST also call setClientSideXSLTStylesheetURLs(String...) to indicate where the USS is going to be loaded from. This MUST be on a server local to the document you are serving from, because IE enforces a "same origin" policy for loading XSLT stylesheets. If you don't do this, your page will not work on IE.

Notes

The SnuggleTeX source distribution contains a slightly fixed version of the USS that works in IE7 that you can use if you like.
Annotations
@Deprecated

Constructor Detail

WebPageTypeback to summary
private WebPageType()

Method Detail

valueOfback to summary
public static WebPageOutputOptions.WebPageType valueOf(String name)

References Deprecated

WebPageOutputOptions.WebPageType is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

valuesback to summary
public static WebPageOutputOptions.WebPageType[] values()

References Deprecated

WebPageOutputOptions.WebPageType is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.