Magnus,
 
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.
 
Regards,
Dean Nelson
 
 
In a message dated 12/1/2009 5:56:07 A.M. Pacific Standard Time,  
[email protected] 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>_ 
(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"_ 
(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_ (javascript:location.reload())  button, or try 
again later.   
____________________________________
  
System  error: -2146697204. Error processing resource 
'_http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd_ 
(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"_ (http://w
ww.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/[email protected]/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



---------------------------------------------------------------------
To  unsubscribe, e-mail: [email protected]
For  additional commands, e-mail:  [email protected]

Reply via email to