how to include mathml in xsl fo using xsl transformation
Hi
I am a newbie to xsl fo. i have to generate a pdf containing Mathematical Equations. While converting my fo file into PDF using fop1.0 warnings are thrown as shown below. Also i have posted below my fo file. Anybody can help me with this issue. thanks in advance.
Here is my Fo file:
<?xml version="1.0" encoding="UTF-8"?><fo:root xmlns:axslt="http://www.w3.org/1999/XSL/Transform/Alias"
xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns="http://www.w3.org/1998/Math/MathML">
<fo:layout-master-set><fo:simple-page-master master-name="IAT" page-height="8in" page-width="6in">
<fo:region-body region-name="xsl-region-body" margin-left="0in" margin-top="0.5in" background-color="white"/>
<fo:region-before region-name="xsl-region-before" extent="0.5in" background-color="white"/>
<fo:region-after region-name="xsl-region-after" extent="0in" background-color="white"/>
<fo:region-start region-name="xsl-region-start" extent="0.5in" background-color="white"/>
<fo:region-end region-name="xsl-region-end" extent="0.5in" background-color="white"/>
</fo:simple-page-master></fo:layout-master-set><fo:page-sequence master-reference="IAT">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="22pt" color="#004A8F" margin="0.03in" background-color="white" padding-before="0pt" padding-after="0pt"
text-indent="0.5in" text-align="center" border-width="0.03cm" border-color="white" border-style="solid" space-before="10pt"
space-after="0pt">section_level_new</fo:block>
<fo:block font-size="10pt" color="black" margin="0.03in" start-indent="0.55in" end-indent="0.5in" background-color="white" padding-before="0pt" padding-after="0pt" text-indent="0in" text-align="left" border-width="0.03cm" border-color="white" border-style="solid" space-before="15pt" space-after="0pt">Multiple Choice</fo:block><fo:block font-size="8pt" color="black" margin="0.03in" font-style="bold" start-indent="0.55in" end-indent="0.5in" background-color="white" padding-before="0pt" padding-after="0pt" text-indent="0in" text-align="left" border-width="0.03cm" border-color="white" border-style="solid" space-before="10pt" space-after="0pt">
Where is your native town?
</fo:block>
<fo:block><fo:external-graphic src="url('sam.mml')" content-type="application/mathml+xml"/></fo:block>
<fo:block>
<fo:instream-foreign-object>
<math><mrow><mi>A</mi><mo>=</mo><mi>Ãâ¬</mi><msup><mi>r</mi><mn>2</mn></msup></mrow></math>
</fo:instream-foreign-object>
</fo:block>
</fo:flow></fo:page-sequence></fo:root>
Following Errors are thrown:
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Invalid property value encountered in font-style="bold": org.apache.fop.fo.expr.PropertyException: file:/C:/Workspace/FO_Updated/FO_MathML.fo:10:1: No conversion defined bold; property:'font-style' (See position 11:27)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: Image not available. URI: sam.mml. Reason: org.apache.xmlgraphics.image.loader.ImageException : The file format is not supported. No ImagePreloader found for sam.mml (See position 13:92)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}math" encountered (a child of fo:instream-foreign-object}. (See position 17:13)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mrow" encountered (a child of math}. (See position 17:17)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mi" encountered (a child of mrow}. (See position 17:18)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mo" encountered (a child of mrow}. (See position 17:28)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mi" encountered (a child of mrow}. (See position 17:38)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}msup" encountered (a child of mrow}. (See position 17:53)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mi" encountered (a child of msup}. (See position 17:54)
Jul 9, 2011 4:47:27 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Unknown formatting object "{http://www.w3.org/1998/Math/MathML}mn" encountered (a child of msup}. (See position 17:64)
Jul 9, 2011 4:47:28 PM org.apache.fop.events.LoggingEventListener processEvent
SEVERE: The intrinsic dimensions of an instream-foreign-object could not be determined. (See position 17:1)
|