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: Using MathML XSL Stylesheets with XHTML and HtmlHelp, again


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

<?xml version='1.0'?>
<xsl:stylesheet  
    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"/>

</xsl:stylesheet> 
<?xml version='1.0'?>
<xsl:stylesheet  
    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'"/>

</xsl:stylesheet> 
<?xml version='1.0'?>
<xsl:stylesheet  
    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:processing-instruction>
</xsl:template>

<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  
Transitional//EN</xsl:param>

<xsl:param  
name="chunker.output.doctype-system">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:param>

<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
ctop.xsl
pmathml.xsl
pmathmlcss.xsl
</xsl:param>

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

</xsl:stylesheet> 
# 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  $@ \
	$(XSLXHTMLSTYLE)  $<
	mv index.html $(DOC).xhtml

xhtml:  $(DOC).xhtml

$(DOC).html:  $(DOCFILE)
	xsltproc --xinclude  --output  $@ \
	$(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  $@ \
	--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
	-"$(HTMLHELPWORKSHOP_HOME)/hhc" $<
	mv htmlhelp.chm $@

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

begin:vcard
fn;quoted-printable:Magnus G=C3=A4fvert
n;quoted-printable:G=C3=A4fvert;Magnus
org:Modelon AB
adr:;;Ideon Science Park;Lund;;SE 223 53;Sweden
email;internet:magnus.gafvert@modelon.se
tel;work:+46 46 286 22 04
tel;fax:+46 46 286 22 01
tel;cell:+46 733 24 59 04
version:2.1
end:vcard



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