Using MathML XSL Stylesheets with XHTML and HtmlHelp, again
Magnus Gäfvert <magnus.gafvert <at> modelon.se>
2009-12-01 13:55:25 GMT
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.
/Magnus
# 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):
DOCDIR=/C/JModelica.org-SDK/src/docbook/UsersGuide
DOC=JModelicaUsersGuide
DOCFILE=$(DOCDIR)/$(DOC).xml
XSLHTMLSTYLE=$(DOCBOOK_HOME)/modelon-html-IE.xsl
XSLXHTMLSTYLE=$(DOCBOOK_HOME)/modelon-xhtml.xsl
XSLPDFSTYLE=$(DOCBOOK_HOME)/modelon-fo.xsl
XSLHTMLHELPSTYLE=$(DOCBOOK_HOME)/modelon-htmlhelp.xsl
#http://docbook.sourceforge.net/release/xsl/current/doc/html/index.html
$(DOC).xhtml: $(DOCFILE)
xsltproc --xinclude --output $ <at> \
$(XSLXHTMLSTYLE) $<
mv index.html $(DOC).xhtml
xhtml: $(DOC).xhtml
$(DOC).html: $(DOCFILE)
xsltproc --xinclude --output $ <at> \
$(XSLHTMLSTYLE) $<
html: $(DOC).html
# http://docbook.sourceforge.net/release/xsl/current/doc/fo/index.html
$(DOC).fo: $(DOCFILE)
rm -f $(DOC).fo
xsltproc --xinclude --output $ <at> \
--stringparam fop1.extensions 1 \
$(XSLPDFSTYLE) $<
$(DOC).pdf: $(DOC).fo
cmd /c "fop -fo $< $ <at> "
fop -fo $< $ <at>
pdf: $(DOC).pdf
htmlhelp.hhp: $(DOCFILE)
xsltproc --xinclude $(XSLHTMLHELPSTYLE) $<
htmlhelp: $(DOC).chm
$(DOC).chm: htmlhelp.hhp
-"$(HTMLHELPWORKSHOP_HOME)/hhc" $<
mv htmlhelp.chm $ <at>
ifeq ($(OS),Windows_NT)
winhelp: $(DOC).chm
else
winhelp:
endif
ifeq ($(OS),Windows_NT)
#all: xhtml html pdf winhelp
all: htmlhelp
#all: winhelp xhtml pdf
else
all: xhtml html pdf
endif
clean:
rm -f *.pdf *.xhtml *.html *.fo *.hhp *.hhc *.chm
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe <at> lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help <at> lists.oasis-open.org