OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook-apps] Using MathML XSL Stylesheets with XHTML and HtmlHelp,again

Thanks Dean.

Although discouraging, I am kind of satisfied to see that is was not a mistake from my side then. I will probably revert to converting the math to png and use vanilla htmlhelp.

Thanks for your time

Best regards,

DeanNelson@aol.com wrote:
be0.6c5642fe.3847287d@aol.com" type="cite">
MathML for the HTMLHelp is really touchy. I had it working and then I fixed it! Not sure what I did to make it work last year, but I can look into it. I retraced my steps and came up with the same results that you did.
Dean Nelson
In a message dated 12/1/2009 5:56:07 A.M. Pacific Standard Time, magnus.gafvert@modelon.se writes:
Hi docbook experts!

I am struggling to get MathML to work with htmlhelp. The only useful reference I found was this <http://markmail.org/thread/5kxwqwx3uihdytv2> thread on this list, where Dean seems to have got this to work. Unfortunately, repeating (at the best of my skills) his steps does not succeed for me.

As described, I made a customization layer xsl (see attachment modelon-htmlhelp.xsl). The transformation (xsltproc with docbook xsl 1.75.2) passes fine and a set of files (index.htm.xml, ch01.htm.xml, etc) are generated. The generated xml files have the head elements (before <html>):
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="mathml.xsl"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0  
Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Compilation with MS help compiler generate the warnings described in Dean's post and a chm file is generated.

Now, opening  the .chm file shows the document outline but not page contents.  The following error is displayed:

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.

System error: -2146697204. Error processing resource 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'.

The same error is reported when opening index.htm.xml in IE 8. It displays fine in Firefox.

I am quite new to docbook and xslt, so I may have misinterpreted the instructions. Any help or hints to what is wrong would be very much appreciated.

I got xhtml output to work on IE (see attachment modelon-xhtml.xsl), using the header tags
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
I also tried this dtd with htmlhelp, but without success.

Again, I would be much grateful for any hints or help on this matter.


<?xml version='1.0'?>
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.autolabel.max.depth" select="3"/>


<?xml version='1.0'?>
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="xhtml-1_1/onechunk.xsl"/>
<xsl:include href="modelon-common.xsl" />

<xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN</xsl:param>

<xsl:param name="chunker.output.doctype-system">http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd</xsl:param>

<xsl:param name="html.stylesheet" select="'docbook.css'"/>


<?xml version='1.0'?>
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<!-- http://www.mail-archive.com/docbook-apps@lists.oasis-open.org/msg11927.html -->

<xsl:import href="htmlhelp/htmlhelp.xsl"/>
<xsl:include href="modelon-common.xsl" />

<xsl:template name="user.preroot">
<xsl:processing-instruction  name="xml-stylesheet">
<xsl:text>type="text/xsl" href="mathml.xsl"</xsl:text>

<xsl:param name="html.ext">.htm.xml</xsl:param>

<xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN</xsl:param>

<xsl:param name="chunker.output.doctype-system">http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd</xsl:param>

<xsl:param name="chunker.output.doctype-public">-//W3C//DTD XHTML 1.0 


<xsl:param  name="chunker.output.omit-xml-declaration">no</xsl:param>
<xsl:param  name="chunker.output.method">xml</xsl:param>
<xsl:param  name="chunker.output.indent">yes</xsl:param>
<xsl:param  name="chunker.output.standalone">no</xsl:param>
<xsl:param  name="chunker.output.encoding">UTF-8</xsl:param>

<xsl:param  name="htmlhelp.hhp.tail"> mathml.xsl

<xsl:param name="html.stylesheet" select="'docbook.css'"/>


# Copy this template to your docbook project directory and rename to Makefile.
# Set the DOC variable to the document name (the prefix of your docbook xml file, exclude the .xml suffix):

$(DOC).xhtml:  $(DOCFILE)
    xsltproc  --xinclude  --output  $@ \
    mv index.html $(DOC).xhtml

xhtml:  $(DOC).xhtml

$(DOC).html:  $(DOCFILE)
    xsltproc --xinclude  --output  $@ \

html:  $(DOC).html

# http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html
$(DOC).fo:  $(DOCFILE)
    rm -f $(DOC).fo
    xsltproc --xinclude  --output  $@ \
    --stringparam fop1.extensions 1 \
    $(XSLPDFSTYLE)  $<

$(DOC).pdf: $(DOC).fo
    cmd /c "fop -fo $< $@"
    fop -fo $< $@

pdf:  $(DOC).pdf

htmlhelp.hhp: $(DOCFILE)
    xsltproc --xinclude $(XSLHTMLHELPSTYLE) $<

htmlhelp: $(DOC).chm

$(DOC).chm: htmlhelp.hhp
    mv htmlhelp.chm $@

ifeq ($(OS),Windows_NT)
winhelp: $(DOC).chm

ifeq ($(OS),Windows_NT)
#all: xhtml html pdf winhelp
all: htmlhelp
#all: winhelp xhtml pdf
all: xhtml html pdf

    rm -f *.pdf *.xhtml *.html *.fo *.hhp *.hhc *.chm

To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org

Principal Engineer / Chief Operating Officer

Phone direct: +46 46 286 2204
Email: magnus.gafvert@modelon.se

Modelon logo Modelon AB
Ideon Science Park
SE-223 70 Lund, Sweden
Phone: +46 46 286 2200
Fax: +46 46 286 2201
Email: sales@modelon.se
Web: http://www.modelon.se

Webinar invitation
fn;quoted-printable:Magnus G=C3=A4fvert
org:Modelon AB
adr:;;Ideon Science Park;Lund;;SE 223 53;Sweden
tel;work:+46 46 286 22 04
tel;fax:+46 46 286 22 01
tel;cell:+46 733 24 59 04

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]