Compound XHTML plus MathML plus SVG and a DTD

This page is functionally a test bed for developing compound XHTML + MathML + SVG web pages. This page does not validate. The complication appears to be the present requirement of the svg: prefix on all svg tags as seen both on a sample page at W3 and a page done by Peter Jipsen. Peter has a second page that includes his ASCIIsvg. As MathML in XHTML can be so formed but need not be, I infer that SVG can also be so formed in a compound document.

For now (December 2006), the bottom line is that the page is functional in FireFox 2.0 and Amaya 9.52 (Windows) without parsing errors, and that is sufficient for my purposes.

Comments on ways to validate without cluttering up the SVG are welcome.

Note that the use of the pseudo-element :target is an invalid pseudo-element (under the DTD?) but functions as intended under Firefox 2.0. MSIE 7.0 appears to treat .xhtml as an unknown file type. On FireFox equipped computers the .xhtml is a registered file type, so MSIE 7.0 offers to open the file using FireFox. If a .html extension is used, then MSIE 7.0 renders the page as HTML. The catch is that this extension triggers the HTML code path in FireFox, not the XML code path necessary to rendering SVG and MathML. In any case, MSIE 7.0 cannot render SVG, so the issue is moot.

In comments on his own XHTML + MathML + SVG page Peter Jipsen notes that the DOCTYPE is "important for IE since it triggers MathPlayer to translate XHTML to HTML." He goes on to note that, "Using a file name that ends with .xhtml or .xht (not .html or .xml) is important since it makes FireFox handle the XHTML correctly."

Named entities such as • (•) work in Mozilla only if a valid XHTML Formal Public Identifier is included. The named entities, however, appear to throw IE for a loop.

Sources that speak of SVG 1.2 note that SVG 1.2 will not have a DTD due to rendering problems DTDs are apparently causing. Jonathan Watt recommends against including a DTD when building compound XHTML + MathML 2.0 + SVG 1.1 documents. This works for FireFox. Lacking other sources inveighing against DTDs, and noting that many on line examples of compound documents sport a flashy DOCTYPE with public identifier, these pages use the -//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN identifier.

Fedora Core Five notes

02 January 2007: The FireFox 1.5.0.8 rpm with the MathML rpm rendes SVG correctly but it still missing fonts. Attempts to install fonts as per various online instructions have to date failed. Clearly MathML on FireFox is not yet ready for the non-technical user. FC5's FireFox rpm maintainer will not release an official FireFox 2.0, so FC5 users will have to wait for FireFox 3.0. This will require an upgrade to FC6, however, and academic labs such as the one my courses run in are unlikely to upgrade anytime soon.

There is bad news on the Amaya front as well. Amaya rpm for FC5 is not the most recent Amaya builds and the SVG transforms rotate and scale are not supported. The "A" arc command in a path also does not work as depicted on the pages at W3 nor as rendered in FireFox (which does agree with W3). MathML works, but SVG as used in code I build is broken.

axes Circle Triangle Square Pentagon A B Hexagon Heptagon Octagon

Notes

Circle

Circle

Triangle

Triangle

Phi

The ratio of A/B is equal to the Fibonacci ratio phi or 1+ 5 2 .

Mixing namespaces for new uses

By including the xlink namespace in the SVG declaration, xlink properties become available. FireFox will obligingly generate a tooltip on the circle below despite the absence of a link. The title alone fires the tooltip, at least for FireFox 1.5+.

Universal Affirmative Universal Affirmative

This is potentially the great power of namespaces. Like a tag or property and the way it works in another namespace? No worries, toss it into what tag soup you are brewing with the namespace declaration and the proper prefix.

This is, in all likelihood, the genesis of the svg:svg structure. That still seems unnecessary, however, as the SVG block appears to "reset" the default namespace.

Behavior of parabolas and quadratic equations

The following are various parabolas illustrating the effect of the lead coefficient and the vertex on the shape of the parabola and the number of roots.

Note: this page is also a demonstration of the capabilities of SVG. Note that each parabola is a different hyperlink with its own tooltip title tag. This could not be done with an image map as the parabolas cross-over each other. Because SVG allows each parabola to be its own object, the links are individual to the curve. This page also requires that the MathML math fonts be installed for proper display of embedded MathML code. Parabolic path tags built from an OpenOffice Calc spreadsheet.

A minor grid A major grid axes Varying k Varying a Imaginary roots: reflected roots

Axes

These are the x and y axes. The horizontal midline of the chart is the x-axis, the vertical midline of the chart is the y-axis. The major grid lines, in violet-red, are at an interval of 5. The minor gridlines are at unit intervals.

The effect of varying k, which also varies only c

y=x²+12x+41
The vertex form for this parabola is (y-5)=(x-(-6))². As k decreases, c also decreases at the same rate and the parabola is moved vertically. In some sense, c controls the vertical position of a parabola.

y-=x²+12x+36
The vertex form for this parabola is y=(x-(-6))²

y=x²+12x+27
The vertex form for this parabola is (y-(-9))=(x-(-6))²

The effect of varying the lead coeficient a

y=x²
The vertex form for this parabola is y=x². The lead coefficient "a" controls the "span" of the parabola without affecting the vertex location in any way. A larger lead coefficient results in a "narrower" parabola, a smaller lead coefficient results in a "wider" parabola. This can be seen in the formulation (y-k)=a(x-k)² and the related form (y-k) = 1 4p (x-h) 2

y=2x²
The vertex form for this parabola is y=2x²

y=0.5x²
The vertex form for this parabola is y=0.5x²

The imaginary roots are the roots of the reflected function

y=x²-14x+53
The vertex form for this parabola is (y-4)=(x-7)². The roots are 7 ± 2i. This parabola is a "reflection" of the one below. The imaginary roots (x-intercepts, zeros) occur at the "reflection" of the roots of the "reflected" parabola below. The word imaginary in this case can also be taken to refer to the "image" of the roots.

y=-x²+14x-45
The vertex form for this parabola is (y-4)=-(x-7)². The roots are 7 ± 2, or x=5 and x=9.

Notes on roots

Roots, also known as x-intercepts or zeros of the function, can be found from either the quadratic form of an equation y=ax²+bx+c or from the vertex form of the equation (y-k) = a (x-h) 2 .

The roots from the quadratic form can be found from x = -b 2a ± b 2 -4ac 2a

For the vertex form the roots are: x = h ± -k a .

Although this form is rarely presented in algebra texts, the radical is in many ways much more informative than the discriminant b2 -4ac. The form makes more immediately clear that real roots only occur if either k or a are negative, but not both. That -b2a is indeed the axis of symmetry is also more clear in the vertex root equation where h is used in lieu of -b2a.

top center triangle center triangle lower left triangle S P M X X X X X X X X X

Optional border Push margins of circles fully into view Indent slightly from left edge Circles are 50 base units in radius Subject circle [generally completely painted over] Predicate circle [generally completely painted over] Middle term circle [lower section exposed] left top crescent S center football S P intersection right top crescent P top center triangle center triangle lower left triangle lower right triangle Twiddle dee | Twiddle dum | Fee fi fo fum Subject Predicate Middle term

The following is a reproduction at twice the scale of the above. This proved useful in determining that the version of Amaya for Fedora Core 5 in late December 2006 was not supporting scale and rotate transforms, only translate transformations. Note that Amaya 9.52 for windows does support these transforms.

Amaya on Fedora Core 5 supports MathML despite the apparent lack of the Mathematica fonts. How Amaya accomplishes this while FireFox 1.5.0.9 fails to do so is a puzzle as of 07 January 2007.

Optional border Push margins of circles fully into view Indent slightly from left edge Circles are 50 base units in radius Subject circle [generally completely painted over] Predicate circle [generally completely painted over] Middle term circle [lower section exposed] left top crescent S center football S P intersection right top crescent P top center triangle center triangle lower left triangle lower right triangle Twiddle dee | Twiddle dum | Fee fi fo fum Subject Predicate Middle term

Web tech pageMS 103 GeometryLee LingCOMFSM