selects the format in which the MathML will be displayed
There are 3 mechanisms by which we determine how the MathML will be sent to the user agent. The first thing we check is to see if the user has explicitly asked for a certain format. The user can ask for a certain format on a per-request basis, or on a persistent basis. If a user specifies a preferred format on both a per-request basis, and a persistent basis, the per-request preference takes precedence. If the user has not explicitly requested a MathML format, we make a guess as to their preferred format based on their user agent string.
The user can specify a preferred format through setting the appropriate GET variable. This name of this variable is determined by the $format_GET_var member of this class. The user can specificy a persistent preference through the GET variables also. The name of this variable is determined by the $set_format_GET_var. Once the user has specified a persistent preference, this script will set a cookie (or a session variable as a fallback), to save that user's preference.
If the user has not specified a preference, we will analyze their user agent string to guess the appropriate format. Currently, we give plain XHTML+MathML to Firefox users, MathPlayer-compatible XHTML+MathML to anyone with MathPlayer, and HTML+Images to everyone else.
Located in /format_selection.php (line 53)
the current MathML format being served to the user agent
the available MathML formats
the GET variable that specifies the MathML format for the current request
the GET variable that specifies a new persistent MathML format
sets any persistent preferences and determines the right MathML Format
determines the user's explicit preferred MathML format
If the user has specified a preferred MathML format, this will return the string for that format. Otherwise, it will return NULL.
determines which MathML format to send to the user agent
This determines which MathML format to send to the user agent. First, it checks to see if the user has specified a preferred format, as determined by the FormatSelection->GetForce() function. If so, it will return that preference. Otherwise, it will base it's choice on an analysis of the user agent string.
When making a choice based on the user agent string, it will give the plain XHTML+MathML document to Firefox and to any crawlers. If the user agent string mentions MathPlayer, then it will determine that we should send MathPlayer-compatible MathML. Otherwise, it will choose HTML+Images.
returns the header string appropriate for the given page format
sets a persistent selection
If the user has specified a persistent preference for their MathML format, this will save that through a cookie or session variable. The names of both the cookie and the sesision variable are $this->format_var. The session variable is meant to be a fallback for those without cookies.
Documentation generated on Fri, 21 Jul 2006 10:44:31 -0500 by phpDocumentor 1.3.0RC6